Class: PoseRenderer
@geenee/bodyrenderers-three.PoseRenderer
Abstract renderer for @geenee/bodyprocessors!PoseProcessor
Specializes the ThreeRenderer generic for @geenee/bodyprocessors!PoseResult. This is abstract renderer that doesn't implement any logic.
Hierarchy
-
↳
PoseRenderer
Constructors
constructor
• new PoseRenderer(container
, mode?
, mirror?
)
Constructor
Parameters
Name | Type | Description |
---|---|---|
container | HTMLElement | Container of @geenee/armature!ResponsiveCanvas |
mode? | CanvasMode | Fitting mode |
mirror? | boolean | Mirror the output |
Inherited from
Properties
camera
• Protected
camera: Camera
Camera instance
Inherited from
cameraAngle
• Protected
cameraAngle: number
Camera vertical angle in radians
Inherited from
cameraRatio
• Protected
cameraRatio: number
Camera aspect ratio
Inherited from
canvas
• canvas: ResponsiveCanvas
Responsive canvas
Inherited from
current
• current: null
| WebGLTexture
Current image texture
Inherited from
input
• Optional
input: ImageTexture
Input image texture
Inherited from
loaded
• Protected
loaded: boolean
Loaded state
Inherited from
padCtx
• Protected
padCtx: [null
| CanvasRenderingContext2D
, null
| CanvasRenderingContext2D
]
Drawing context of padding canvases
Inherited from
plugins
• Protected
plugins: Plugin
<PoseResult
>[]
Attached plugins
Inherited from
renderer
• Protected
renderer: WebGLRenderer
Rendering engine
Inherited from
scene
• Optional
scene: Scene
Renderer scene
Inherited from
setupPadding
• Protected
setupPadding: () => void
Type declaration
▸ (): void
Setup padding canvases
Callback sets up size of padding canvases.
Returns
void
Inherited from
shader
• Protected
Optional
shader: ShaderProgram
Rendering shader
Inherited from
shaderCtx
• shaderCtx: null
| WebGL2RenderingContext
Context of the video canvas layer
Inherited from
videoRatio
• Protected
videoRatio: number
Aspect ratio of input video
Inherited from
videoSize
• Protected
videoSize: Size
Resolution of input video
Inherited from
Methods
addListener
▸ addListener<E
>(event
, listener
): PoseRenderer
Adds the listener function to the end of the listeners array
Type parameters
Name | Type |
---|---|
E | extends keyof RendererEvents |
Parameters
Name | Type | Description |
---|---|---|
event | E | The name of the event |
listener | RendererEvents [E ] | The callback function |
Returns
This EventEmitter
Inherited from
addPlugin
▸ addPlugin(plugin
): Promise
<void
>
Add render plugin
Initializes the plugin if it's not loaded yet but renderer is ready. Renderer takes ownership of the plugin instance meaning it will release it when plugin is detached or renderer is disposed itself.
Parameters
Name | Type |
---|---|
plugin | Plugin <PoseResult > |
Returns
Promise
<void
>
Inherited from
dispose
▸ dispose(): void
Dispose renderer object
Extended to dispose scene object.
Returns
void
Inherited from
disposeObject
▸ Protected
disposeObject(object
): void
Dispose object
Helper method to remove object from the scene and recursively dispose it with all its children and allocated resources like materials and textures.
Parameters
Name | Type | Description |
---|---|---|
object | Object3D <Object3DEventMap > | Object to dispose |
Returns
void
Inherited from
emit
▸ emit<E
>(event
, ...args
): boolean
Synchronously calls each of the listeners registered for the event
Type parameters
Name | Type |
---|---|
E | extends keyof RendererEvents |
Parameters
Name | Type | Description |
---|---|---|
event | E | The name of the event |
...args | Args <RendererEvents [E ]> | Arguments passed to the listeners |
Returns
boolean
True if the event had listeners, False otherwise
Inherited from
eventNames
▸ eventNames(): (string
| symbol
)[]
List of emitter's events
Returns
(string
| symbol
)[]
List of emitter's events