When migrating a project from Threeagent v0.x to v1.x, there are a few changes to the API that we'll need to consider.
In v0.x, the threeagent.core/render function returned a JavaScript object that captured the
Threeagent context. This object is no longer returned, as it leaked implementation details that
we should not depend on.
In v1.x, the threeagent.core/render function returns a Clojure map with these keys:
:threejs-renderer the ThreeJS Renderer instance that Threeagent created:threejs-scene the ThreeJS Scene instance that Threeagent created:threejs-default-camera The default ThreeJS Camera instance that Threeagent created. This is only useful
if we don't add our own camera to the scene with the :perspective-camera or :orthographic-camera entity
types.:canvas the canvas DOM element used by Threeagent. This will be a new canvas, if a canvas DOM element was
not provided to the function call.In v0.x the threeagent.macros/defcomponent macro was used to register new entity types. In v1.x, this has
been replaced by the threeagent.entity/IEntity protocol, which should be implemented and passed into the
threeagent.core/render options parameter.
Please see this page for more information.
Can you improve this documentation?Edit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs | 
| ← | Move to previous article | 
| → | Move to next article | 
| Ctrl+/ | Jump to the search field |