Sign in to follow this  

PhaserJS - Render loaded image on html

Recommended Posts

I have an app thats a mix of phaser an react. 

Im loading some images as follows:


this.load.image('bone', 'assets/images/bone.png');


How would it be possible to dynamically get the image of a sprite, and render into html ?


Something like (example)


const image = sprite.image;
return <img src={image}/>


Is that somehow possible ?

Also, is listing images possible ? (get all loaded images)

What im tryng to achieve is a panel that shows the sprite image, and you could change the sprite image to another image (maye even choosing an image from your pc)

Thanks for any help !

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.