• Content Count

  • Joined

  • Last visited

  1. Hm hm, I see. I figured out that for my purpose I can use .currentPath.points Thanks!
  2. Hi all! I have something like this let spline = new PIXI.Graphics() .lineStyle(1, 0xaaaaaa, 1) .moveTo(100, 100) .lineTo(200, 200) .lineTo(100, 500); And I want to get all points like this let points = spline.geometry.points; let values = []; for (let i = 0; i < points.length; i += 2) { values.push({ x: points[i], y: points[i + 1] }); } But cycle doesn't work, because of this points.length Then I decided display points and points.length console.log("points: "); console.log(points); console.log("points.length = " + points.length); and what I see Then I tried to get just one (first element) console.log("first element"); console.log(points[0]); and.... I really don't understand what is it and how it works. Someone know, what it can be?
  3. Yes, it works, thanks! But why? Why quality 1 turns off glow filter?
  4. Hi all, There is one problem I use glowFilter, and on desktop it works properly, but on mobile it's turn off, and I don't know why. Maybe someone know what is the problem?
  5. 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
  6. 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, });
  7. 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
  8. Oh, it will be very helpful! And, maybe is there some example how to use PIXI.BitmapFontLoader with BitMap Text (one will be enough)?
  9. 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?