Jump to content

Drag and drop image


Recommended Posts

I'm still a phaser beginner, so I'm not sure the following helps:

You can easily load images at runtime (see e.g. https://labs.phaser.io/edit.html?src=src\loader\image\load image on click.js) though I think they have to be in the webspace already. You could probably use any standard technology to upload an image to a given path and than load it in phaser.

Regarding the drag and drop there is functionality for this (see e.g. https://labs.phaser.io/edit.html?src=src\input\dragging\stack of cards.js). I think it should be easy to adjust this example to move the image back to its original position, if the image is on an invalid position at drag stop.

Again: I have not done any of these. Take a look at https://labs.phaser.io/index.html, it's a very valuable resource regarding any Phaser3 stuff.

Link to comment
Share on other sites


  • Recently Browsing   0 members

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