threejs(13)-shader set point material

Shader material built-in variables The built-in variables of the three.js shader are gl_PointSize: In point rendering mode, controls the rendering pixel size of the square point area (note that this is the pixel size, not the three.js unit, so when the camera is moved, the size of the point seen on the screen remains unchanged) […]

Unity data reading | (4) Json file parsing (Newtonsoft.Json, Litjson, JsonUtility, SimpleJSON)

Directory 1 Introduction 2. Advantages and Disadvantages 3. Analysis 3.1 Newtonsoft.Json 3.1.1 Download address 3.1.2 Advantages and Disadvantages 3.1.3 Analysis 3.2 listjson 3.2.1 Download address 3.2.2 Advantages and Disadvantages 3.2.3 Analysis 3.3 JsonUtility 3.3.1 Advantages and Disadvantages 3.3.2 Analysis 3.4 SimpleJSON 3.4.1 Download address 3.4.2 Advantages and Disadvantages 3.4.3 Analysis 4. Summary 1. Preface A […]

Nodejs operation cache database-Redis

Hi I’m Shendi Nodejs column Nodejs operation cache database-Redis In server-side development, cache database is also indispensable, which can improve program concurrency and facilitate subsequent expansion. Currently, the most commonly used one is Redis. Install dependencies Like the previous mysql, the most commonly used dependency of redis is redis npm install redis Depend on the […]

Use of Nodejs database-Mysql

Hi I’m Shendi Use of Nodejs database-Mysql Nodejs column The database is indispensable in the backend, and Nodejs naturally has libraries corresponding to the database to use. Mysql database can use the mysql library Install dependencies Execute the following command to install mysql dependencies npm install mysql Depend on the corresponding github address: https://github.com/mysqljs/mysql Introduce […]

Use Nodejs to build a simple web page and achieve public network access

Table of Contents Preface 1. Install Node.js environment 2. Create a Node.js application 3. Install Cpolar intranet penetration to achieve public network access to Nodejs services 3.1 Register cpolar account 3.2 Download cpolar client 3.3 Create tunnel mapping local port 4. Fixed public network remote address Foreword Node.js is a web application framework built on […]

threejs(12)-shader to create smoke and water cloud effect

1. Encapsulate the water ripple effect yourself src/main/main01.js import * as THREE from “three”; import {<!– –> OrbitControls } from “three/examples/jsm/controls/OrbitControls”; import gsap from “gsap”; import * as dat from “dat.gui”; import vertexShader from “../shaders/water/vertex.glsl”; import fragmentShader from “../shaders/water/fragment.glsl”; // Goal: Set the cloud smoke effect //Create gui object const gui = new dat.GUI(); // […]

threejs(11)-Proficient in shader programming (difficulty) 2

1. Writing advanced patterns with shader Small Japanese flag precision lowp float; varying vec2 vUv; float strength = step(0.5,distance(vUv,vec2(0.5)) + 0.25); gl_FragColor =vec4(strength,strength,strength,strength); Draw a circle precision lowp float; varying vec2 vUv; float strength = 1.0 – step(0.5,distance(vUv,vec2(0.5)) + 0.25); gl_FragColor =vec4(strength,strength,strength,strength); Ring precision lowp float; varying vec2 vUv; float strength = step(0.5,distance(vUv,vec2(0.5)) + 0.35); […]

nvm realizes the coexistence of multiple versions of nodejs under windows

Table of Contents 1.Install nvm 1.1 Download the installation package 1.2 Install nvm 1.3 Configure nvm to download the image 1.4 Configure nvm environment variables 2. Use nvm 2.1 Basic commands 2.2 Use nvm to download nodejs 3.npm configure global dependencies and cache dependencies (optional) 4. Install commonly used modules 4.1 Install express 4.2 Install […]

nodejs operates rabbitMQ amqplib library message persistence

config.js const { MQ_HOST, HOST, MQ_PORT } = process.env; const mqHost = MQ_HOST || HOST || “127.0.0.1”; const mqPort = MQ_PORT || 5672; const mqUsername = “root”; const mqPassword = “password”; const mqProtocol = “amqp”; const exchangeName = ‘exchange_direct_saas’; //switch const queueName = ‘queue_direct_saas’; const routingKey = ‘saasIsolution’;//routing key const config = { mqHost, mqPort, […]