Class ArmaturePose
java.lang.Object
net.ixdarklord.coolcatcanvas.api.client.armature.ArmaturePose
How far each joint is moved from its rest this frame: what the animation layers made of it, open to
modifiers before it is drawn. Values are in the units of Blockbench's animation panel:
degrees and pixels, with Bedrock's axes, so
rotate("head", 20, 0, 0) does what a rotation keyframe of
[20, 0, 0] would. Joints are named or given by index; a name the armature doesn't have is ignored.-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionarmature()Bends a joint along its length (a limb at its middle: an elbow, a knee), in degrees, on top of what the clips do.Hides a joint and everything on it for this frame only (seeAnimator.hide(String)to keep it hidden).voidread(int joint, float[] out) One joint's values in the model's own axes, for code that applies a pose elsewhere (CoolCatLib's vanilla models do):out[0..2]rotation in radians,[3..5]position in pixels,[6..8]scale,[9..10]bend amount and direction in radians,[12..15]how much override layers took over rotation, position, scale and bend (0 to 1),[16]1 if hidden.rotate(int joint, float x, float y, float z) Turns a joint further, in degrees.float[]A joint's turn from rest, in degrees, as[x, y, z].scale(int joint, float x, float y, float z) Scales a joint (and everything on it) further.setRotation(String joint, float x, float y, float z) Replaces whatever turn the animation gave a joint, in degrees.translate(int joint, float x, float y, float z) Moves a joint (and everything on it), in pixels.
-
Field Details
-
VALUES
-
-
Method Details
-
read
public void read(int joint, float[] out) One joint's values in the model's own axes, for code that applies a pose elsewhere (CoolCatLib's vanilla models do):out[0..2]rotation in radians,[3..5]position in pixels,[6..8]scale,[9..10]bend amount and direction in radians,[12..15]how much override layers took over rotation, position, scale and bend (0 to 1),[16]1 if hidden. Blockbench's axes: Y up, facing north. -
bend
Bends a joint along its length (a limb at its middle: an elbow, a knee), in degrees, on top of what the clips do.- Parameters:
direction- which way round the limb it bends, in degrees: 0 forward, 90 to its left, 180 back
-
armature
-
rotate
Turns a joint further, in degrees. -
rotate
-
setRotation
Replaces whatever turn the animation gave a joint, in degrees. -
rotation
A joint's turn from rest, in degrees, as[x, y, z]. -
translate
Moves a joint (and everything on it), in pixels. -
translate
-
scale
Scales a joint (and everything on it) further. -
scale
-
scale
-
hide
Hides a joint and everything on it for this frame only (seeAnimator.hide(String)to keep it hidden).
-