Class ArmatureDraw

java.lang.Object
net.ixdarklord.coolcatcanvas.api.client.armature.ArmatureDraw

public final class ArmatureDraw extends Object
Draws a posed armature. CoolCatLib's armature renderers use it; call it yourself to draw an armature inside a renderer of your own. The pose stack should be where the model's origin goes (an entity's feet, a block's base centre), turned the way the model faces.
ArmatureFrame frame = animator.update(clock, partialTick, modelToWorld);
ArmatureDraw.submit(frame, poseStack, collector, ArmatureDraw.Style.lit(light));
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    How an armature is drawn this time: light, colour, outline and so on.
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.joml.Matrix4f
    The matrix from model pixels to the pose stack's space for an armature: its scale (16 pixels to a block, and its own .armature.json scale) and offset.
    static void
    submit(ArmatureFrame frame, com.mojang.blaze3d.vertex.PoseStack poseStack, net.minecraft.client.renderer.SubmitNodeCollector collector, ArmatureDraw.Style style)
     

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • modelTransform

      public static org.joml.Matrix4f modelTransform(BakedArmature armature)
      The matrix from model pixels to the pose stack's space for an armature: its scale (16 pixels to a block, and its own .armature.json scale) and offset. Renderers multiply their placement by this to get a frame's model-to-world.
    • submit

      public static void submit(ArmatureFrame frame, com.mojang.blaze3d.vertex.PoseStack poseStack, net.minecraft.client.renderer.SubmitNodeCollector collector, ArmatureDraw.Style style)