Код: Выделить всё
const g = new PIXI.Graphics();
const path = new PIXI.GraphicsPath();
path.moveTo(100, 100);
path.lineTo(200, 100);
path.arcTo(250, 100, 250, 150, 30); // Rounded corner
path.lineTo(250, 200);
// Load texture
const baseTexture = await PIXI.Assets.load('https://pixijs.io/examples/examples/assets/bunny.png');
// ✅ Set wrap mode to REPEAT on baseTexture
baseTexture.wrapMode = PIXI.WRAP_MODES.REPEAT;
baseTexture.update(); // apply changes to GPU
// Create Texture from baseTexture (you can also reuse baseTexture directly)
const texture = new PIXI.Texture(baseTexture);
// Use the path and stroke with the texture
g.path(path);
g.stroke({ width: 12, texture: texture }); // adjust width for visibility
app.stage.addChild(g);
Подробнее здесь: https://stackoverflow.com/questions/796 ... for-stroke