Switch lighting of THREE.MeshPhongMaterial on / off dynamically

狂风中的少年 提交于 2019-12-25 02:58:17

问题


I wonder if there is a way to turn off the lighting from a MeshPhongMaterial on runtime.

I'm working on a scene with big distances between the meshes and because of this it's impossible to work with the implemented shadow of three.js.

So now I wanna try to turn off the light on a certain object, when it's behind another, which I'll determine by ray collision. In the next step it would be nice to ease in and out, instead of just switching the light off.

Any hints? Thank you in advance!

来源:https://stackoverflow.com/questions/24020566/switch-lighting-of-three-meshphongmaterial-on-off-dynamically

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!