@shapediver/viewer.data-engine.tag3d-engine 3.3.4 → 3.3.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shapediver/viewer.data-engine.tag3d-engine",
3
- "version": "3.3.4",
3
+ "version": "3.3.7",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "author": "Michael Oppitz <michael@shapediver.com>",
@@ -10,11 +10,10 @@
10
10
  "test": "__tests__"
11
11
  },
12
12
  "files": [
13
- "dist",
14
- "src",
15
13
  "package.json",
14
+ "dist/",
16
15
  "README.md",
17
- "tsconfig.json"
16
+ "LICENSE"
18
17
  ],
19
18
  "publishConfig": {
20
19
  "access": "public"
@@ -40,11 +39,11 @@
40
39
  },
41
40
  "dependencies": {
42
41
  "@shapediver/sdk.geometry-api-sdk-v2": "1.11.0",
43
- "@shapediver/viewer.data-engine.shared-types": "3.3.4",
44
- "@shapediver/viewer.shared.global-access-objects": "3.3.4",
45
- "@shapediver/viewer.shared.node-tree": "3.3.4",
46
- "@shapediver/viewer.shared.services": "3.3.4",
47
- "@shapediver/viewer.shared.types": "3.3.4"
42
+ "@shapediver/viewer.data-engine.shared-types": "3.3.7",
43
+ "@shapediver/viewer.shared.global-access-objects": "3.3.7",
44
+ "@shapediver/viewer.shared.node-tree": "3.3.7",
45
+ "@shapediver/viewer.shared.services": "3.3.7",
46
+ "@shapediver/viewer.shared.types": "3.3.7"
48
47
  },
49
- "gitHead": "8193da527b4e3fc4d90181018bd60d6ac70be3e8"
48
+ "gitHead": "112787d5c5226cca5e89d08102d0b1a3dd4a1d71"
50
49
  }
@@ -1,62 +0,0 @@
1
- import { CustomData } from '@shapediver/viewer.shared.types';
2
- import { GlobalAccessObjects } from '@shapediver/viewer.shared.global-access-objects';
3
- import { ITag3D } from '@shapediver/viewer.data-engine.shared-types';
4
- import { ITreeNode, TreeNode } from '@shapediver/viewer.shared.node-tree';
5
- import { ShapeDiverResponseOutputContent } from '@shapediver/sdk.geometry-api-sdk-v2';
6
- import { ShapeDiverViewerDataProcessingError, StateEngine } from '@shapediver/viewer.shared.services';
7
-
8
- export class Tag3dEngine {
9
- // #region Properties (3)
10
-
11
- private readonly _globalAccessObjects: GlobalAccessObjects = GlobalAccessObjects.instance;
12
- private readonly _stateEngine: StateEngine = StateEngine.instance;
13
-
14
- private static _instance: Tag3dEngine;
15
-
16
- // #endregion Properties (3)
17
-
18
- // #region Public Static Getters And Setters (1)
19
-
20
- public static get instance() {
21
- return this._instance || (this._instance = new this());
22
- }
23
-
24
- // #endregion Public Static Getters And Setters (1)
25
-
26
- // #region Public Methods (1)
27
-
28
- /**
29
- * Load the tag3d content into a scene graph node.
30
- *
31
- * @param content the tag3d content
32
- * @returns the scene graph node
33
- */
34
- public async loadContent(content: ShapeDiverResponseOutputContent): Promise<ITreeNode> {
35
- const node = new TreeNode('tag3d');
36
-
37
- if (!content)
38
- throw new ShapeDiverViewerDataProcessingError('Tag3dEngine.loadContent: Invalid content was provided to tag3d engine.');
39
-
40
- if (content.data && Array.isArray(content.data)) {
41
- if (this._globalAccessObjects.loadTag3D) {
42
- for (let i = 0; i < content.data.length; i++) {
43
- const tag3dInfo: ITag3D = content.data[i];
44
- const child = this._globalAccessObjects.loadTag3D(tag3dInfo);
45
- if (child) node.addChild(child);
46
- }
47
- } else {
48
- const customData = new CustomData({});
49
- for (let i = 0; i < content.data.length; i++) {
50
- const tag3dInfo: ITag3D = content.data[i];
51
- customData.data['tag3d_' + tag3dInfo.version] = tag3dInfo;
52
- }
53
- node.addData(customData);
54
- }
55
- } else {
56
- throw new ShapeDiverViewerDataProcessingError('Tag3dEngine.loadContent: No tag3d data was provided to tag3d engine.');
57
- }
58
- return node;
59
- }
60
-
61
- // #endregion Public Methods (1)
62
- }
package/src/index.ts DELETED
@@ -1,5 +0,0 @@
1
- import { Tag3dEngine } from './Tag3dEngine'
2
-
3
- export {
4
- Tag3dEngine
5
- }
package/tsconfig.json DELETED
@@ -1,20 +0,0 @@
1
- {
2
- "extends": "../../tsconfig.json",
3
- "include": [
4
- "./**/*.js",
5
- "./**/*.d.ts",
6
- "./**/*.ts"
7
- ],
8
- "compilerOptions": {
9
- "rootDir": "src",
10
- "outDir": "dist",
11
- "allowJs": true
12
- },
13
- "exclude": [
14
- "__tests__",
15
- "node_modules",
16
- "dist",
17
- "dist-dev",
18
- "dist-prod"
19
- ]
20
- }