CubicVR.js icon indicating copy to clipboard operation
CubicVR.js copied to clipboard

Lights should be transformable, as meshes are

Open modeswitch opened this issue 13 years ago • 1 comments

Currently lights must be positioned in absolute coordinates. Would be more convenient to use if I they were transformable by scene object.

modeswitch avatar May 16 '12 15:05 modeswitch

I had forgotten that I added this:

https://github.com/cjcliffe/CubicVR.js/blob/master/source/CubicVR.Light.js#L136

If you call myLight.setParent(mySceneObject); it will attach the light appropriately, including the directional component of spotlights.

I will leave this open as I'd like to make sure it can be bound in a forward manner to the SceneObject using a quick instanceof check on bindChild as usual.

cjcliffe avatar May 16 '12 15:05 cjcliffe