ThreeJS Understanding Where Lights Are
I've been trying for around 30 minutes to position a pointlight at the bottom of my model with very poor results. I don't know how many units my model is and I can't seem to exactl
Solution 1:
Each geometry has a boundingSphere
attribute that you can use to figure out the size of your object. https://threejs.org/docs/api/core/Geometry.html
If the attribute does not have a value you can compute it using geometry.computeBoundingSphere();
As for the lights for each of the light types there is a helper function associated with it that will show you where the light is:
https://threejs.org/docs/index.html?q=Helper#Reference/Extras.Helpers/HemisphereLightHelper
https://threejs.org/docs/index.html?q=Helper#Reference/Extras.Helpers/DirectionalLightHelper
https://threejs.org/docs/index.html?q=Helper#Reference/Extras.Helpers/PointLightHelper
https://threejs.org/docs/index.html?q=Helper#Reference/Extras.Helpers/SpotLightHelper
Post a Comment for "ThreeJS Understanding Where Lights Are"