ksoo Posted May 31, 2016 Share Posted May 31, 2016 How do I change the x,y origin of the canvas to the bottom left corner and reverse it's interpretation of the y coordinate? I don't know solution help me. Quote Link to comment Share on other sites More sharing options...
ivan.popelyshev Posted May 31, 2016 Share Posted May 31, 2016 var stage = new PIXI.Container(); //dont forget to change that every resize! stage.position.y = renderer.height / renderer.resolution; stage.scale.y = -1; // you need to flip every texture too! var texture = PIXI.Texture.fromImage("myTexture.png"); texture.rotate = 8; // that stuff isnt changed, code like you did it before var spr = new PIXI.Sprite(texture); spr.position.x = 100; spr.position.y = 100; stage.addChild(spr); renderer.render(stage); Dont forget to flip ALL the textures you are using. According to http://pixijs.github.io/examples/index.html?s=demos&f=texture-rotate.js&title=Texture%20Rotate&v=dev it can be done by assigning 8 to texture.rotate. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.