Class ArmatureEmitter

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

public final class ArmatureEmitter extends Object
Effect particles (ParticleSpec) pouring from a point of an armature: fire from a dragon's mouth, sparks from a forge's chimney, dust from a digging claw. They leave the way the point faces (its -Z, the model's front at rest) at speed, scattered by spread, then live on their own.
animator.emitter("mouth", FIRE)
        .rate(60).speed(0.35F).spread(0.08F)
        .when(ctx -> animator.layer("action").isPlaying("breathe_fire"));
Items in slots and hands have no place in the world, so they emit nothing.
  • Method Details

    • point

      public String point()
    • rate

      public ArmatureEmitter rate(float perSecond)
      Particles a second; 20 by default.
    • speed

      public ArmatureEmitter speed(float blocksPerTick)
      How fast they leave, in blocks a tick, along the point's facing; 0.1 by default.
    • spread

      public ArmatureEmitter spread(float blocksPerTick)
      Random speed added in any direction, in blocks a tick; 0.05 by default.
    • when

      public ArmatureEmitter when(Predicate<ArmatureContext> active)
      Emits only while this holds, asked every frame; always by default.