Default Generators
Generators are responsible for producing the initial spatial coordinates for a particle effect relative to the origin. Below is a list of all built-in static factory methods available in the Generators utility class.
Point
Method: Generators.point()
Generates a single point exactly at the origin (0, 0, 0).
(No parameters required)
Line
Method: Generators.line()
Generates a straight line of particles between two specified points.
Parameter | Information |
|---|---|
| The starting |
| The ending |
| The distance gap between each individual particle along the line. |
Circle
Method: Generators.circle()
Generates a flat circle on the XZ plane.
Parameter | Information |
|---|---|
| The horizontal radius of the circle. |
| The total number of particles comprising the circumference. |
Square
Method: Generators.square()
Generates a flat square outline on the XZ plane.
Parameter | Information |
|---|---|
| The side length of the square. |
| The number of particles plotted along each edge. |
Sphere
Method: Generators.sphere()
Generates a 3D sphere using a Fibonacci spiral distribution for even particle spacing.
Parameter | Information |
|---|---|
| The radius of the sphere. |
| The total number of particles defining the sphere's surface. |
Cube
Method: Generators.cube()
Generates the 3D wireframe outline of a cube.
Parameter | Information |
|---|---|
| The edge length of the cube. |
| The number of particles defining each edge. |
Pyramid
Method: Generators.pyramid()
Generates a 3D pyramid shape with a square base.
Parameter | Information |
|---|---|
| The width of the pyramid's base. |
| The total vertical height of the pyramid. |
| The particle density per horizontal layer. |
Helix
Method: Generators.helix()
Generates a 3D helix (spring) shape.
Parameter | Information |
|---|---|
| The radius of the helix curve. |
| The total vertical height of the structure. |
| The number of complete 360-degree rotations the spiral makes. |
| The total number of particles. |
| The dynamic rotational speed offset (for animated spinning). |
Image
Method: Generators.fromImage()
Replicates a 2D BufferedImage by mapping its non-transparent pixels to 3D space.
Parameter | Information |
|---|---|
| The source |
| The maximum world-space size the image should occupy. |
| The pixel skip rate (e.g., |
Text
Method: Generators.text()
Converts a string of text into a particle-based layout.
Parameter | Information |
|---|---|
| The string of text to display. |
| The system font name to render with. |
| The font style (e.g., |
| (Optional) A |
| The internal rasterization font size. |
| The maximum world-space width/height of the generated text. |