-
Notifications
You must be signed in to change notification settings - Fork 165
SceneJS V5 Ideas
Tarek Sherif edited this page Jun 11, 2016
·
9 revisions
Some ideas for SceneJS V5.
Some functions in SceneJS turned out to be best done at the app layer, and should be removed from SceneJS:
- Remove vertex sharing
- Remove shared node cores
- Remove "tag" nodes
- Change vector representations from
{x: 3, y: 4, z: 2}
to arrays, ie.[3,4,2]
- Implement scene nodes as components that support inheritance like in xeoEngine
- Remove on-demand plugin loading. That forces getting of nodes to be asynchronous, ie.
myScene.getNode("foo", function(foo) { .. });
. Require that plugins be explicitly included JS files.
- Schedule texture/geometry/matrix updates (and maybe scene recompilations) to a task queue
- I'd love to see SceneJS expose an API that allows more control over the render loop. A first step would be optionally not starting the render loop inside SceneJS when a scene is created; just expose the
Display.render
method so the calling application can use it to draw the scene in a render loop that lives in the application. Other key lifecycle moments that might be useful to control are scene compilation (already done) and state sorting. Allowing the application to control these expensive ops would allow people to really fine-tune rendering performance for the needs of their particular application. Perhaps there could be options likeautoRender
,autoCompile
,autoSort
that default to true, but that the application could set to false if it wants more control.
- The structure of having the xform node cores try to maintain their own separate hierarchy in the modelXform stack is problematic. The key issue that the xform core hierarchy requires knowledge of which xform nodes are going to be compiled, and that knowledge doesn't exist in the cores themselves. Maintaining integrity of this structure when there are a lot of dynamic scene graph updates required the creation of the fairly-ugly
_connect
and_disconnect
methods that have to do scene graph traversals whenever any part of the scene graph is connected or disconnected to alert the xform cores that they will be re-compiled.