L2L2L

where phaser parse and render text

Recommended Posts

Where does phaser parse the XML document that contain the text location for the bitmap font sprite-sheet image?


Where does it use this information to render the sprite font to the screen from the image?


I tried to follow it, and as far as I can tell it use a native implantation  to parse the XML URL or XML string, than it store it.


Where does it retrieve this parse XML document and than extract the data needed to locate the correct text sprite from the image, than render it to the screen aka canvas?

I might edit this later...

Share this post


Link to post
Share on other sites

The file src/loader/LoaderParser.js

 

Phaser.LoaderParser.xmlBitmapFont is the method that parses the xml. This is called automatically by the loader once the font has loaded.

Oh wow thanks!!!

Share this post


Link to post
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.

Guest
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.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.