Legomite Posted August 24, 2015 Report Share Posted August 24, 2015 I'm trying to anchor a sprite to the top right, I want to do something likesprite.anchor.set(-1 - sprite.width, 0)How do I get the width of a sprite? Link to comment Share on other sites More sharing options...
LinkTree Posted August 24, 2015 Report Share Posted August 24, 2015 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.3http://www.pandajs.net/docs/v2(in development)http://ekelokorpi.github.io/panda.js-site/engine/docs/pixi.jshttp://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 More sharing options...
Recommended Posts