A class that represents a fill pattern for use in Text and Graphics fills. It allows for textures to be used as patterns, with optional repetition modes.
const txt = await Assets.load('https://pixijs.com/assets/bg_scene_rotate.jpg');const pat = new FillPattern(txt, 'repeat');const textPattern = new Text({ text: 'PixiJS', style: { fontSize: 36, fill: 0xffffff, stroke: { fill: pat, width: 10 }, },});textPattern.y = (textGradient.height); Copy
const txt = await Assets.load('https://pixijs.com/assets/bg_scene_rotate.jpg');const pat = new FillPattern(txt, 'repeat');const textPattern = new Text({ text: 'PixiJS', style: { fontSize: 36, fill: 0xffffff, stroke: { fill: pat, width: 10 }, },});textPattern.y = (textGradient.height);
Optional
Internal texture used to render the gradient
The transform matrix applied to the pattern
Gets a unique key representing the current state of the pattern. Used internally for caching.
Unique string key
Sets the transform for the pattern
The transform matrix to apply to the pattern. If not provided, the pattern will use the default transform.
A class that represents a fill pattern for use in Text and Graphics fills. It allows for textures to be used as patterns, with optional repetition modes.
Example