SceneJS.Lights in seperate transform hierarchy
Reported by lindsay.kay (at xeolabs) | May 17th, 2010 @ 06:05 AM | in V0.7.5
Problem
In V0.7.4, a Lights node cannot be transformed independently of it's illuminated subnodes because it is within the same subgraph as those nodes.
In the example below, the translation cannot be used to move the light around because it will also move the content that it illuminates:
var a = new SceneJS.Node(
new SceneJS.Translate({ ... },
new SceneJS.Lighting({ ... },
new SceneJS.Geometry({ ... })
)
)
);
Solution
In V0.7.5, Lights nodes now have a global effect, where once they are defined they then illuminate all other nodes subsequently rendered during the graph's left-right traversal. This allows them to be within their own transform hierarchies:
var a = new SceneJS.Node(
new SceneJS.Translate({ ... },
new SceneJS.Lighting({ ... })
),
new SceneJS.Geometry({ ... })
);
The left-to-right traversal semantic was introduced in V0.7.5 by the SceneJS.Symbol and SceneJS.Instance nodes.
Comments and changes to this ticket
-
lindsay.kay (at xeolabs) May 24th, 2010 @ 03:59 AM
- State changed from new to resolved
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
SceneJS provides easy access to WebGL through a simple and declarative JavaScript API. The SceneJS API is functional, which enables its scene definitions to be really compact and expressive, while hooking into other JavaScript code just that little bit more smoothly.