Extend SceneJS.Scene to receive configs a la SceneJS.WithConfigs
Reported by lindsay.kay (at xeolabs) | June 5th, 2010 @ 04:35 AM | in V0.7.6
Allow a configs object to be injected into the scene graph (like the one SceneJS.WithConfigs generates).
This is done by adding a fluent API style method, along with the same sort of thing for data scopes (like SceneJS.WithData generates):
var myScene = new SceneJS.Scene( ...);
myScene.withConfigs({
"#myRotate" : {
angle: 45
"#myTranslate": {
x: 100
}
}).render();
The two types of data flow can work together - for data scopes, add a withData method:
var myScene = new SceneJS.Scene( ...);
myScene
.withData({
foo: "bar"
})
.withConfigs({
"#myRotate" : {
angle: 45
"#myTranslate": {
x: 100
}
}).render();
Notes
- The render method will clear all injected data and configs.
- Passing in of data into the render method will be deprecated.
Comments and changes to this ticket
-
lindsay.kay (at xeolabs) August 3rd, 2010 @ 11:35 PM
- State changed from open to resolved
- Milestone order changed from 0 to 0
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.