Skip to main content

OverlayInterface

@3dverse/livelink v0.8.10


@3dverse/livelink / OverlayInterface

Interface: OverlayInterface

Defined in: livelink.js/sources/rendering/surfaces/OverlayInterface.ts:12

Interface for rendering overlays.

An overlay is a surface that is drawn on top of the main rendering surface, and composited with the frame rendered by the server.

See

For a Three.js overlay implementation, see: https://www.npmjs.com/package/@3dverse/livelink-three

Methods

draw()

draw(params): null | OffscreenCanvas

Defined in: livelink.js/sources/rendering/surfaces/OverlayInterface.ts:22

Draws the overlay to the output canvas if provided. If no output canvas is provided, the overlay should use its own way to render itself.

Parameters

params
output_canvas

null | OffscreenCanvas

The optional canvas to draw the overlay to.

Returns

null | OffscreenCanvas

The optional canvas containing the overlay.


resize()

resize(__namedParameters): void

Defined in: livelink.js/sources/rendering/surfaces/OverlayInterface.ts:27

Resizes the overlay.

Parameters

__namedParameters
width

number

height

number

Returns

void


release()

release(): void

Defined in: livelink.js/sources/rendering/surfaces/OverlayInterface.ts:32

Releases the resources associated with the overlay.

Returns

void