ArcadixInfotech Posted May 30, 2018 Share Posted May 30, 2018 Hello, We are working on a scenario where we can upload images into canvas at runtime, upload drop area at runtime. We should also able to drag images into drop area. Is this possible in phaser? Link to comment Share on other sites More sharing options...
michebn Posted May 30, 2018 Share Posted May 30, 2018 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 More sharing options...
Recommended Posts