Overview
There are a fixed set of objects in ECMAScript, each of which have a fixed set of properties (i.e. values) and methods (i.e. functions). For all object types except Math, there are functions to create an instance of the object. The supported set of objects are:
- X3DCanvasElement
- Browser Services
- Scene Services
- Field Services and Objects
- Route Services
- Prototype Services
- Constants Services
X3DCanvasElement
The X3DCanvasElement, <x3d-canvas>, is the main element that displays the X3D content. It defines some functions to be used with this object.
Instance Creation Method(s)
An <x3d-canvas> can be created with the document.createElement
function to get a reference to an X3DCanvasElement.
1
const canvas = document .createElement ("x3d-canvas")
Properties
browser
A reference to the X3DBrowser object that is associated with this element.
Methods
MediaStream captureStream ([Number frameRate])
See HTMLCanvasElement.captureStream().
Blob toBlob (Function callback, [String type, Number quality])
See HTMLCanvasElement.toBlob().