CubicVR.js
CubicVR.js copied to clipboard
Lights should be transformable, as meshes are
Currently lights must be positioned in absolute coordinates. Would be more convenient to use if I they were transformable by scene object.
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.