DOMSelfDrawable¶
Overview¶
DOM drawable for a single painted node.
Subtypes should expose the following API that is used by DOMSelfDrawable: - drawable.domElement {HTMLElement} - The primary DOM element that will get transformed and added. - drawable.updateDOM() {function} - Called with no arguments in order to update the domElement's view.
TODO: make abstract subtype methods for improved documentation https://github.com/phetsims/scenery/issues/1581
@author Jonathan Olson <jonathan.olson@colorado.edu>
Class DOMSelfDrawable¶
Instance Methods¶
initialize( renderer, instance )¶
@param {number} renderer @param {Instance} instance @returns {DOMSelfDrawable}
markTransformDirty()¶
getTransformMatrix()¶
Called from the Node, probably during updateDOM
@returns {Matrix3}
update()¶
Updates the DOM appearance of this drawable (whether by preparing/calling draw calls, DOM element updates, etc.) @public @override
@returns {boolean} - Whether the update should continue (if false, further updates in supertype steps should not be done).
updateDOM()¶
Called to update the visual appearance of our domElement @protected @abstract
updateSelfVisibility()¶
dispose()¶
Releases references @public @override
Source Code¶
See the source for DOMSelfDrawable.js in the scenery repository.