Particles

Overuse of particles can cause low performance due to the huge amount of polygons and logic of every single one of them.
Particles are addition to graphics, not its full replacement.


ParticleBuilder

ParticleBuilder - Class for simply summoning particles with Fluffy Fur.

getParticleOptions() -> GenericParticleOptions -

setRenderType(RenderType) -

setParticleRenderType(ParticleRenderType) - sets particle Render type.
It's used for Vanilla Render types.
Example: setParticleRenderType(ParticleRenderType.PARTICLE_SHEET_OPAQUE)

setBufferSource(MultiBufferSource) -

setFormat(VertexFormat) -

setBehavior(ParticleBehavior) -

setColorData(ColorParticleData) -

setTransparencyData(GenericParticleData) -

setScaleData(GenericParticleData) -

setSpinData(SpinParticleData) -

setLightData(LightParticleData) -

setSpriteData(SpriteParticleData) -

addTickActor(Consumer<GenericParticle>), addSpawnActor(Consumer<GenericParticle>), addRenderActor(Consumer<GenericParticle>), addRenderPostActor(Consumer<GenericParticle>) - .
.
Example:

final Consumer<GenericParticle> target = p -> {
    //p <-- particle
    p.setSpeed(p.getSpeed().add(0, 0.1f, 0));
};
particleBuilder.addTickActor(target);


clearActors(), clearTickActor(), clearSpawnActors(), clearRenderActors(), clearRenderPostActors() -

setDiscardFunction(GenericParticleOptions.DiscardFunctionType) - [NONE, INVISIBLE, ENDING_CURVE_INVISIBLE]

setLifetime(int) -

setLifetime(int, int) -

setGravity(int) -

setGravity(int, int) -

setFriction(int) -
.
.

setFriction(int, int) -

enableCull(), disableCull(), setShouldCull(boolean) -
.
false by default.

enableRenderTraits(), disableRenderTraits(), setShouldRenderTraits(boolean) -
.
true by default.

enablePhysics(), disablePhysics(), setHasPhysics(boolean) -
.
true by default.

randomVelocity(double), randomVelocity(double, double), randomVelocity(double, double, double) -
.

flatRandomVelocity(double, double, double) -
.

addVelocity(double, double, double) -

setVelocity(double, double, double) -

randomOffset(double), randomOffset(double, double), randomOffset(double, double, double) -
.

flatRandomOffset(double, double, double) -
.

enableForce(), enableForce(), enableForce(boolean) -
.
true by default.

setDistance(double) -
.
100 by default.

enableDistanceSpawn(), disableDistanceSpawn(), setDistanceSpawn(boolean) -
.
true by default.

addAdditionalBuilder(ParticleBuilder) -
.
.

clearAdditionalBuilders() -

spawn(Level, Vec3), spawn(Level, double, double, double) -

repeat(Level, Vec3, int), repeat(Level, double, double, double, int) -

repeat(Level, Vec3, int, float), repeat(Level, double, double, double, int, float) -

spawnLine(Level, Vec3, Vec3) -

repeatLine(Level, Vec3, Vec3, int) -

repeatLine(Level, Vec3, Vec3, int, float) -

spawnVoxelShape(Level, Vec3, VoxelShape), spawnVoxelShape(Level, double, double, double, VoxelShape) -

pawnVoxelShape(Level, Vec3, VoxelShape, int), spawnVoxelShape(Level, double, double, double, VoxelShape, int) -

spawnVoxelShape(Level, Vec3, VoxelShape, int, float), spawnVoxelShape(Level, double, double, double, VoxelShape, int, float) -

spawnBoykisser(Level, Vec3, int, int, float, float, float, float, float, float) -

spawnBoykisser(Level, Vec3, int, int, float, ParticleBuilder, float, float, float, float, float) -

create(ParticleType<?>) -

create(RegistryObject<?>) -

create(GenericParticleOptions) -

:

ParticleBuilder.create(FluffyFurParticles.WISP)
        .setColorData(ColorParticleData.create(0, 0, 1, 1, 0, 0).build())
        .setTransparencyData(GenericParticleData.create(0.5f, 0).setEasing(Easing.QUARTIC_OUT).build())
        .setScaleData(GenericParticleData.create(0.3f, 2, 0).setEasing(Easing.ELASTIC_OUT).build())
        .setLifetime(200, 100)
        .randomVelocity(0.35f)
        .repeat(level, x, y, z, 50);

ParticleBehavior

ParticleBehavior -


CubeParticleBehavior

CubeParticleBehavior -


SphereParticleBehavior

SphereParticleBehavior -


SparkParticleBehavior

SparkParticleBehavior -


TrailParticleBehavior

TrailParticleBehavior -


GenericParticleData

GenericParticleData -


ColorParticleData

ColorParticleData -


SpinParticleData

SpinParticleData -


LightParticleData

LightParticleData -


SpriteParticleData

SpriteParticleData -


Fluffy Fur Wiki:

- Main

- Particles


- GitHub Wiki