SceneJS 3.0 is an open-source 3D engine on WebGL that's geared towards rendering large numbers of individually arcticulated and pickable objects as required for high-detail visualisation applications.
You can hotlink to these binaries and they will dynamically load SceneJS plugins on-demand from this repository as required (see Plugins section below for more info on plugins).
Also hotlinkable are a bunch of helper utilities:
- OrbitControl - Mouse camera orbit helper
- PickControl - Scene picking helper
- Examples - Live examples are now the main usage documentation. In the examples page, select topic tags and you'll get a list of examples that have those tags. Most of them are not particularly exciting, but aim to show particular use cases. Many of them do the same things, but in slightly different ways. Log an issue if there's something missing there.
Some examples for various topic tags:
-
optimization - Optimization
-
texturing - Texturing
-
lighting - Lighting
-
geometry - Geometry
-
modelTransform, viewTransform, projectionTransform - Transformation
-
Class Docs - Documentation in progress for the SceneJS class API, which is the core implementation beneath the JSON API. You can use this to build scenes programmatically, instead of declaratively with JSON as shown in the examples. You would also use this API when when manipulating nodes (even they were defined with JSON).
SceneJS now uses plugins for non-core things like geometry primitives (box, teapot, text etc.), fancy texture functionality (video etc) and so on.
Plugins are used from within node definitions, as shown below:
myNode.addNode({
type:"geometry",
id: "myGeometry",
source:{
type:"sphere",
latitudeBands : 30,
longitudeBands : 30,
radius : 2
}
});
This geometry node will create its sphere geometry with the help of the "sphere" plugin. Geometry (and texture) plugins function as factories, hence the "source" attribute on the geometry node definition.
By default, SceneJS is hardwired to automatically download plugins from a directory in this repository. This means you can just hotlink to the SceneJS core library downloads and they will download the plugins automatically as you need them. That's nice for putting SceneJS examples on code sharing sites like jsFiddle.
If you'd rather serve the plugins yourself, instead of relying on the avialability of this repo, then grab a copy of the plugins and configure SceneJS to load them from your location:
SceneJS.configure({
pluginPath: "./foo/myPluginsDir"
});
SceneJS requires nodejs. To build, simply:
node build.js
Then the binaries will appear in ./build
.