Patterns
Static lookup registry for all 88 black-and-white repeating SVG patterns in
res://addons/pattern_material/textures/patterns/*.svg, plus factory helpers
for procedural PatternGenerator textures.
Examples:
Patterns["moroccan"] # => "res://addons/pattern_material/textures/patterns/moroccan.svg"
Patterns["zig-zag"] # => "res://addons/pattern_material/textures/patterns/zig_zag.svg"
Patterns.index("hexagons") # => 40
Patterns.texture("topography") # => Texture2D? (when running inside Godot)
Patterns.apply_to(material, "groovy") # sets `custom_pattern` shader parameter
Patterns.polka_dots(dot_radius: 14.0) # => PolkaDotPattern < PatternGenerator < ImageTexture
Constants
Class methods
Assigns custom_pattern on a ShaderMaterial using pattern_replace.gdshader and returns the resolved resource path.
Assigns a procedural PatternGenerator to custom_pattern on a ShaderMaterial.
Creates a customized BrickPattern procedural texture generator.
Creates a customized CellularPattern procedural Voronoi / caustics texture generator.
Creates a customized CheckerPattern procedural texture generator.
Creates a customized CircuitPattern procedural PCB traces & pads texture generator.
Creates a customized CrossPattern procedural texture generator.
Creates a multi-mode CustomPatternGenerator procedural texture generator.
Creates a customized DiamondPattern procedural texture generator.
Creates a customized HalftonePattern procedural texture generator.
Creates a customized HexagonPattern procedural texture generator.
Creates a customized HoundstoothPattern procedural texture generator.
Looks up the 0-based index of a pattern by key, raising KeyError if not found.
Looks up the 0-based index of a pattern by key, or returns nil if not found.
Normalizes a pattern lookup key (accepts hyphens, underscores, spaces, or .svg suffix).
Returns the canonical res://addons/pattern_material/textures/patterns/<id>.svg path for key.
Creates a customized PolkaDotPattern procedural texture generator.
Creates a customized RingPattern procedural texture generator.
Creates a customized ScalesPattern procedural Seigaiha / wave-arch texture generator.
Creates a customized SpiralPattern procedural vortex texture generator.
Creates a customized StarPattern procedural texture generator.
Creates a customized StripePattern procedural texture generator.
Creates a customized TartanPattern procedural plaid weave texture generator.
Preloads and returns the Texture2D for key when running inside Godot.
Creates a customized TruchetPattern procedural maze / Smith-arc texture generator.