Skip to content
Tarek Sherif edited this page Jun 11, 2016 · 9 revisions

Some ideas for SceneJS V5.

Functionality to remove

Some functions in SceneJS turned out to be best done at the app layer, and should be removed from SceneJS:

API changes

  • 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.

Optimizations

  • Schedule texture/geometry/matrix updates (and maybe scene recompilations) to a task queue

Manual Mode

  • 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 like autoRender, autoCompile, autoSort that default to true, but that the application could set to false if it wants more control.
Clone this wiki locally