New Matrix Node
Reported by lindsay.kay (at xeolabs) | May 19th, 2010 @ 02:36 AM | in V0.7.5
A new SceneJS.Matrix node defines a view/model space transformation to apply to its sub-graph. Formerly, this was provides in model and view space separately by SceneJS.ViewMatrix and SceneModelMatrix. The introduction of SceneJS.Camera in V0.7.5 now provides SceneJS with a demarcation of view and model spaces within a graph, so now the same set of transform nodes may now apply to either space, depending on where they are defined in the graph.
Example
A cube translated along the X, Y and Z axis:
var mat = new SceneJS.Matrix({
elements : [ 1, 0, 0, 10,
0, 1, 0, 5,
0, 0, 1, 3,
0, 0, 0, 1
]
}, new SceneJS.objects.Cube() )
No comments found
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.