@shapediver/viewer.rendering-engine.intersection-engine 3.9.0 → 3.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,3 +1,3 @@
1
1
  # `@shapediver/viewer.rendering-engine.intersection-engine`
2
2
 
3
- This package is part of the [`@shapediver/viewer`](https://www.npmjs.com/package/@shapediver/viewer), you can find all information [here](https://viewer.shapediver.com/v3/latest/api/index.html).
3
+ This package is part of the [`@shapediver/viewer`](https://www.npmjs.com/package/@shapediver/viewer), you can find all information [here](https://viewer.shapediver.com/v3/latest/api/index.html).
@@ -1,8 +1,7 @@
1
- import * as THREE from 'three';
2
- import { GeometryData } from '@shapediver/viewer.shared.types';
3
- import { IIntersection, IIntersectionFilter, IRay } from '@shapediver/viewer.shared.types';
4
- import { IIntersectionEngine } from '../interfaces/IIntersectionEngine';
5
- import { ITreeNode } from '@shapediver/viewer.shared.node-tree';
1
+ import { ITreeNode } from "@shapediver/viewer.shared.node-tree";
2
+ import { GeometryData, IIntersection, IIntersectionFilter, IRay } from "@shapediver/viewer.shared.types";
3
+ import * as THREE from "three";
4
+ import { IIntersectionEngine } from "../interfaces/IIntersectionEngine";
6
5
  export declare class IntersectionEngine implements IIntersectionEngine {
7
6
  private readonly _eventEngine;
8
7
  private readonly _raycaster;
@@ -1 +1 @@
1
- {"version":3,"file":"IntersectionEngine.d.ts","sourceRoot":"","sources":["../../src/implementation/IntersectionEngine.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,IAAI,EAAE,MAAM,iCAAiC,CAAC;AAC3F,OAAO,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AACxE,OAAO,EAAS,SAAS,EAAQ,MAAM,qCAAqC,CAAC;AAE7E,qBAAa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AQ,CAAC,UAAU,CAA0C;IACrE,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAwB;IAE9C,OAAO,CAAC,MAAM,CAAC,SAAS,CAAqB;IAE7C,OAAO,CAAC,eAAe,CAMd;IAMT,OAAO;IAcP,WAAkB,QAAQ,uBAEzB;IAMM,SAAS,CACf,GAAG,EAAE,IAAI,EACT,UAAU,EAAE,MAAM,EAClB,cAAc,CAAC,EAAE,mBAAmB,EAAE,EACtC,eAAe,CAAC,EAAE,KAAK,CAAC,mBAAmB,GACzC,aAAa,EAAE;IAoDX,aAAa,CACnB,GAAG,EAAE,IAAI,EACT,IAAI,EAAE,SAAS,EACf,YAAY,EAAE;QAAC,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,CAAA;KAAC,EAC3C,UAAU,EAAE,MAAM,EAClB,cAAc,CAAC,EAAE,mBAAmB,EAAE,EACtC,eAAe,CAAC,EAAE,KAAK,CAAC,mBAAmB,GACzC,aAAa,EAAE,GAAG,SAAS;IAyC9B;;OAEG;IACH,OAAO,CAAC,WAAW;IAyCnB;;;;;;;;OAQG;IACH,OAAO,CAAC,gBAAgB;CAwDxB"}
@@ -24,10 +24,10 @@ var __importStar = (this && this.__importStar) || function (mod) {
24
24
  };
25
25
  Object.defineProperty(exports, "__esModule", { value: true });
26
26
  exports.IntersectionEngine = void 0;
27
- const THREE = __importStar(require("three"));
27
+ const viewer_shared_node_tree_1 = require("@shapediver/viewer.shared.node-tree");
28
28
  const viewer_shared_services_1 = require("@shapediver/viewer.shared.services");
29
29
  const viewer_shared_types_1 = require("@shapediver/viewer.shared.types");
30
- const viewer_shared_node_tree_1 = require("@shapediver/viewer.shared.node-tree");
30
+ const THREE = __importStar(require("three"));
31
31
  class IntersectionEngine {
32
32
  // #endregion Properties (5)
33
33
  // #region Constructors (1)
@@ -51,7 +51,7 @@ class IntersectionEngine {
51
51
  // #region Public Methods (2)
52
52
  intersect(ray, viewportId, filterCriteria, rayCasterParams) {
53
53
  let intersections = [];
54
- this._intersectNodes.forEach(i => {
54
+ this._intersectNodes.forEach((i) => {
55
55
  const currentIntersections = this.intersectNode(ray, i.node, i.geometryData, viewportId, filterCriteria, rayCasterParams);
56
56
  if (currentIntersections)
57
57
  intersections = intersections.concat(currentIntersections);
@@ -71,13 +71,13 @@ class IntersectionEngine {
71
71
  return -1;
72
72
  };
73
73
  if (a.geometryData) {
74
- a.node.traverse(node => {
74
+ a.node.traverse((node) => {
75
75
  if (a.geometryData && node.data.includes(a.geometryData))
76
76
  depthA = computeDepth(a.node, node);
77
77
  });
78
78
  }
79
79
  if (b.geometryData) {
80
- b.node.traverse(node => {
80
+ b.node.traverse((node) => {
81
81
  if (b.geometryData && node.data.includes(b.geometryData))
82
82
  depthB = computeDepth(b.node, node);
83
83
  });
@@ -92,7 +92,8 @@ class IntersectionEngine {
92
92
  if (viewportId !== undefined) {
93
93
  if (node.excludeViewports.includes(viewportId))
94
94
  return;
95
- if (node.restrictViewports.length > 0 && !node.restrictViewports.includes(viewportId))
95
+ if (node.restrictViewports.length > 0 &&
96
+ !node.restrictViewports.includes(viewportId))
96
97
  return;
97
98
  }
98
99
  if (filterCriteria) {
@@ -114,7 +115,7 @@ class IntersectionEngine {
114
115
  */
115
116
  gatherNodes() {
116
117
  this._intersectNodes = [];
117
- this._tree.root.traverse(node => {
118
+ this._tree.root.traverse((node) => {
118
119
  if (node.visible === false)
119
120
  return;
120
121
  if (node.intersectionTest === false)
@@ -132,10 +133,12 @@ class IntersectionEngine {
132
133
  }
133
134
  this._intersectNodes.push({
134
135
  node,
135
- geometryData: { [`${geometryData.id}_${geometryData.version}`]: geometryData },
136
+ geometryData: {
137
+ [`${geometryData.id}_${geometryData.version}`]: geometryData,
138
+ },
136
139
  visible,
137
140
  restrictViewports: [...new Set(restrictViewports)],
138
- excludeViewports: [...new Set(excludeViewports)]
141
+ excludeViewports: [...new Set(excludeViewports)],
139
142
  });
140
143
  }
141
144
  }
@@ -160,17 +163,17 @@ class IntersectionEngine {
160
163
  const intersectionThree = this._raycaster.intersectObject(threeJsObject);
161
164
  if (intersectionThree.length === 0)
162
165
  return;
163
- let intersections = intersectionThree.map(i => {
166
+ let intersections = intersectionThree.map((i) => {
164
167
  const intersectionDefinition = {
165
168
  distance: i.distance,
166
169
  point: [i.point.x, i.point.y, i.point.z],
167
170
  node: node,
168
- geometryData: geometryData[`${i.object.parent.SDid}_${i.object.parent.SDversion}`]
171
+ geometryData: geometryData[`${i.object.parent.SDid}_${i.object.parent.SDversion}`],
169
172
  };
170
173
  return intersectionDefinition;
171
174
  });
172
175
  if (filterCriteria) {
173
- intersections = intersections.filter(i => {
176
+ intersections = intersections.filter((i) => {
174
177
  for (let j = 0; j < filterCriteria.length; j++)
175
178
  if (filterCriteria[j](i.node, i.geometryData))
176
179
  return true;
@@ -1 +1 @@
1
- {"version":3,"file":"IntersectionEngine.js","sourceRoot":"","sources":["../../src/implementation/IntersectionEngine.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,6CAA+B;AAC/B,+EAA4E;AAC5E,yEAA+D;AAG/D,iFAA6E;AAE7E,MAAa,kBAAkB;IAiB3B,4BAA4B;IAE5B,2BAA2B;IAE3B;QApBA,yBAAyB;QAER,iBAAY,GAAgB,oCAAW,CAAC,QAAQ,CAAC;QACjD,eAAU,GAAoB,IAAI,KAAK,CAAC,SAAS,EAAE,CAAC;QACpD,UAAK,GAAU,8BAAI,CAAC,QAAQ,CAAC;QAItC,oBAAe,GAMjB,EAAE,CAAC;QAOL,IAAI,CAAC,WAAW,EAAE,CAAC;QACnB,IAAI,CAAC,YAAY,CAAC,WAAW,CAAC,kCAAS,CAAC,QAAQ,CAAC,gBAAgB,EAAE,GAAG,EAAE;YACpE,IAAI,CAAC,WAAW,EAAE,CAAC;QACvB,CAAC,CAAC,CAAC;IACP,CAAC;IAED,8BAA8B;IAE9B,gDAAgD;IAEzC,MAAM,KAAK,QAAQ;QACtB,OAAO,IAAI,CAAC,SAAS,IAAI,CAAC,IAAI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,CAAC,CAAC;aACH;YACD,aAAa,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,GAAG,CAAC,CAAC,QAAQ,CAAC,CAAC;YACtD,OAAO,aAAa,CAAC;SACrB;IACF,CAAC;CAGD;AAjQD,gDAiQC"}
package/dist/index.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { IIntersectionEngine } from './interfaces/IIntersectionEngine';
2
- import { IntersectionEngine } from './implementation/IntersectionEngine';
3
- import { RaycasterParameters } from 'three';
1
+ import { RaycasterParameters } from "three";
2
+ import { IntersectionEngine } from "./implementation/IntersectionEngine";
3
+ import { IIntersectionEngine } from "./interfaces/IIntersectionEngine";
4
4
  export { IIntersectionEngine, RaycasterParameters };
5
5
  export { IntersectionEngine };
6
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAE5C,OAAO,EACL,mBAAmB,EAAE,mBAAmB,EACzC,CAAC;AAEF,OAAO,EACL,kBAAkB,EACnB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,mBAAmB,EAAC,MAAM,OAAO,CAAC;AAC1C,OAAO,EAAC,kBAAkB,EAAC,MAAM,qCAAqC,CAAC;AACvE,OAAO,EAAC,mBAAmB,EAAC,MAAM,kCAAkC,CAAC;AAErE,OAAO,EAAC,mBAAmB,EAAE,mBAAmB,EAAC,CAAC;AAClD,OAAO,EAAC,kBAAkB,EAAC,CAAC"}
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AACA,4EAAyE;AAQvE,mGARO,uCAAkB,OAQP"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AACA,4EAAuE;AAI/D,mGAJA,uCAAkB,OAIA"}
@@ -1,5 +1,5 @@
1
- import * as THREE from 'three';
2
- import { IIntersection, IIntersectionFilter, IRay } from '@shapediver/viewer.shared.types';
1
+ import { IIntersection, IIntersectionFilter, IRay } from "@shapediver/viewer.shared.types";
2
+ import * as THREE from "three";
3
3
  export interface IIntersectionEngine {
4
4
  intersect(ray: IRay, viewportId: string, filterCriteria?: IIntersectionFilter[], rayCasterParams?: THREE.RaycasterParameters): IIntersection[];
5
5
  }
@@ -1 +1 @@
1
- {"version":3,"file":"IIntersectionEngine.d.ts","sourceRoot":"","sources":["../../src/interfaces/IIntersectionEngine.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,IAAI,EAAE,MAAM,iCAAiC,CAAC;AAE3F,MAAM,WAAW,mBAAmB;IAGhC,SAAS,CAAC,GAAG,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,mBAAmB,EAAE,EAAE,eAAe,CAAC,EAAE,KAAK,CAAC,mBAAmB,GAAG,aAAa,EAAE,CAAC;CAGlJ"}
1
+ {"version":3,"file":"IIntersectionEngine.d.ts","sourceRoot":"","sources":["../../src/interfaces/IIntersectionEngine.ts"],"names":[],"mappings":"AAAA,OAAO,EACN,aAAa,EACb,mBAAmB,EACnB,IAAI,EACJ,MAAM,iCAAiC,CAAC;AACzC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,MAAM,WAAW,mBAAmB;IAGnC,SAAS,CACR,GAAG,EAAE,IAAI,EACT,UAAU,EAAE,MAAM,EAClB,cAAc,CAAC,EAAE,mBAAmB,EAAE,EACtC,eAAe,CAAC,EAAE,KAAK,CAAC,mBAAmB,GACzC,aAAa,EAAE,CAAC;CAGnB"}
package/package.json CHANGED
@@ -1,52 +1,52 @@
1
1
  {
2
- "name": "@shapediver/viewer.rendering-engine.intersection-engine",
3
- "version": "3.9.0",
4
- "description": "",
5
- "keywords": [],
6
- "author": "Michael Oppitz <michael@shapediver.com>",
7
- "license": "polyform-noncommercial-1.0.0",
8
- "main": "dist/index.js",
9
- "directories": {
10
- "test": "__tests__"
11
- },
12
- "files": [
13
- "package.json",
14
- "dist/",
15
- "README.md",
16
- "LICENSE"
17
- ],
18
- "publishConfig": {
19
- "access": "public"
20
- },
21
- "repository": {
22
- "type": "git",
23
- "url": "git+https://github.com/shapediver/Viewer.git"
24
- },
25
- "scripts": {
26
- "check": "tsc --noEmit",
27
- "build": "bash ../../scripts/building/build.sh",
28
- "build-watch": "bash ../../scripts/building/build-watch.sh",
29
- "build-dep": "bash ../../scripts/building/build-dep.sh"
30
- },
31
- "bugs": {
32
- "url": "https://github.com/shapediver/Viewer/issues"
33
- },
34
- "homepage": "https://github.com/shapediver/Viewer#readme",
35
- "typings": "dist/index.d.ts",
36
- "jest": {
37
- "preset": "ts-jest",
38
- "testEnvironment": "node"
39
- },
40
- "dependencies": {
41
- "@shapediver/viewer.rendering-engine.rendering-engine": "3.9.0",
42
- "@shapediver/viewer.shared.math": "3.9.0",
43
- "@shapediver/viewer.shared.node-tree": "3.9.0",
44
- "@shapediver/viewer.shared.services": "3.9.0",
45
- "@shapediver/viewer.shared.types": "3.9.0",
46
- "@types/three": "0.162.0",
47
- "detect-it": "4.0.1",
48
- "gl-matrix": "3.3.0",
49
- "three": "0.162.0"
50
- },
51
- "gitHead": "da9892981b62bf47cbae0605a8439dd1fc1dbc27"
2
+ "name": "@shapediver/viewer.rendering-engine.intersection-engine",
3
+ "version": "3.9.1",
4
+ "description": "",
5
+ "keywords": [],
6
+ "author": "Michael Oppitz <michael@shapediver.com>",
7
+ "license": "polyform-noncommercial-1.0.0",
8
+ "main": "dist/index.js",
9
+ "directories": {
10
+ "test": "__tests__"
11
+ },
12
+ "files": [
13
+ "package.json",
14
+ "dist/",
15
+ "README.md",
16
+ "LICENSE"
17
+ ],
18
+ "publishConfig": {
19
+ "access": "public"
20
+ },
21
+ "repository": {
22
+ "type": "git",
23
+ "url": "git+https://github.com/shapediver/Viewer.git"
24
+ },
25
+ "scripts": {
26
+ "check": "tsc --noEmit",
27
+ "build": "bash ../../scripts/building/build.sh",
28
+ "build-watch": "bash ../../scripts/building/build-watch.sh",
29
+ "build-dep": "bash ../../scripts/building/build-dep.sh"
30
+ },
31
+ "bugs": {
32
+ "url": "https://github.com/shapediver/Viewer/issues"
33
+ },
34
+ "homepage": "https://github.com/shapediver/Viewer#readme",
35
+ "typings": "dist/index.d.ts",
36
+ "jest": {
37
+ "preset": "ts-jest",
38
+ "testEnvironment": "node"
39
+ },
40
+ "dependencies": {
41
+ "@shapediver/viewer.rendering-engine.rendering-engine": "3.9.1",
42
+ "@shapediver/viewer.shared.math": "3.9.1",
43
+ "@shapediver/viewer.shared.node-tree": "3.9.1",
44
+ "@shapediver/viewer.shared.services": "3.9.1",
45
+ "@shapediver/viewer.shared.types": "3.9.1",
46
+ "@types/three": "0.162.0",
47
+ "detect-it": "4.0.1",
48
+ "gl-matrix": "3.3.0",
49
+ "three": "0.162.0"
50
+ },
51
+ "gitHead": "d1c3fab987b43a71529204c094035bf210a2e1d9"
52
52
  }