SceneJS is an extensible WebGL-based engine for high-detail 3D visualisation using JavaScript.

It was created by Lindsay Kay and is free for use under an open-source license.

Features in V3.2

Quick Start

First, include the SceneJS library in the <head> tag of your web page:

<script src="http://scenejs.org/api/latest/scenejs.js"></script>

Then build a scene. We'll make a spinning blue teapot:

var scene = SceneJS.createScene({
    nodes:[
        {
            type:"material",
            color: { r: 0.3, g: 0.3, b: 1.0 },

            nodes:[
                {
                    type: "rotate",
                    id: "myRotate",
                    y: 1.0,
                    angle: 0,

                    nodes: [
                        {
                            type:"prims/teapot"
                        }
                    ]
                }
            ]
        }
    ]
});

And voilĂ , one blue teapot:



Now let's start the teapot spinning:

scene.getNode("myRotate", function(myRotate) {

    var angle = 0;

    scene.on("tick",
        function() {
            myRotate.setAngle(angle += 0.5);
        });
});
        

Run this example

Plugins

To keep the core library small, SceneJS dynamically loads it's non-core functionality from a directory of plugins. In the example above, the prims/teapot node is a custom node type instantiated from a prims/teapot plugin, which SceneJS loaded on-demand from the plugins directory within its repository on GitHub.

If you'd rather serve the plugins yourself, then just copy that directory to your server and configure SceneJS to load them from there, like this:

SceneJS.setConfigs({
    pluginPath: "./foo/myPluginsDir"
});
            

Want to write your own plugins? Excellent, please read more about the plugin API here.

Fork me on GitHub