Jump to content

Look for more complex code examples


aintnorest
 Share

Recommended Posts

I'm new to using Pixi.js and was looking for some tutorials. https://github.com/kittykatattack/learningPixi#loadingatlas Was a great starting point and http://www.rinconstrategies.io/using-react-and-pixijs.html helped me figure out how to run things in conjunction with React. Specifically I'm trying to create a static sized play space that I can zoom in and out and moved around. Seems like the PIXI.WebGLRenderer(x,y) will set the canvas size and stage.width / height will set the size of the base container and then I can use stage.scale.x / y to zoom in and out but when I resize the window It stretches and compresses the sprites inside the container instead of keeping regular image ratio. In truth thats just the start of what I've got to get done and I'm sure I'll fix the problem before this gets a response. Sooo, I was hoping people could point me at some larger more complex game examples. I tend to pick things up quicker when I can play with an existing code base.

Thanks for any help. 

PS. Wouldn't happen to be a slack or discord channel aimed at Pixi.js development?

Link to comment
Share on other sites

https://gitter.im/pixijs/pixi.js

There's also slack for people who made at least few pull requests or issues in github :)

If you want to move the window center or something like that, look at pivot point: http://pixijs.github.io/examples/index.html?s=basics&f=container-pivot.js&title=Container%20Pivot&v=dev . For a container, everything applies in that order: position, rotation, scale, pivot. Its all about utilizing these properties and combining multiple containers.

Stage width and stage height will calculate Bounding Box out of all elements inside of stage, its not related to renderer width/height AT ALL. Be very careful with container.width/height!

Link to comment
Share on other sites

  • 3 years later...
  • 9 months later...

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...