PosePlugin
Abstract plugin for PoseRenderer
Specializes the BabylonPlugin generic for @geenee/bodyprocessors!PoseResult. This’s abstract plugin that doesn’t implement any logic.
Extends
Section titled “Extends”Extended by
Section titled “Extended by”Constructors
Section titled “Constructors”Constructor
Section titled “Constructor”new PosePlugin():
PosePlugin
Constructor
Returns
Section titled “Returns”PosePlugin
Inherited from
Section titled “Inherited from”Properties
Section titled “Properties”loaded
Section titled “loaded”loaded:
boolean
Loaded state
Inherited from
Section titled “Inherited from”ordinal
Section titled “ordinal”ordinal:
number
Ordinal number
Inherited from
Section titled “Inherited from”renderer?
Section titled “renderer?”
protected
optional
renderer:Renderer
<PoseResult
>
Renderer loaded the plugin
Inherited from
Section titled “Inherited from”scene?
Section titled “scene?”
protected
optional
scene:Scene
Reference to a scene instance
Inherited from
Section titled “Inherited from”Methods
Section titled “Methods”dispose()
Section titled “dispose()”dispose():
void
Dispose video plugin
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”load()
Section titled “load()”load(
renderer
):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.
Parameters
Section titled “Parameters”renderer
Section titled “renderer”Renderer this plugin is attached to
Returns
Section titled “Returns”Promise
<void
>
Promise resolving when initialization is finished
Inherited from
Section titled “Inherited from”setupCamera()
Section titled “setupCamera()”setupCamera(
ratio
,angle
):void
Set camera parameters
Could be overridden to adjust plugin’s pipeline.
Parameters
Section titled “Parameters”number
Aspect ration of input video
number
Vertical field of view in radians
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”setupVideo()
Section titled “setupVideo()”setupVideo(
size
):void
Set video size
Could be overridden to adjust plugin’s pipeline.
Parameters
Section titled “Parameters”Resolution of input video
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”unload()
Section titled “unload()”unload():
void
Reset plugin
Releases all resources allocated in load(). Deletes cached reference to the scene object.
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”update()
Section titled “update()”update(
result
,stream
):Promise
<void
>
Update
Main method implementing the logic of the plugin. Overridden by derived classes for particular task.
Parameters
Section titled “Parameters”result
Section titled “result”Results of video processing
stream
Section titled “stream”HTMLCanvasElement
Captured video frame
Returns
Section titled “Returns”Promise
<void
>
Promise resolving when update is finished