Module: @geenee/bodyrenderers-common
Renderer
@geenee/armature!Renderer is the core visualization and logical part of any application. It's attached to the @geenee/armature!Engine. Basically, renders define two methods load() and update(). The first one is used to initialize assets and prepare the scene (lightning, environment map). The second is used to update the scene according to results of video processing. This's where all the logic happens. Renderers can be extended with plugins. Plugins do simple rendering task, for example add object to that follows the head or render avatar overlay.
This module defines common utilities, types, and helpers used by renderers. Ready-made renderers and plugins are provided by the following packages:
Classes
Interfaces
Type Aliases
BoneName
Ƭ BoneName: typeof BoneList
[number
]
Union type of skeleton bone name
SkeletonMap
Ƭ SkeletonMap<T
>: { [key in BoneName]: T }
Map of skeleton bones
Object with properties corresponding to each bone of skeleton.
Type parameters
Name | Description |
---|---|
T | Type of map values |
Variables
BoneList
• Const
BoneList: readonly ["hips"
, "spine"
, "spine1"
, "spine2"
, "neck"
, "head"
, "headEnd"
, "shoulderL"
, "shoulderR"
, "armL"
, "armR"
, "foreArmL"
, "foreArmR"
, "handL"
, "handR"
, "upLegL"
, "upLegR"
, "legL"
, "legR"
, "footL"
, "footR"
, "toeL"
, "toeR"
]
List of skeleton bone names
Functions
mapSkeleton
▸ mapSkeleton<T
>(mapFn
): SkeletonMap
<T
>
Mapping of skeleton
Creates a map object where values of properties corresponding to each bone of skeleton are evaluated by provided mapping function.
Type parameters
Name | Description |
---|---|
T | Type of map object values |
Parameters
Name | Type | Description |
---|---|---|
mapFn | (b : "hips" | "spine" | "spine1" | "spine2" | "neck" | "head" | "headEnd" | "shoulderL" | "shoulderR" | "armL" | "armR" | "foreArmL" | "foreArmR" | "handL" | "handR" | "upLegL" | "upLegR" | "legL" | "legR" | "footL" | "footR" | "toeL" | "toeR" ) => T | Function mapping bone to a value |
Returns
SkeletonMap
<T
>
Map object of skeleton bones