DOMObject3D constructor
GPUCurtainsRenderer object or GPUCurtains class object used to create this DOMObject3D
HTMLElement or string representing an HTMLElement selector used to scale and position the DOMObject3D
parameters used to create this DOMObject3D
Children Object3D in the scene graph, used to compute their own world matrix
Whether at least one of this Object3D matrix needs an update.
Camera object used to compute model view and model view projection matrices
Matrices object of the ProjectedObject3D
GPUCurtainsRenderer used to create this DOMObject3D
Defines the DOMObject3D bounding boxes in both document and world spaces
DOMElement used to track the given HTMLElement size change
Whether to automatically update the DOMObject3D document and world positions on scroll
Transformation object of the DOMObject3D
Private
#DOMObjectPrivate vector used to keep track of the actual .world | world position accounting the .document | additional document translation converted into world space
Private
#DOMObjectPrivate vector used to keep track of the actual DOMObject3D world scale accounting the .world | DOMObject3D world size
Private
#DOMObjectPrivate number representing the scale ratio of the DOMObject3D along Z axis to apply. Since it can be difficult to guess the most accurate scale along the Z axis of an object mapped to 2D coordinates, this helps with adjusting the scale along the Z axis.
Helper bounding box used to map the 3D object onto the 2D DOM element.
function assigned to the onAfterDOMElementResize callback
function assigned to the onAfterDOMElementResize callback
Get our quaternion
Set our quaternion
new quaternion
Get our model matrix
Set our model matrix
new model matrix
Get our world matrix
Set our world matrix
new world matrix
Get our model view matrix
Set our model view matrix
Get our camera view matrix
Get our camera projection matrix
Get our model view projection matrix
Set our model view projection matrix
Get our normal matrix
Set our normal matrix
new normal matrix
Get the DOM Element bounding rectangle
Get the DOM element scale in world space
Get the DOMObject3D scale in world space (accounting for scale)
Get the DOMObject3D position in world space
Get the DOMObject3D transform origin relative to the DOMObject3D
Set the DOMObject3D transform origin relative to the DOMObject3D
new transform origin
Get the DOMObject3D transform origin in world space
Set the DOMObject3D transform origin in world space
new world space transform origin
Set DOMObjectDepthScaleRatio. Since it can be difficult to guess the most accurate scale along the Z axis of an object mapped to 2D coordinates, this helps with adjusting the scale along the Z axis.
depth scale ratio value to use
Set our model matrix shouldUpdate flag to true (tell it to update)
Update our model matrix
Set the DOM Element
HTMLElement or string representing an HTMLElement selector to use
Update size and position when the DOM Element position changed
Reset the DOMElement
the new HTMLElement or string representing an HTMLElement selector to use
Resize the DOMObject3D
Set our transforms properties and onChange vector callbacks
Set the .shouldUpdate | size shouldUpdate flag to true to compute the new sizes before next matrices calculations.
Update the DOMObject3D sizes and position
Compute the DOMObject3D world position using its world position and document translation converted to world space
Apply the transform origin and set the DOMObject3D world transform origin
Update the model matrix accounting the DOMObject3D world position and DOMObject3D world scale
Compute the world sizes
Compute and set the .world | world size and set the DOMObject3D world transform origin
Set the worldScale accounting for scaled world size and DOMObjectDepthScaleRatio
Set the DOMObject3D world transform origin and tell the matrices to update
Update the DOM Element scroll position
last scroll delta values
Callback to execute just after the domElement has been resized.
callback to run just after domElement has been resized
Destroy our DOMObject3D
This special kind of ProjectedObject3D uses an HTMLElement to convert the corresponding X and Y scale and position relative to the 3D world space.
Internally used by the DOMMesh and Plane, but can also be used as any Mesh parent to map it with an HTMLElement size and position values.