• Content Count

  • Joined

  • Last visited

  1. Magia

    Pixi.js and Graphics

    Ok, naw it looks beter, but this is not anought. I think that I should use png instead PIXI.Graphics. Thanks
  2. Hi How can I fix artifacts in Pixi Graphics, when I try to draw triangle? But when I try to draw text, it's ok and this is my App settings const app = new PIXI.Application({ width: 600, height: 600, backgroundColor: 0x141019, antialias: true, resolution: window.devicePixelRatio, });
  3. Hi all I use Pixi text with padding in style, and I noticed one thing const textSample = new PIXI.Text("text", { fontFamily: 'Montserrat', fontSize: 50, padding: 50, fill: mainRed, }); width of the text does't include padding, that's why I should do somthing like this for alignment text in container and it looks like this container.pivot.x = container.width / 2 - 50; container.pivot.y = container.height / 2 - 50; Does someone know how to align it properly? because I think it's not the best solution
  4. Oh, it will be very helpful! And, maybe is there some example how to use PIXI.BitmapFontLoader with BitMap Text (one will be enough)?
  5. Hi all I use Pixi 5.1.1 I wanna learn how to use BitmapFont, but I have some promlem with it. I use example from import desyrel from "./desyrel.xml"; /* other code */ app.loader .add('desyrel', desyrel) .load(onAssetsLoaded); function onAssetsLoaded() { const bitmapFontText = new PIXI.BitmapText('bitmap fonts are supported!\nWoo yay!', { font: '55px Desyrel', align: 'left' }); bitmapFontText.x = 50; bitmapFontText.y = 200; container.addChild(bitmapFontText); } (font desyrel from examples too) And I get this error Error message: Uncaught Error: Texture Error: frame does not fit inside the base Texture dimensions: X: 1 + 38 = 39 > 1 and Y: 1 + 74 = 75 > 1 at Texture.prototypeAccessors.frame.set ( at new Texture ( at Function.registerFont ( at Function.parse ( at completed ( at MiniSignal.dispatch (mini-signals.js:111) at resource-loader.esm.js:2257 at next (resource-loader.esm.js:47) at Loader.use ( at resource-loader.esm.js:2255 at resource-loader.esm.js:55 Does someone know what it can be and how to fix it?