mirror of
https://github.com/yeicor-3d/yet-another-cad-viewer.git
synced 2025-12-20 06:27:04 +01:00
fix selection
This commit is contained in:
@@ -88,7 +88,7 @@ let selectionListener = (event: MouseEvent) => {
|
|||||||
// Find all hit objects and select the wanted one based on the filter
|
// Find all hit objects and select the wanted one based on the filter
|
||||||
const hits = raycaster.intersectObject(scene, true);
|
const hits = raycaster.intersectObject(scene, true);
|
||||||
let hit = hits.find((hit: Intersection<Object3D>) => {
|
let hit = hits.find((hit: Intersection<Object3D>) => {
|
||||||
if (!hit.object || !(hit.object as any).isMesh) return false;
|
if (!hit.object) return false;
|
||||||
const kind = hit.object.type
|
const kind = hit.object.type
|
||||||
let isFace = kind === 'Mesh' || kind === 'SkinnedMesh';
|
let isFace = kind === 'Mesh' || kind === 'SkinnedMesh';
|
||||||
let isEdge = kind === 'Line' || kind === 'LineSegments';
|
let isEdge = kind === 'Line' || kind === 'LineSegments';
|
||||||
|
|||||||
Reference in New Issue
Block a user