Scene Composed using the Class API
SceneJS has had an object-oriented core API since V0.7.3. Layered on top of that is a thin layer of factory functions, and on top of both of those is a JSON API. Therefore, you have the choice of using the framework in either an object-oriented or functional style, or defining scenes in a purely declarative format. The examples in the API documentation are in the object-oriented style, while many of the examples here use the factory functions for brevity.
Most of this scene is constructed through the composition of objects using the object-oriented API. Note that towards the end of this example we start using the original functional API again, to show how they can be mixed.