Class ArmatureTrail

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

public final class ArmatureTrail extends Object
A glowing ribbon left behind by a point of an armature as it moves: a sword's swing, a comet's tail, a spirit's wake. It follows the point every tick while active, and shrinks away when not. Drawn as a world effect (see WorldVfx): unlit, over the scene, fading where it meets solid things.
animator.trail("blade_tip")
        .length(8)
        .width(Curve.of(0.35F, 0.0F))
        .colors(0xFFFFF2B0, 0x00FF6A00)
        .when(ctx -> animator.layer("action").isPlaying("slash"));
Items in slots and hands have no place in the world, so they leave no trail.
  • Method Details

    • point

      public String point()
    • length

      public ArmatureTrail length(int ticks)
      How many ticks of path it keeps; 10 by default.
    • material

      public ArmatureTrail material(VfxMaterial material)
    • width

      public ArmatureTrail width(Curve width)
      Its width in blocks along its length, from the point (0) to the end (1).
    • colors

      public ArmatureTrail colors(int head, int tail)
      ARGB colours at the point and at the end; a clear end fades it out.
    • when

      public ArmatureTrail when(Predicate<ArmatureContext> active)
      Draws it only while this holds, asked every tick; always by default.
    • fresh

      public boolean fresh(long gameTime)
      Whether it was fed within the last two ticks: one off screen (or gone) is not drawn standing still.
    • trail

      public Trail trail()
    • material

      public VfxMaterial material()
    • width

      public Curve width()
    • headColor

      public int headColor()
    • tailColor

      public int tailColor()