p.vk Posted June 21 Share Posted June 21 Is it possible to draw a rectangle with a dashed line? My code looks like: import {Application, Graphics} from 'pixi.js'; (async () => { const app = new Application(); await app.init({width: 300, height: 300}); document.body.appendChild(app.canvas); const c = 'white'; const x = 0; const y = 0; const w = 100; const h = 100; const graphics = new Graphics(); graphics.rect(x, y, w, h); graphics.fill(c); graphics.stroke({ width: 1, color: 217854 }); app.stage.addChild(graphics); })(); And it draws next scene: Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.