Jump to content

Generate texture from text.


Recommended Posts

Hi! Is it possible to somehow generate a texture from a phaser text object? I know about bitmap fonts - it's not what I'm looking for though - I want to dynamically create text (custom language, size, etc) and convert it into a texture mainly for performance reasons and other future manipulation. Something like Graphics.generateTexture().

Searched the text docs - can't seem to find what I'm looking for. 


Link to comment
Share on other sites

4 minutes ago, samme said:

Phaser.Text actually has a generateTexture() method, undocumented I guess.

Thanks @samme, indeed it does, though it's not in the  docs. Not showing in the inspector either. Any idea how I can find these "hidden" methods and props - aside from reading and understanding the source code?

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

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.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...