NokFrt Posted August 27, 2018 Share Posted August 27, 2018 Hi, I need to create an image in run-time and then convert it to a base64 string. I can create the image with Phaser.GameObject.RenderTexture, but does anyone know how to convert it to a base64 string? Thanks a lot. Tomas Link to comment Share on other sites More sharing options...
samme Posted August 27, 2018 Share Posted August 27, 2018 Did you check the Textures examples and the RenderTexture API docs? Link to comment Share on other sites More sharing options...
Shubham Seth Posted September 10, 2018 Share Posted September 10, 2018 https://supernapie.com/blog/loading-assets-as-data-uri-in-phaser-3 check this link to convert DATA uri for Images, audio and spritesheet Link to comment Share on other sites More sharing options...
samme Posted September 10, 2018 Share Posted September 10, 2018 in CANVAS mode you can use RenderTexture#canvas.toDataURL() but in WEBGL mode you need to use the Snapshot Renderer somehow. Link to comment Share on other sites More sharing options...
Recommended Posts