odelia Posted April 19, 2016 Share Posted April 19, 2016 I have a project where the user have a menu of items (let's call them stickers) and he place them on the stage. I want them to be able to edit them (scale and rotation). I don't want it to be a toolbar but a display on the element itself. I found what I need but it's on fabric.js Can I use that code on Phaser? Can I find a library that does the same thing for Phaser? Link to comment Share on other sites More sharing options...
drhayes Posted April 19, 2016 Share Posted April 19, 2016 Nope, fabric really wants to control the canvas. Phaser and fabric can't use the same canvas element. Depending on what your code needs to do, though, you could have two canvases. One on top of the other. The Phaser canvas could be underneath and the fabric canvas could be on top. When you need to drag or reposition something you could set it to renderable=false in Phaser and stick its image in fabric until the user is done, then pull the values out of fabric and set them on the Phaser.Sprite and set it renderable=true again. Link to comment Share on other sites More sharing options...
odelia Posted April 19, 2016 Author Share Posted April 19, 2016 yeah.. that's what I thought... Thank you. Link to comment Share on other sites More sharing options...
Recommended Posts