These are chat archives for pixijs/pixi.js

12th
Jul 2018
Mark Knol
@markknol
Jul 12 2018 10:11
Uncaught TypeError: maskData.isFastRect is not a function
    at MaskManager.pushMask (pixi.js:19684)
    at Sprite.renderAdvancedWebGL (pixi.js:9484)
    at Sprite.renderWebGL (pixi.js:9439)
I have a container.mask = new Rectangle(0,0,100,100)
why does that give an error, while container.mask = new Graphics().beginFilll(0).drawRect(0,0,100,100).endFill() works?
I tried pixi 3.7.0 and 4.8.1
Ivan Popelyshev
@ivanpopelyshev
Jul 12 2018 11:19
because Rectangle is not a DisplayObject. In this case, API is almost the same as in Flash
@guoshencheng clear graphics every frame, make a stroke again.
Mark Knol
@markknol
Jul 12 2018 11:46
@ivanpopelyshev ah I see in haxe externs that mask is Dynamic, assumed it would allow rectangles too
Ivan Popelyshev
@ivanpopelyshev
Jul 12 2018 11:46
no, its really just DisplayObject / Container
Graphics and Sprites are accepted
well, now you can make a PR for haxe externs!
Mark Knol
@markknol
Jul 12 2018 11:47
im not sure who maintains them nowadays?
Ivan Popelyshev
@ivanpopelyshev
Jul 12 2018 11:48
I still receive notifications about that repo, so, yes, its maintained
Mark Knol
@markknol
Jul 12 2018 11:56
oh but latest commit was from march
Karol Stopyra
@stopyransky
Jul 12 2018 18:33
hello, how can i transform/scale PIXI.Sprite? i used sprite.scale.set(x,y) and it was working but what is the best way to translate sprite to new location? I want to translate it on zoom behavior that is returned from d3.zoom() event (it returns transform object containing x, y, k (for scaling))
i assume w would need to make some kind of matrix transformation here
Ivan Popelyshev
@ivanpopelyshev
Jul 12 2018 20:36
use my trick with memCoord
pushPivot/popPivot
and learn how containers transform work in general
how to make a camera using extra container e.t.c.