Optional
canvas: string | WebGL2RenderingContext | HTMLCanvasElementThe canvas element identifier, or canvas element, or WebGL rendering context.
Allows the context to be configured.
Optional
dom: DocumentThe document object model that contains the canvas.
The canvas element associated with the WebGLRenderingContext.
The context identifier that was used to get the WebGL rendering context.
The underlying WebGL rendering context.
Specifies the clear value for the depth buffer. This specifies what depth value to use when calling the clear() method. The value is clamped between 0 and 1.
Specifies the depth value used when the depth buffer is cleared. The default value is 1.
Computes the coordinates of a point in the image cube corresponding to device coordinates.
The x-coordinate of the device event.
The y-coordinate of the device event.
The optional value to use as the resulting depth coordinate.
Disables the specified WebGL capability.
Enables the specified WebGL capability.
Protected
setThis method is for use within constructors.
Immediately after a call to the super class constructor, make a call to setLoggingName. This will have the effect of refining the name used for reporting reference counts.
This method has the secondary purpose of enabling a tally of the number of classes in the constructor chain. This enables the runtime architecture to verify that destructor chains are consistent with constructor chains, which is a good practice for cleaning up resources.
Notice that this method is intentionally protected to discourage it from being called outside of the constructor.
This will usually be set to the name of the class.
Initializes the WebGLRenderingContext
for the specified HTMLCanvasElement
.
The HTML canvas element or canvas element identifier.
Optional
dom: DocumentThe document object model that contains the canvas identifier.
A wrapper around an HTMLCanvasElement providing access to the WebGL rendering context and notifications of context loss and restore. An instance of the Engine will usually be a required parameter for any consumer of WebGL resources.