Skip to main content

Class: PosePlugin

@geenee/bodyrenderers-three.PosePlugin

Abstract plugin for PoseRenderer

Specializes the ThreePlugin generic for PoseResult. This's abstract plugin that doesn't implement any logic.

Hierarchy

Constructors

constructor

new PosePlugin()

Inherited from

ThreePlugin.constructor

Properties

loaded

loaded: boolean

Loaded state

Inherited from

ThreePlugin.loaded


scene

Protected Optional scene: Scene

Inherited from

ThreePlugin.scene

Methods

dispose

dispose(): void

Dispose render plugin

Returns

void

Inherited from

ThreePlugin.dispose


load

load(scene?): Promise<void>

Initialize plugin

Prepares or modifies the attached node if required. Reference to the scene object is cached and used by plugin on update() and unload(). You need to reload plugin if you want to change scene it's attached to. Overridden by derived classes for particular task.

Parameters

NameTypeDescription
scene?SceneScene this plugin is attached to

Returns

Promise<void>

Promise resolving when initialization is finished

Inherited from

ThreePlugin.load


unload

unload(): void

Reset plugin

Releases all resources/instances created in load(). Overridden by derived classes for particular task.

Returns

void

Inherited from

ThreePlugin.unload


update

update(result, stream): Promise<void>

Update the scene node

Main method implementing the logic of the plugin. Updates the node according to provided results. Overridden by derived classes for particular task.

Parameters

NameTypeDescription
resultPoseResultResults of video processing
streamHTMLCanvasElementCaptured video frame

Returns

Promise<void>

Promise resolving when update is finished

Inherited from

ThreePlugin.update