Called when the pattern is initialized or resized. Use this to set up any internal state or precompute values.
the rendering region including visible area and padding.
Called when the pattern is destroyed. Use this to clean up resources, cancel timers, etc.
Handle mouse interactions with the pattern. Override to implement custom mouse effects.
mouse X position relative to canvas.
mouse Y position relative to canvas.
Whether mouse was clicked this frame.
Update options while preserving expensive permutation table when possible.
Update pattern state between frames.
Called before generate()
on each frame.
current rendering context.
Generate characters for the current frame using Perlin noise.
the current rendering context with time and region info
Array of character data for rendering
Generate 3D Perlin noise at given coordinates.
Generate fractal noise using multiple octaves. This creates more natural-looking, organic patterns.
Generate animated noise that changes over time. This creates flowing, organic motion patterns.
Protected
_Options for the pattern, initialized with default values.
Protected
_Flag indicating if the pattern needs to be re-rendered. This is set to true when pattern options change in a way that required re-render (e.g. color change).
Static
Readonly
IDUnique identifier for the pattern, that should be overridden in subclasses.
Perlin noise implementation that provides smooth, organic-looking noise patterns. Supports multiple octaves for fractal noise generation.