mirror of
https://github.com/troisjs/trois.git
synced 2024-11-24 04:12:02 +08:00
fix intersectRecursive
This commit is contained in:
parent
f3ffea6248
commit
8dd9d24f24
@ -181,7 +181,7 @@ export default function usePointer(options: PointerConfigInterface): PointerInte
|
|||||||
function pointerClick(event: TouchEvent | MouseEvent) {
|
function pointerClick(event: TouchEvent | MouseEvent) {
|
||||||
updatePosition(event)
|
updatePosition(event)
|
||||||
if (intersectObjects.length) {
|
if (intersectObjects.length) {
|
||||||
const intersects = raycaster.intersect(positionN, intersectObjects)
|
const intersects = raycaster.intersect(positionN, intersectObjects, intersectRecursive)
|
||||||
const iMeshes: InstancedMesh[] = []
|
const iMeshes: InstancedMesh[] = []
|
||||||
intersects.forEach(intersect => {
|
intersects.forEach(intersect => {
|
||||||
const { object } = intersect
|
const { object } = intersect
|
||||||
|
@ -4,7 +4,7 @@ import { IntersectObject } from './usePointer'
|
|||||||
export interface RaycasterInterface {
|
export interface RaycasterInterface {
|
||||||
position: Vector3
|
position: Vector3
|
||||||
updatePosition(coords: Vector2): void
|
updatePosition(coords: Vector2): void
|
||||||
intersect(coords: Vector2, objects: IntersectObject[], recursive: boolean): Intersection[],
|
intersect(coords: Vector2, objects: IntersectObject[], recursive?: boolean): Intersection[],
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface RaycasterConfigInterface {
|
export interface RaycasterConfigInterface {
|
||||||
|
Loading…
Reference in New Issue
Block a user