Class Generators
java.lang.Object
com.github.darksoulq.abyssallib.world.particle.impl.Generators
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Generatorcircle(double radius, int points) Generates a flat circle on the XZ plane.static Generatorcube(double size, int resolution) Generates the wireframe of a cube.static GeneratordrawingCircle(double radius, int totalPoints, long duration) Generates a circle that "draws" itself over a duration.static GeneratorfromImage(BufferedImage image, double size, int density) Creates a generator that replicates aBufferedImageusing particles.static GeneratorgrowingCube(double size, int resolution, long duration) Generates a cube that "grows" from bottom to top over a duration.static Generatorhelix(double radius, double height, int turns, int points, double speed) Generates a 3D helix (spiral) shape.static Generatorline(org.bukkit.util.Vector start, org.bukkit.util.Vector end, double step) Generates a line of particles between two points.static Generatororbit(double radius, int points, double speed) Generates a circular orbit animation.static Generatorpoint()static GeneratorpulsingCircle(double baseRadius, double pulseAmplitude, double speed, int points) Generates a circle that pulses (changes radius) over time.static Generatorpyramid(double size, double height, int resolution) Generates a pyramid shape.static GeneratorrotatingCircle(double radius, int points, double speed) Generates a circle that rotates around the Y axis over time.static GeneratorsineWave(double length, int points, double amplitude, double frequency, double speed) Generates a moving sine wave.static Generatorsphere(double radius, int points) Generates a 3D sphere using a Fibonacci spiral distribution.static Generatorspiral(double maxRadius, double height, int points, double speed) Generates a cone-like spiral starting from a point.static Generatorsquare(double size, int pointsPerSide) Generates a flat square outline on the XZ plane.static GeneratorConverts a string of text into white particles.static Generatortext(String text, String fontName, int style, ColorProvider color, int fontSize, double size) Converts a string of text into a particle-based layout with custom coloring.
-
Constructor Details
-
Generators
public Generators()
-
-
Method Details
-
fromImage
Creates a generator that replicates aBufferedImageusing particles.- Parameters:
image- The source image to convert.size- The maximum world-space size the image should occupy.density- The pixel skip rate (1 = every pixel, 2 = every other pixel).- Returns:
- A
Generatorrepresenting the image.
-
text
public static Generator text(String text, String fontName, @MagicConstant(flags={0L,1L,2L}) int style, ColorProvider color, int fontSize, double size) Converts a string of text into a particle-based layout with custom coloring.- Parameters:
text- The text to display.fontName- The name of the font to use.style- The font style (e.g.,Font.BOLD).color- TheColorProviderfor the text color.fontSize- The size of the font in the internal buffer.size- The world-space width/height of the rendered text.- Returns:
- A
Generatorrepresenting the text.
-
text
public static Generator text(String text, String fontName, @MagicConstant(flags={0L,1L,2L}) int style, int fontSize, double size) Converts a string of text into white particles.- Parameters:
text- The text.fontName- The font.style- The font style.fontSize- The font size.size- The world size.- Returns:
- A
Generatorfor plain text.
-
point
- Returns:
- A generator producing a single point at (0,0,0).
-
line
-
circle
-
square
-
sphere
-
cube
-
pyramid
-
rotatingCircle
-
orbit
-
drawingCircle
-
growingCube
-
sineWave
public static Generator sineWave(double length, int points, double amplitude, double frequency, double speed) Generates a moving sine wave.- Parameters:
length- The total wave length.points- The number of particles.amplitude- The height of the peaks.frequency- The wave frequency.speed- The wave speed (phase shift).- Returns:
- A dynamic
Generator.
-
pulsingCircle
public static Generator pulsingCircle(double baseRadius, double pulseAmplitude, double speed, int points) Generates a circle that pulses (changes radius) over time.- Parameters:
baseRadius- The median radius.pulseAmplitude- The maximum change from median.speed- The pulse speed.points- The number of particles.- Returns:
- A dynamic
Generator.
-
helix
Generates a 3D helix (spiral) shape.- Parameters:
radius- The radius of the helix.height- The total height.turns- The number of complete rotations.points- The total number of particles.speed- The rotation speed.- Returns:
- A dynamic
Generator.
-
spiral
Generates a cone-like spiral starting from a point.- Parameters:
maxRadius- The final radius at the top.height- The total height.points- The total number of particles.speed- The rotation speed.- Returns:
- A dynamic
Generator.
-