You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to render a scene where the light source is not fixed, but can move. In particular, I'm referring to a DirectionalLight whose direction I want to change.
What's currently available
Aside from the APIs for adding and removing lights, I haven't found any APIs for moving light sources, nor any way to keep a reference to them. They aren't currently implemented, are they?
Workaround I found
As a workaround, I found I can find the reference to light-sources through their node, in scene.visualizer.context._scene.nodes, then modify its matrix to change direction of the light.
Do you think there is a better way to do this? If not, I believe adding specific APIs would be useful.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Objective: move light sources
I am trying to render a scene where the light source is not fixed, but can move. In particular, I'm referring to a
DirectionalLight
whose direction I want to change.What's currently available
Aside from the APIs for adding and removing lights, I haven't found any APIs for moving light sources, nor any way to keep a reference to them. They aren't currently implemented, are they?
Workaround I found
As a workaround, I found I can find the reference to light-sources through their node, in
scene.visualizer.context._scene.nodes
, then modify its matrix to change direction of the light.Do you think there is a better way to do this? If not, I believe adding specific APIs would be useful.
Beta Was this translation helpful? Give feedback.
All reactions