Skip to content

Commit acc7d7f

Browse files
committed
expose event.intersection and update screenPoint when capturing a pointer using the screen intersector
1 parent e56746c commit acc7d7f

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

packages/pointer-events/src/event.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,7 @@ export class PointerEvent<E extends NativeEvent = globalThis.PointerEvent>
179179
public readonly bubbles: boolean,
180180
nativeEvent: E,
181181
protected internalPointer: Pointer,
182-
protected readonly intersection: ThreeIntersection,
182+
public readonly intersection: ThreeIntersection,
183183
public readonly camera: Camera,
184184
public readonly currentObject: Object3D = intersection.object,
185185
public readonly object: Object3D = currentObject,

packages/pointer-events/src/intersections/ray.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,10 @@ export class ScreenRayIntersector implements Intersector {
190190
}
191191
return {
192192
...intersection,
193+
details: {
194+
...details,
195+
screenPoint: this.coords.clone(),
196+
},
193197
uv,
194198
object,
195199
point,

0 commit comments

Comments
 (0)