Hype Drag Controller

A self-contained, physics-agnostic drag-and-drop controller for Tumult Hype. Provides a clean, namespaced API with data-attribute-based target detection and callback support for creating interactive drag-and-drop experiences.

2 Likes

I just finished two drag and drop projects. I’m excited about your new extension!!

1 Like

This doesn’t contain any fancy detection methods and only works on elements where the drop targets and drag elements are at the same group level. No fancy intersection observers or Matter.js-based detection… (yet) … just basic bounding box calculations, so it doesn’t account for scale transforms. I’ll probably add more sophisticated detection methods down the line, but for the project I used this on, it was totally sufficient.
The goal was to unify all the interaction logic into a single function. You just need to add identifying markers to your objects and attach the drag controller, then everything else is handled automatically. This lets you write your entire game logic in one central place that gets triggered at scene load, making it dead simple for vibe coders to create drag-and-drop games without wrestling with scattered event handlers