Skip to content

Add drag n drop #3

@v1rtl

Description

@v1rtl

This would be a cool feature because most of the js physics libraries have it.

Maybe we could have a special prop, e.g. dnd={true} for both World in case we want to make every element draggable, and for Item, if we only want item to be dragged.

Example proposal:

<World gravity={[0, 9.8]} dnd>
  <Item dnd />
</World>

I made a fork and I'll try to implement this feature using ClientX and ClientY and then submit a PR

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions