Closed Runasia closed 1 year ago
attribute firstHitOnly of Raycaster() not exist in three.module.js.(i try ctrl+f
This is specified as a part of the three-mesh-bvh and the dts files.
Can you check if the raycasting works correctly without three-mesh-bvh? There should be no difference in the raycasting results between three.js and three-mesh-bvh.
This is specified as a part of the three-mesh-bvh and the dts files.
Thanks!Because of your suggestion i finded that . due to
import {Raycaster, Vector2} from "three";
So i make a mistake to find Raycaster's attribute (firstHitOnly) in three.js .
and my idea even can't find not defined firstHitOnly and think Raycaster just belone in three.module.js , Maybe I am too rely on it.
Can you check if the raycasting works correctly without three-mesh-bvh? There should be no difference in the raycasting results between three.js and three-mesh-bvh.
It's work!! And it can find expressId !
ifcModels = []
ifcLoader.load('/bimModel/rac_advanced_sample_project.ifc', function (ifcModel) {
scene.add(ifcModel);
ifcModels.push(ifcModel)
// ifcLoader.ifcManager.setupThreeMeshBVH(
// acceleratedRaycast,
// computeBoundsTree,
// disposeBoundsTree
// );
});
Thanks for your help!@gkjohnson.
You should submit a bug to IFC.js with a minimal example of the problem, then. There should be no difference in results between three.js' raycast results and three-mesh-bvhs.
Hi, I wirte this
const raycaster = new Raycaster() raycaster.firstHitOnly = true;
attribute firstHitOnly of Raycaster() not exist in three.module.js.(i try ctrl+f
the version is
"name": "three", "version": "0.149.0",
another difficult is raycaster.intersectObjects return a undefine value. this is my code
raycaster.setFromCamera(mouse, camera); raycaster.intersectObjects(ifcModels,true);
I debug in Google Chrome and make sure mouse & camera & ifcmodels has valueand thanks seeing this issue.