From f5a4d12ac6144d529a228ffccbc624956a71d477 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?H=C3=A5kon=20Flatval?= <70905152+haakonflatval-cognite@users.noreply.github.com> Date: Wed, 10 Apr 2024 11:18:55 +0200 Subject: [PATCH] chore: bump 4.12.0 (#4369) * chore: bump Reveal to version 4.12.0 * chore: small simplification --- viewer/package.json | 2 +- .../cad-model/src/picking/PickingHandler.ts | 15 +++------------ 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/viewer/package.json b/viewer/package.json index c783dda2bf8..7233d58ed45 100644 --- a/viewer/package.json +++ b/viewer/package.json @@ -1,6 +1,6 @@ { "name": "@cognite/reveal", - "version": "4.11.1", + "version": "4.12.0", "description": "WebGL based 3D viewer for CAD and point clouds processed in Cognite Data Fusion.", "homepage": "https://github.com/cognitedata/reveal/tree/master/viewer", "repository": { diff --git a/viewer/packages/cad-model/src/picking/PickingHandler.ts b/viewer/packages/cad-model/src/picking/PickingHandler.ts index bff8d30d7c4..ac1223fabdf 100644 --- a/viewer/packages/cad-model/src/picking/PickingHandler.ts +++ b/viewer/packages/cad-model/src/picking/PickingHandler.ts @@ -21,7 +21,6 @@ type PickingInput = { x: number; y: number; }; - scene: THREE.Scene; camera: THREE.PerspectiveCamera; renderer: THREE.WebGLRenderer; domElement: HTMLElement; @@ -190,19 +189,11 @@ export class PickingHandler { } private async intersectCadNodeDepth(input: PickingInput, async: boolean) { - const { camera, normalizedCoords, renderer, domElement, cadNodes, scene } = input; - const pickInput = { - normalizedCoords, - camera, - renderer, - domElement, - scene, - cadNodes - }; - const depth = await this.pickDepth(pickInput, async); + const { camera } = input; + const depth = await this.pickDepth(input, async); const viewZ = this.perspectiveDepthToViewZ(depth, camera.near, camera.far); - const point = this.getPosition(pickInput, viewZ); + const point = this.getPosition(input, viewZ); const distance = new THREE.Vector3().subVectors(point, camera.position).length(); return { distance,