You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: implement handling of drag events (file drag & drop)
Apart from the usual canvas dragenter & dragleave, this commits adds
special handlers: onDragOverEnter, onDragOverLeave & onDragOverMissed.
These are fired when dragover events intersect with objects in a scene
or miss all of them, similar to how onPointerMissed already works.
onDrop and onDropMissed are other additions. These can come handy
when working on editor UIs etc. that need to attribute different drag &
drop actions to different objects.
Copy file name to clipboardExpand all lines: docs/API/events.mdx
+8-1Lines changed: 8 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,13 +8,20 @@ nav: 8
8
8
9
9
Additionally, there's a special `onUpdate` that is called every time the object gets fresh props, which is good for things like `self => (self.verticesNeedUpdate = true)`.
10
10
11
-
Also notice the `onPointerMissed` on the canvas element, which fires on clicks that haven't hit _any_ meshes.
11
+
Also notice the `onPointerMissed` on the canvas element, which fires on clicks that haven't hit _any_ meshes. Similarly, `onDragOverMissed` and `onDropMissed` can handle actions that need to be taken when file drag & drop drag events are not hitting items in the scene.
0 commit comments