Babylon.js删除了球体的光反射

时间:2017-10-21 10:08:16

标签: javascript light babylonjs

如何删除Babylon.js中球体(点)光的反射?

// Point light.
const light = new BABYLON.PointLight('myLight', new BABYLON.Vector3(0, 1, 0), scene)

// Sphere with size 100.
const newBox = BABYLON.Mesh.CreateSphere('mySphere', 64, 100, scene)

我想照亮半个球体,但没有红色圆圈的反射:

enter image description here

1 个答案:

答案 0 :(得分:3)

我找到了解决方案:

newBox.material = someMaterial
newBox.material.specularColor = new BABYLON.Color3(0, 0, 0);