Buzugu Posted July 9, 2014 Share Posted July 9, 2014 Hi! I'm trying to access a specific frame in an atlas I previously loaded (mainly to get its width and height).this.load.atlasXML('sprites', 'spritesheet/sheet.png', 'spritesheet/sheet.xml');I have tried looking at the various getters from Phaser.Cache, but to no avail. Does anyone know how to access an item from an atlas by name ? Link to comment Share on other sites More sharing options...
lewster32 Posted July 9, 2014 Share Posted July 9, 2014 this.cache.getFrameData("sprites").getFrameByName("framename");This will return a Frame object which has width, height and so on. staff0rd, indextwo, jdnichollsc and 1 other 4 Link to comment Share on other sites More sharing options...
Buzugu Posted July 9, 2014 Author Share Posted July 9, 2014 Thank you very much! lewster32 1 Link to comment Share on other sites More sharing options...
Recommended Posts