Jump to content

Get width of sprite?


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:



v2(in development)





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


Link to comment
Share on other sites

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.

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.


  • Recently Browsing   0 members

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