1681-engine / index / RigView
Class: RigView ​
Defined in: src/rig/RigView.ts:82
A character drawn from a rig pose: give it a pose each frame (setPose, from a PosePlayer) and it places every part. The container's origin is the character's feet (bottom centre of the rig's frame); facing mirrors it.
Extends ​
Container
Constructors ​
Constructor ​
new RigView(
def,
skin?,
textures?,
options?
): RigView;Defined in: src/rig/RigView.ts:93
Parameters ​
| Parameter | Type |
|---|---|
def | RigDef |
skin | RigSkin |
textures? | TextureRegistry |
options? | RigViewOptions |
Returns ​
RigView
Overrides ​
Container.constructorAccessors ​
facing ​
Get Signature ​
get facing(): -1 | 1;Defined in: src/rig/RigView.ts:132
Returns ​
-1 | 1
Set Signature ​
set facing(dir): void;Defined in: src/rig/RigView.ts:128
1 faces right, -1 faces left.
Parameters ​
| Parameter | Type |
|---|---|
dir | -1 | 1 |
Returns ​
void
lastJoints ​
Get Signature ​
get lastJoints(): Joints | null;Defined in: src/rig/RigView.ts:137
The joints of the last pose, in grid px of the rig's frame (for attaching a held item, an effect).
Returns ​
Joints | null
Methods ​
destroy() ​
destroy(options?): void;Defined in: src/rig/RigView.ts:156
Removes all internal references and listeners as well as removes children from the display list. Do not use a Container after calling destroy.
Parameters ​
| Parameter | Type | Description |
|---|---|---|
options? | DestroyOptions | Options parameter. A boolean will act as if all options have been set to that value |
Returns ​
void
Example ​
container.destroy();
container.destroy(true);
container.destroy({ children: true });
container.destroy({ children: true, texture: true, textureSource: true });Overrides ​
Container.destroyjointInParent() ​
jointInParent(name): RigPoint | null;Defined in: src/rig/RigView.ts:142
Where a joint of the last pose is in this view's parent, in world px.
Parameters ​
| Parameter | Type |
|---|---|
name | | "head" | "elbowF" | "wristF" | "elbowB" | "wristB" | "kneeF" | "ankleF" | "kneeB" | "ankleB" | "chest" | "shoulderF" | "shoulderB" | "hipF" | "hipB" |
Returns ​
RigPoint | null
setPose() ​
setPose(pose): this;Defined in: src/rig/RigView.ts:148
Parameters ​
| Parameter | Type |
|---|---|
pose | RigPose |
Returns ​
this