Two.Element
Extends: Two.Events
The foundational object for the Two.js scenegraph.
fromObject
Two.Element.fromObject
Returns: Two.Element
| Argument | Description |
|---|---|
| obj | Object notation of a Two.Element to create a new instance |
Create a new Two.Element from an object notation of a Two.Element.
renderer
Two.Element.renderer
Object access to store relevant renderer specific variables. Warning: manipulating this object can create unintended consequences.
className
Two.Element.className
A class to be applied to the element to be compatible with CSS styling.
classList
Two.Element.classList
A list of class strings stored if imported / interpreted from an SVG element.
flagReset
Two.Element.flagReset
Called internally by Two.js's renderer to reset all flags. Ensures that only properties that change are updated before being sent to the renderer.
dispose
Two.Element.dispose
Release the element's renderer object and detach any events. This cleans up renderer-specific resources and unbinds all event listeners.