Skip to content

Commit

Permalink
expose event.intersection and update screenPoint when capturing a poi…
Browse files Browse the repository at this point in the history
…nter using the screen intersector
  • Loading branch information
bbohlender committed Nov 28, 2024
1 parent e56746c commit acc7d7f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion packages/pointer-events/src/event.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ export class PointerEvent<E extends NativeEvent = globalThis.PointerEvent>
public readonly bubbles: boolean,
nativeEvent: E,
protected internalPointer: Pointer,
protected readonly intersection: ThreeIntersection,
public readonly intersection: ThreeIntersection,
public readonly camera: Camera,
public readonly currentObject: Object3D = intersection.object,
public readonly object: Object3D = currentObject,
Expand Down
4 changes: 4 additions & 0 deletions packages/pointer-events/src/intersections/ray.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,10 @@ export class ScreenRayIntersector implements Intersector {
}
return {
...intersection,
details: {
...details,
screenPoint: this.coords.clone(),
},
uv,
object,
point,
Expand Down

0 comments on commit acc7d7f

Please sign in to comment.