Search the Community
Showing results for tags 'spritesourcesize'.
-
Hi I would like to use Adobe Animate (the old Adobe Flash) to create sprite sheets and use them into Phaser. I think it's better option for us than Texture Packer because you can select quickly which elements add or not and export movieclips that follow paths. All works fine except I can't see how to set the spriteSourceSize and sourceSize with the same dimensions as frame. With Texture Packer I don't have that problem. The result is a Phaser.Sprite with width and height properties with the same values of the entire sprite sheet. This generates problems when we want to set the sprite in a specific x,y point. Is there any posibility to change it into Adobe Animate or adjust Phaser to get the fame values? Thank you
- 1 reply
-
- phaser
- adobe animate
-
(and 4 more)
Tagged with:
-
I use " game.load.atlasJSONHash('bomb','explode.png','bomb.json');" to load a image, and the content in "bomb.json ": { "filename": "bomb_1.png","frame": {"x":0,"y":0,"w":128,"h":128},"rotated": false,"trimmed": false,"spriteSourceSize": {"x":0,"y":0,"w":100,"h":100},"sourceSize": {"w":128,"h":128}}I wanna ask how to use the "spriteSourceSize" and the "sourceSize" ?I changed the value but it didn't work at all.
-
When using Atlas with spriteSourceSize, sprites are pushed to their position, but input.pixelpick is still looking at their original position (0,0). Example: http://www.ugnis.com/Heroes-of-the-Past/public/ (clicking on buildings should invoke destroy()) Source code: https://github.com/UgnisMasiulik/Heroes-of-the-Past Building = function(castle, building){ this.sprite = game.add.sprite(0, 0, castle.race+'Atlas'); this.sprite.frameName = castle.race+building+'.png'; this.sprite.scale.setTo(scaleX, scaleY); this.sprite.inputEnabled = true; this.sprite.input.pixelPerfectClick = true; this.sprite.events.onInputDown.add(this.clicked, this);}I know that I could avoid using spriteSourceSize but maybe someone knows how to fix this?
- 3 replies
-
- atlasinput
- pixelpick
-
(and 1 more)
Tagged with: