Skip to content

Commit

Permalink
fix(types): remove use of Object3D generic (#3067)
Browse files Browse the repository at this point in the history
  • Loading branch information
CodyJasonBennett authored Oct 25, 2023
1 parent b39cc5b commit 5e4a8e3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/fiber/src/core/events.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ export function createEvents(store: UseBoundStore<RootState>) {
state.events.compute?.(event, state)
}

function handleRaycast(obj: THREE.Object3D<THREE.Event>) {
function handleRaycast(obj: THREE.Object3D) {
const state = getRootState(obj)
// Skip event handling when noEvents is set, or when the raycasters camera is null
if (!state || !state.events.enabled || state.raycaster.camera === null) return []
Expand All @@ -222,7 +222,7 @@ export function createEvents(store: UseBoundStore<RootState>) {
}

// Collect events
let hits: THREE.Intersection<THREE.Object3D<THREE.Event>>[] = eventsObjects
let hits: THREE.Intersection<THREE.Object3D>[] = eventsObjects
// Intersect objects
.flatMap(handleRaycast)
// Sort by event priority and distance
Expand Down

0 comments on commit 5e4a8e3

Please sign in to comment.