Post

ECMAScript Object and Function Definitions

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:

See Also

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")

Attributes

The X3DCanvasElement defines several attributes that are documented here.

Properties

browser

A reference to the X3DBrowser object that is associated with this element.

Methods

MediaStream captureStream ([Number frameRate])

See HTMLCanvasElement.captureStream().

void toBlob (Function callback, [String type, Number quality])

See HTMLCanvasElement.toBlob().

String toDataURL ([String type, Number encoderOptions])

See HTMLCanvasElement.toDataURL().

This post is licensed under CC BY 4.0 by the author.