Skip to content

Commit

Permalink
squash
Browse files Browse the repository at this point in the history
  • Loading branch information
andretchen0 committed Sep 28, 2024
1 parent 395d8a9 commit 799ad72
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/utils/createEventManager/eventsRaycast.ts
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ function getIntersectionsPool(_event: RaycastEvent, config: Config) {
// of hit-tested objects.

if (config.isEventsDirty) {
function getIntersectionsPoolRecurHelper(object: Object3DWithEvents, hasEvents: boolean) {
function getIntersectionsPoolRecurHelper(object: Object3D, hasEvents: boolean) {
// NOTE: We don't need to check for events if we're in a tree that `hasEvents`.
if (!hasEvents) {
for (const domEventName of DOM_EVENT_NAMES) {
Expand Down Expand Up @@ -172,7 +172,7 @@ function getIntersectionsPool(_event: RaycastEvent, config: Config) {
return config.objectsWithEvents
}

function getIntersections(pool: Object3DWithEvents[], config: Config) {
function getIntersections(pool: Object3D[], config: Config) {
return config.raycaster.intersectObjects(pool, false)
}

Expand Down Expand Up @@ -685,7 +685,7 @@ function callIntersectionObjectsIf(domEventName: DomEventName, event: ThreeEvent
// NOTE: An event "is-a" `Intersection`,
// so copy intersection values to the event.
Object.assign(event, intersection)
let object: Object3DWithEvents | null = intersection.object
let object: Object3D | null = intersection.object
while (object && !duplicates.has(object)) {
duplicates.add(object)
if (cond(object)) {
Expand Down
1 change: 0 additions & 1 deletion src/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,6 @@ export function prepareTresInstance<T extends TresObject>(obj: T, state: Partial
type: 'unknown',
eventCount: 0,
root: context,
handlers: {},
memoizedProps: {},
objects: [],
parent: null,
Expand Down

0 comments on commit 799ad72

Please sign in to comment.