掘友等级
获得徽章 5
#一书一世界# #晒出你的读书笔记#
“不不,别说在哪,一知道在哪,
世界就变得一张地图一样小了,
不知道在哪,世界才广阔呢”
“那好,咱们就努力迷路”
——刘慈欣《三体》
#世界上最好的编程语言#
JavaScript,所见即所得
HDR环境光
initScene() {
// 场景
this.sceneA = new THREE.Scene();
this.sceneA.background = null;
new RGBELoader().setPath("/model/").load('clarens_night_01_1k.hdr', (texture) => {
texture.mapping = THREE.EquirectangularRefractionMapping;
this.sceneA.background = texture;
this.sceneA.environment = texture;
});
},
three.js灯光师
const color = parseInt(colors[i % colors.length], 16);
const light = new THREE.PointLight(color, 2, 65);
light.position.set(0, 2, 0);
light.add(
new THREE.Mesh(
new THREE.SphereGeometry(.5, 16, 50),
new THREE.MeshBasicMaterial({ color })
)
);
this.sceneA.add(light);
#你的工作会被ChatGPT取代吗# ChatGPT:就这
// Define a function to print a message
function printMessage(message) {
console.log(message);
}
下一页