Class ParticleSpec.Builder
java.lang.Object
net.ixdarklord.coolcatcanvas.api.client.vfx.ParticleSpec.Builder
- Enclosing class:
ParticleSpec
-
Method Summary
Modifier and TypeMethodDescriptionbuild()color(int rgb) One colour for its whole life, as0xRRGGBB.color(int startRgb, int endRgb) A colour that shifts over its life, as0xRRGGBB.colorEasing(Easing easing) drag(float drag) What its speed is multiplied by each tick: 1 keeps it, 0.9 slows it quickly.gravity(float gravity) Blocks a tick it speeds up downwards, each tick.lifetime(int ticks) How long it lives, in ticks.lifetime(int minTicks, int maxTicks) Each particle lives a random number of ticks in this range, so a burst doesn't vanish all at once.Its opacity over its life, 0 to 1.Starts each particle at a random angle.shape(ParticleSpec.Shape shape) size(float size) Half the width of its quad over its life, in blocks.How fast it turns over its life, in radians a tick.stretch(float ticks) For aParticleSpec.Shape.SPARK: how many ticks of motion its length covers.
-
Method Details
-
shape
-
lifetime
How long it lives, in ticks. -
lifetime
Each particle lives a random number of ticks in this range, so a burst doesn't vanish all at once. -
size
Half the width of its quad over its life, in blocks. AParticleSpec.Shape.SPARK's is its thickness. -
size
-
opacity
Its opacity over its life, 0 to 1. -
color
One colour for its whole life, as0xRRGGBB. -
color
A colour that shifts over its life, as0xRRGGBB. The shift runs around the colour wheel, so it stays vivid on the way instead of passing through grey. -
colorEasing
-
spin
How fast it turns over its life, in radians a tick. Each particle turns one way or the other at random. -
randomRoll
Starts each particle at a random angle. -
gravity
Blocks a tick it speeds up downwards, each tick. Negative to rise. -
drag
What its speed is multiplied by each tick: 1 keeps it, 0.9 slows it quickly. -
stretch
For aParticleSpec.Shape.SPARK: how many ticks of motion its length covers. -
build
-