解答: 要讓表面變成受光影響的漫射材質,修改 createBall():
createBall()
1 2 3
var material = new THREE.MeshLambertMaterial( { color: 0x80FC66, shading: THREE.FlatShading } ); var ka = 0.4; material.ambient.setRGB( material.color.r *ka, material.color.g* ka, material.color.b * ka );