Jump to content

Phaser image editor


odelia
 Share

Recommended Posts

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

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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

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