scheffgames Posted March 15, 2017 Share Posted March 15, 2017 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. Thanks! Link to comment Share on other sites More sharing options...
samme Posted March 15, 2017 Share Posted March 15, 2017 Phaser.Text actually has a generateTexture() method, undocumented I guess. scheffgames 1 Link to comment Share on other sites More sharing options...
scheffgames Posted March 15, 2017 Author Share Posted March 15, 2017 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 More sharing options...
samme Posted March 16, 2017 Share Posted March 16, 2017 The docs are probably 99% complete. A few very deep PIXI.* properties seem to get lost or misplaced. You can read the inline docs in v2/src/pixi/display/DisplayObject.js#L425. Mattia and scheffgames 2 Link to comment Share on other sites More sharing options...
scheffgames Posted March 16, 2017 Author Share Posted March 16, 2017 Thank you @samme, will sure take a look at it! Can I ask though - what software are you using to display props and methods in your above photo? Looks like a browser inspector, not like Chrome's though. Sorry for the interminable questions. Link to comment Share on other sites More sharing options...
samme Posted March 17, 2017 Share Posted March 17, 2017 That is Safari. scheffgames 1 Link to comment Share on other sites More sharing options...
Recommended Posts