I’m using pixi js v8.1.1. I am able to disply a graphic, but when I try to wrap it in a sprite, it no longer shows up.
renderer = await PIXI.autoDetectRenderer({});
const app = new Application();
await app.init({ background: '#8effe5', width: windowWidth, height: windowHeight, antialias: true });
document.body.appendChild(app.canvas);
let x = 0, y = 0;
const diamond = new Sprite(
renderer.generateTexture(
new Graphics()
.beginFill(0xffffff)
.drawPolygon([x, (tileHeight / 2) + y, (TILE_WIDTH / 2) + x, y, TILE_WIDTH + x, (tileHeight / 2) + y, (TILE_WIDTH / 2) + x, tileHeight + y])
.endFill()
.stroke({ width: 2, color: 0x000000 })
)
);
app.stage.addChild(diamond);