These are chat archives for pixijs/pixi.js

9th
Jun 2016
JustASquid
@JustASquid
Jun 09 2016 01:43
Quick question - how do I get a rectangle specifying the local bounds of a display object? So the top left corner would be point where x = obj.x, and y=obj.y, and the other corner would be those values plus the width/height?
I look at getBounds() and getLocalBounds() but those don't seem to do what I think they do?
Ivan Popelyshev
@ivanpopelyshev
Jun 09 2016 06:20
getLocalBounds()
whats wrong with it?
Jakob Steinn
@jstoone
Jun 09 2016 09:39
Is there any way to disable the "Pixi.js 4.0.0 - WebGL - http://www.pixijs.com/"-message from PIXI?
JustASquid
@JustASquid
Jun 09 2016 09:51
in fact I can't seem to recreate a situation where getLocalBounds() and getBounds() return different values
(this is in the stable branch)
@ivanpopelyshev both getLocalBounds() and getBounds() return strange values that don't really correspond to what I was describing
Ivan Popelyshev
@ivanpopelyshev
Jun 09 2016 10:41
and whats the object you are trying to measure?
@jstoone according to source code
PIXI.utils._saidHello = true;
before you create the renderer
Jakob Steinn
@jstoone
Jun 09 2016 10:44
@ivanpopelyshev thanks! I was digging around but didn't think of looking in util. w00p. :)
Ivan Popelyshev
@ivanpopelyshev
Jun 09 2016 10:44
its a hack, i just looked inside PIXI.utils.sayHello method
Jakob Steinn
@jstoone
Jun 09 2016 10:46
yea, I feel like a jerk face now.
But the client requested all console.logs() gone on production. :(
jstoone @jstoone just jerk faced his code
Bar Ziony
@bartzy
Jun 09 2016 12:17
Hi
Why do you request a new frame with RAF, only after you fire the tick event to listeners?
Why not use RAF the first thing when you enter the tick function, and only then do the emitting?
Ivan Popelyshev
@ivanpopelyshev
Jun 09 2016 12:25
because that way browser can somehow estimate how much RAF costs?
var t = new PIXI.ticker.Ticker();
t.add(function() { render } );
t.start()
JustASquid
@JustASquid
Jun 09 2016 12:31
@ivanpopelyshev Just a pixi.container
Bar Ziony
@bartzy
Jun 09 2016 12:39
@ivanpopelyshev I don’t think that matters..?
Ivan Popelyshev
@ivanpopelyshev
Jun 09 2016 12:39
i dont know really
Bar Ziony
@bartzy
Jun 09 2016 12:41
ok, thanks
@englercj Did you perhaps benchmark the difference between calling RAF before render or after render? And, is it even correct to call it before render?
Jakob Steinn
@jstoone
Jun 09 2016 12:53
If you mix up your control-points when doing a quadricCurveTo()
http://d.pr/v/1knTp
Chad Engler
@englercj
Jun 09 2016 15:24
@Bartzy The most-correct thing to do is to call RAF before anything else. Because all RAF does is schedule the next call. In practice, the fact that it doesn't isn't really that big of a difference for most things.
If you feel strongly about it, feel free to put in a PR for changing it.
Ivan Popelyshev
@ivanpopelyshev
Jun 09 2016 15:26
@englercj if you have time please look at my propositions
@englercj pixijs/pixi.js#2634
Ivan Popelyshev
@ivanpopelyshev
Jun 09 2016 15:34
@englercj I'm really frustrated that I have that many stuff ready but not enough reviews. I know you guys are busy, but, doh, reviews are important Its not like I'm asking you to write code by my ideas
Ivan Popelyshev
@ivanpopelyshev
Jun 09 2016 16:13
aaaand he's gone :)
Bar Ziony
@bartzy
Jun 09 2016 17:51
@englercj And it wouldn’t cause the browser to somehow schedule the call earlier for some reason?