Import
Example
Notes
- The container must have a width and a height.
- The constructor starts the render loop. Do not add a second loop.
- Start the geometry kernel separately, before you create elements.
dispose()stops the loop and removes the canvas.new OpenThree(container, callback, { renderOnDemand: true })draws a frame only when something changes: a camera move until it comes to rest, a resize, an object added to or removed from the scene, new kernel geometry, and a change of the watermark, checked once a second. The callback then runs only on those frames. CallrequestRender()after any other change. The default isfalse: a frame on every animation frame.
Constructor
Properties
Methods
generateTheme
toggleTheme
setup
toggleGrid
hexToRgb
captureView
camera to a PNG data-URL, off-screen at an arbitrary resolution.
refineAnalyticView
deflection metres.
dispose
requestRender
renderOnDemand is on; else nothing.
animate
OpenThreeError
The refusal of an OpenThree call;failed lists the bodies of this view that failed.