Skip to content

@relu-interactives/spatial-ecs


@relu-interactives/spatial-ecs / index / VideoSystem

Class: VideoSystem

Defined in: systems/VideoSystem.ts:63

Reconciles VideoComponent state with the underlying HTML video element and THREE.js mesh/material each frame.

Playback — drives play(), pause(), and stop (pause + seek to 0) on the HTML <video> element based on the isPlaying / isPaused flags set by VideoComponent.play(), .pause(), and .stop().

Option sync — detects changes to loop, volume, width, height, and green-screen shader uniforms (backgroundColor, similarity, smoothness, spill) and applies them live without a scene reload.

Only active in preview mode (isEditor: true makes every update a no-op so the editor is unaffected).

Implements

Constructors

Constructor

ts
new VideoSystem(__namedParameters?): VideoSystem;

Defined in: systems/VideoSystem.ts:70

Parameters

ParameterType
__namedParameters{ isEditor?: boolean; }
__namedParameters.isEditor?boolean

Returns

VideoSystem

Methods

update()

ts
update(world, _deltaTime): void;

Defined in: systems/VideoSystem.ts:74

Parameters

ParameterType
worldWorld
_deltaTimenumber

Returns

void

Implementation of

EcsSystem.update


dispose()

ts
dispose(_world): void;

Defined in: systems/VideoSystem.ts:218

Parameters

ParameterType
_worldWorld

Returns

void

Implementation of

EcsSystem.dispose