These are chat archives for pixijs/pixi.js

17th
Aug 2016
Century Guo
@guoshencheng
Aug 17 2016 08:44
is There some awesome example for pixi and p2.js
Antoine Guillien
@Sladix
Aug 17 2016 08:45
@guoshencheng Hi, you can find a basic example here https://github.com/schteppe/p2.js/blob/master/examples/pixijs/box.html
Century Guo
@guoshencheng
Aug 17 2016 08:49
@Sladix thanks, but i has find this example before, but when i write my own code, i can't make a ground with plane, the ground is not effective
Antoine Guillien
@Sladix
Aug 17 2016 08:50
@guoshencheng You must have made a mistake somewhere then. Do you have a codepen/jsfiddle with your code ?
Century Guo
@guoshencheng
Aug 17 2016 08:56
here is code at https://github.com/MagicalPixi/montaro/blob/master/javascripts/game/index.js
renderer is a function attach PIXI.renderer and requestAnimationFrame, stage is PIXI.Container Object
Antoine Guillien
@Sladix
Aug 17 2016 09:00
@guoshencheng Do you call world.step(1 / 60) in your requestAnimationFrame as well as renderer.render(stage); ? (assuming renderer is the renderer returned by PIXI.autoDetectRenderer)
Century Guo
@guoshencheng
Aug 17 2016 09:01
stage.render will be called in requestAnimationFrame
@Sladix stage.render will be called in requestAnimationFrame
@Sladix renderer here is a function defined in https://github.com/MagicalPixi/pixi-lib/blob/master/lib/createRender.js
Antoine Guillien
@Sladix
Aug 17 2016 09:04
hum ok
@guoshencheng It seems you didn't gave any position to the floor body https://github.com/MagicalPixi/montaro/blob/master/javascripts/game/index.js#L23
Century Guo
@guoshencheng
Aug 17 2016 09:07
@Sladix yea, because the base example make a strange position [0, -1]
Antoine Guillien
@Sladix
Aug 17 2016 09:09
@guoshencheng Well it's not strange, it's 1px below the ground so the objects can stand at 0 in the Y axis
Century Guo
@guoshencheng
Aug 17 2016 09:10
okey, i will try [0, -1]
Antoine Guillien
@Sladix
Aug 17 2016 09:10
It says they flip the container because 0,0 in pixi is top left
Century Guo
@guoshencheng
Aug 17 2016 09:12
yes, i'v notice this
Antoine Guillien
@Sladix
Aug 17 2016 09:13
Hope it'll help
Century Guo
@guoshencheng
Aug 17 2016 09:16
okey, thanks a lot! the graphics stopped, but the position not correct, i will solve it by myself , thanks!
Antoine Guillien
@Sladix
Aug 17 2016 09:17
@guoshencheng Tell me when you solve it I'm pretty new to this too and I'm interested ! Thanks
Century Guo
@guoshencheng
Aug 17 2016 09:20
lol, okey
Antoine Guillien
@Sladix
Aug 17 2016 09:25
@guoshencheng Well if you want to :) I'm also having weird things with positionning (https://pgg-sladix.c9users.io/index.html)
@guoshencheng guess I'll have to write a debug function on another canvas to see what's going on with the characters' bodies
Century Guo
@guoshencheng
Aug 17 2016 09:30
it's interesting
Antoine Guillien
@Sladix
Aug 17 2016 09:30
@guoshencheng The sources are really messy tho
Endel Dreyer
@endel
Aug 17 2016 17:22
Hey @ivanpopelyshev @GoodBoyDigital, I'd like to propose a patch that might break existing applications. Is there a set of examples (like this https://github.com/pixijs/examples) for PIXI v4? So I could check if my patch would break something or not.