Jump to content
This forum will be closing down. Please move to the respective dedicated project forums.

Get width of sprite?


Legomite
 Share

Recommended Posts

To anchor a sprite to the top right you set the anchor to (1,0). anchor receives values between 0-1 so the center would be 0.5.

To get the width of a sprite you use sprite.width but you can't use it to set anchor since as I explained above anchors are set with 0-1.

 

Here you can find all the documentation of panda.js:

v1.3

http://www.pandajs.net/docs/

v2(in development)

http://ekelokorpi.github.io/panda.js-site/engine/docs/

pixi.js

http://www.goodboydigital.com/pixijs/docs/

 

also this site has a lot of basic examples and is very useful for learning the basics of panda.js:

http://vermeire.home.xs4all.nl/panda/index.html#

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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