Jump to content

Search the Community

Showing results for tags 'Staring XML Atlas'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 1 result

  1. So I have exported a starling atlas from flash professional, which has given me something like <SubTexture name="ResizedSpritesheet0014" x="158" y="366" width="214" height="213" frameX="-16" frameY="-20" frameWidth="235" frameHeight="227"/><SubTexture name="ResizedSpritesheet0015" x="372" y="366" width="413" height="360" frameX="76" frameY="64" frameWidth="235" frameHeight="227"/> However when the xml data is parse it grabs the absolute values for frameX and frameY which means that my positive offset ends up being moved in the same way as the negative ones.frameX = Math.abs(parseInt(frame.frameX.value, 10)); frameY = Math.abs(parseInt(frame.frameY.value, 10)); I've changed the Math.abs to just use frameX = -(parseInt(frame.frameX.value, 10));frameY = -(parseInt(frame.frameY.value, 10));which seems to have fixed my issue, but really don't want to modify anything in Phaser like that, if anyone has any clues it'd be helpful.
×
×
  • Create New...