@@ -128,24 +128,24 @@ export class SimpleRaycaster implements Disposable {
128128 return fragResult ;
129129 }
130130
131- // / **
132- // * Casts a ray from a given origin in a given direction and returns the first item found.
133- // * This method also takes into account the clipping planes used by the renderer.
134- // *
135- // * @param origin - The origin of the ray.
136- // * @param direction - The direction of the ray.
137- // * @param items - The meshes to query. If not provided, it will query all the meshes stored in {@link World.meshes}.
138- // * @returns The first intersection found or `null` if no intersection was found.
139- // */
140- // castRayFromVector(
141- // origin: THREE.Vector3,
142- // direction: THREE.Vector3,
143- // items = Array.from(this.world.meshes),
144- // ) {
145- // // TODO: Implement for fragmentsmodel
146- // this.three.set(origin, direction);
147- // return this.intersect(items);
148- // }
131+ /**
132+ * Casts a ray from a given origin in a given direction and returns the first item found.
133+ * This method also takes into account the clipping planes used by the renderer.
134+ *
135+ * @param origin - The origin of the ray.
136+ * @param direction - The direction of the ray.
137+ * @param items - The meshes to query. If not provided, it will query all the meshes stored in {@link World.meshes}.
138+ * @returns The first intersection found or `null` if no intersection was found.
139+ */
140+ castRayFromVector (
141+ origin : THREE . Vector3 ,
142+ direction : THREE . Vector3 ,
143+ items = Array . from ( this . world . meshes ) ,
144+ ) {
145+ // TODO: Implement for fragmentsmodel
146+ this . three . set ( origin , direction ) ;
147+ return this . intersect ( items ) ;
148+ }
149149
150150 private intersect ( items : THREE . Object3D [ ] = Array . from ( this . world . meshes ) ) {
151151 const result = this . three . intersectObjects ( items ) ;
0 commit comments