New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(events)!: pointerevents manager and state #529
Commits on Feb 1, 2024
-
new file: playground/src/components/Box.vue
new file: playground/src/pages/raycaster/Propogation.vue * Started work on interactive Event Propogation playground example modified: src/components/TresCanvas.vue * Import and use `useEventStore` * defineEmits for all expected pointer events so we may emit propogated events off of the canvasa modified: src/composables/index.ts new file: src/composables/useEventStore/index.ts * Started work on an event store. I'm not sure this counts as a store just yet * Wired up majority of pointer events * Added event propogation * Does not require using userData scene props or nodeOps for registering objects to scene modified: src/composables/useRaycaster/index.ts * Added new event listeners to power newly supported pointer events. We now check whole scene/children when calling intersectObjects. * Created new EventHooks for new events * Added `forceUpdate` function that allows for pointer-move events to work without mouth movement (good for when camera is moving but mouse is not) modified: src/core/nodeOps.ts * Added supported events to array so they don't get received as props * (temporarily) unhook current pointer event solution to iterate on useEventStore modified: src/utils/index.ts * Added Camel-to-kebab case util
Configuration menu - View commit details
-
Copy full SHA for 4ef245b - Browse repository at this point
Copy the full SHA 4ef245bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 1a491da - Browse repository at this point
Copy the full SHA 1a491daView commit details -
Configuration menu - View commit details
-
Copy full SHA for 580029d - Browse repository at this point
Copy the full SHA 580029dView commit details
Commits on Feb 2, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 56776ae - Browse repository at this point
Copy the full SHA 56776aeView commit details -
fix: remove
createGlobalState
fromuseEventStore
, allowing events…… to work while multiple TresCanvas' are being used
Configuration menu - View commit details
-
Copy full SHA for de9f843 - Browse repository at this point
Copy the full SHA de9f843View commit details -
fix(perf): remove extraneous intersectObjects/getIntersects calls by …
…moving intersects into a ref that is updated on pointer-move
Configuration menu - View commit details
-
Copy full SHA for d42feb3 - Browse repository at this point
Copy the full SHA d42feb3View commit details
Commits on Mar 7, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 50dcaed - Browse repository at this point
Copy the full SHA 50dcaedView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7783233 - Browse repository at this point
Copy the full SHA 7783233View commit details
Commits on Mar 17, 2024
-
feat: enhance events manager to include duplicates checking, pointer-…
…missed support, and forced updating Per file changelog: modified: playground/src/components/Box.vue * Added a pointer-missed handler for testing modified: playground/src/pages/TheBasic.vue * uses forceUpdate from EventManager to fire events even when the mouse hasn't moved modified: playground/src/pages/raycaster/Propagation.vue * Didn't mean to undo the lint changes, adds a pointer-missed event on the canvas for extra testing modified: src/components/TresCanvas.vue * Adds `pointer-missed` as possible event for canvas emits modified: src/composables/index.ts * Update export deleted: src/composables/useEventStore/index.ts * Rename `useEventStore` to `useTresEventManager` modified: src/composables/useRaycaster/index.ts * Check for empty intersects on hit test, wire up pointerMissed events eventHook * Fix forceUpdate to call onPointerMove instead of triggering an EventHook modified: src/composables/useTresContextProvider/index.ts * Add TresEventManager type new file: src/composables/useTresEventManager/index.ts * add onPointerMissed * create (de)registerPointerMissedObj methods so we can track objects in the scene listening to this event * Note: These are passed to nodeOps via TresContext * Implement duplicates checking for eventPropogation modified: src/core/nodeOps.ts * register/deregister pointerMissed objects
Configuration menu - View commit details
-
Copy full SHA for 8a6f0a1 - Browse repository at this point
Copy the full SHA 8a6f0a1View commit details -
Configuration menu - View commit details
-
Copy full SHA for b5124ca - Browse repository at this point
Copy the full SHA b5124caView commit details
Commits on Mar 20, 2024
-
Configuration menu - View commit details
-
Copy full SHA for a251b05 - Browse repository at this point
Copy the full SHA a251b05View commit details
Commits on Mar 22, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 199c654 - Browse repository at this point
Copy the full SHA 199c654View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8f8ba50 - Browse repository at this point
Copy the full SHA 8f8ba50View commit details
Commits on Apr 16, 2024
-
feat: enhance event object details and use in Box example to change m…
…aterial color. Add ability to force event system updates even when mouse hasn't moved. Enhance pointer-enter/leave events. Update types Box.vue * Added pointer-missed handler * set the materials flash color using the object coming off of the event instead of a ref UseRaycaster * Flesh out event details to include * all mouse event properties * intersections * tres camera * camera raycaster * source event * mouse position delta * stopPropagating stub * and unprojectedPoint (this needs work, cant get the math to work) UseTresContextProvider * Add TresEventManager type to TresContext useTresEventManager * Add forceUpdate method to allow apps to force an event system update even when the mouse hasnt moved * Add pointerMissed event * Properly implement pointer-enter/pointer-leave events * Before now, pointer-enter | leave were only called on first object in intersection, now we execute the events for all entered/left objects * Use stopPropagating property included on event object
Configuration menu - View commit details
-
Copy full SHA for f3ae9bb - Browse repository at this point
Copy the full SHA f3ae9bbView commit details -
Merge branch '515-pointer-eventmanager-state' of github.com:Tresjs/tr…
…es into 515-pointer-eventmanager-state
Configuration menu - View commit details
-
Copy full SHA for 1677751 - Browse repository at this point
Copy the full SHA 1677751View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7aca715 - Browse repository at this point
Copy the full SHA 7aca715View commit details -
Configuration menu - View commit details
-
Copy full SHA for 496cd28 - Browse repository at this point
Copy the full SHA 496cd28View commit details
Commits on Apr 17, 2024
-
Configuration menu - View commit details
-
Copy full SHA for 9981ad7 - Browse repository at this point
Copy the full SHA 9981ad7View commit details
Commits on Apr 22, 2024
-
Configuration menu - View commit details
-
Copy full SHA for be99065 - Browse repository at this point
Copy the full SHA be99065View commit details