Inspectable
interface Inspectable
Scenes can implement this interface to make their components inspectable through the UI.
Methods
drawOverlay
public drawOverlayelement: unknownmatrix: DOMMatrixcontext: CanvasRenderingContext2D: void
Draw an overlay for the inspected element.
This method can be used to overlay additional information about an element on top of the animation.
Parameters
element: unknown
The element for which to draw an overlay.
matrix: DOMMatrix
A local-to-screen matrix.
context: CanvasRenderingContext2D
The context to draw with.
inspectAttributes
public inspectAttributeselement: unknown: nullInspectedAttributes
Return the attributes of the inspected element.
This information will be displayed in the "Properties" panel.
Parameters
element: unknown
The element to inspect.
inspectPosition
Get a possible element to inspect at a given position.
Parameters
transformMousePosition
Transform the absolute mouse coordinates into the scene's coordinate system.
Parameters
validateInspection
public validateInspectionelement: unknown: unknown
Check if the inspected element is still valid.
If a scene destroys and recreates its components upon every reset, the reference may no longer be valid. Even though the component is still present. This method should check that and return a new reference.
Parameters
element: unknown
The element to validate.