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);
展开
星球君于2023-02-17 05:40发布的图片
评论