How to implement drag enter/over/leave tool event handler

Prashant
Hello Team, we have a requirement where we need to drag/move the one of the mesh of the model in the scene. we reviewed the Player Client API. According to the Threekit docs there are dragenter, dragover and dragleave …

Comments

5 comments

  • Comment author
    Prashant

    Hello Team,

    we have a requirement where we need to drag/move the one of the mesh of the model in the scene. we reviewed the Player Client API.

    According to the Threekit docs there are dragenter, dragover and dragleave handlers but when I create a tool with those and put console logs in, I am not seeing them being called.

    How we can achieve the functionality.

    0
  • Comment author
    Ian Drews

    Hello Prashant,

    I believe this previous thread should answer your questions. thread. Please let me know if it was helpful

    Ian

    0
  • Comment author
    Prashant

    @Ian Hello Ian,

    I have read the thread and response from Will. It works fine when we are dragging something from outside of the player. But we have requirement where we want to move one of the mesh with in the player. So was thinking of using the player API drag events. otherwise we need to check the mouse up and down events.

    0
  • Comment author
    Prashant

    And how we can make the player/nodes droppable elements so that when we drag something we should be able to drop it on the player/node.

    Example there are 4 color swatches and client want to drag the color and drop it on the player so that model color can be changed .

    0
  • Comment author
    William Thompson

    Hi Prashant, these features are not yet publicly documented so I have found some resources to help you. Someone from Threekit should be in touch if they have not already. I am going to close this thread, please DM me if I can help coordinate.

    0

Please sign in to leave a comment.