Skip to Content

@revideo/core


@revideo/core / scenes / Inspectable

Interface: Inspectable

Defined in: scenes/Inspectable.ts:25 

Scenes can implement this interface to make their components inspectable through the UI.

Methods

drawOverlay()

drawOverlay(element, matrix, context): void

Defined in: scenes/Inspectable.ts:67 

Draw an overlay for the inspected element.

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.

Returns

void

Remarks

This method can be used to overlay additional information about an element on top of the animation.


inspectAttributes()

inspectAttributes(element): InspectedAttributes | null

Defined in: scenes/Inspectable.ts:54 

Return the attributes of the inspected element.

Parameters

element

unknown

The element to inspect.

Returns

InspectedAttributes | null

Remarks

This information will be displayed in the “Properties” panel.


inspectPosition()

inspectPosition(x, y): unknown

Defined in: scenes/Inspectable.ts:32 

Get a possible element to inspect at a given position.

Parameters

x

number

The x coordinate.

y

number

The y coordinate.

Returns

unknown


transformMousePosition()

transformMousePosition(x, y): Vector2 | null

Defined in: scenes/Inspectable.ts:79 

Transform the absolute mouse coordinates into the scene’s coordinate system.

Parameters

x

number

The x coordinate.

y

number

The y coordinate.

Returns

Vector2 | null


validateInspection()

validateInspection(element): unknown

Defined in: scenes/Inspectable.ts:44 

Check if the inspected element is still valid.

Parameters

element

unknown

The element to validate.

Returns

unknown

Remarks

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.

© 2026 Haven Technologies, Inc.
Interface: Inspectable – Revideo