@shapediver/viewer.data-engine.material-database-engine 3.16.7 → 3.16.9
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/dist/MaterialDatabaseEngine.d.ts +24 -24
- package/dist/MaterialDatabaseEngine.js +133 -133
- package/dist/MaterialDatabaseEngine.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +9 -9
- package/package.json +9 -9
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
import { ResOutputContent } from "@shapediver/sdk.geometry-api-sdk-v2";
|
|
2
|
-
import { ITreeNode } from "@shapediver/viewer.shared.node-tree";
|
|
3
|
-
export declare class MaterialDatabaseEngine {
|
|
4
|
-
private readonly _converter;
|
|
5
|
-
private readonly _httpClient;
|
|
6
|
-
private readonly _logger;
|
|
7
|
-
private readonly _materialDatabase;
|
|
8
|
-
private readonly _materialEngine;
|
|
9
|
-
private static _instance;
|
|
10
|
-
static get instance(): MaterialDatabaseEngine;
|
|
11
|
-
/**
|
|
12
|
-
* Assigns materials from the material database to the geometry data in the given node.
|
|
13
|
-
*
|
|
14
|
-
* @param node the scene graph node
|
|
15
|
-
*/
|
|
16
|
-
assignMaterialFromDatabase(node: ITreeNode): Promise<void>;
|
|
17
|
-
/**
|
|
18
|
-
* Load the material database from the given output content.
|
|
19
|
-
*
|
|
20
|
-
* @param content the output content
|
|
21
|
-
* @returns a scene graph node placeholder for the material database
|
|
22
|
-
*/
|
|
23
|
-
loadContent(content: ResOutputContent): Promise<ITreeNode>;
|
|
24
|
-
}
|
|
1
|
+
import { ResOutputContent } from "@shapediver/sdk.geometry-api-sdk-v2";
|
|
2
|
+
import { ITreeNode } from "@shapediver/viewer.shared.node-tree";
|
|
3
|
+
export declare class MaterialDatabaseEngine {
|
|
4
|
+
private readonly _converter;
|
|
5
|
+
private readonly _httpClient;
|
|
6
|
+
private readonly _logger;
|
|
7
|
+
private readonly _materialDatabase;
|
|
8
|
+
private readonly _materialEngine;
|
|
9
|
+
private static _instance;
|
|
10
|
+
static get instance(): MaterialDatabaseEngine;
|
|
11
|
+
/**
|
|
12
|
+
* Assigns materials from the material database to the geometry data in the given node.
|
|
13
|
+
*
|
|
14
|
+
* @param node the scene graph node
|
|
15
|
+
*/
|
|
16
|
+
assignMaterialFromDatabase(node: ITreeNode): Promise<void>;
|
|
17
|
+
/**
|
|
18
|
+
* Load the material database from the given output content.
|
|
19
|
+
*
|
|
20
|
+
* @param content the output content
|
|
21
|
+
* @returns a scene graph node placeholder for the material database
|
|
22
|
+
*/
|
|
23
|
+
loadContent(content: ResOutputContent): Promise<ITreeNode>;
|
|
24
|
+
}
|
|
25
25
|
//# sourceMappingURL=MaterialDatabaseEngine.d.ts.map
|
|
@@ -1,134 +1,134 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.MaterialDatabaseEngine = void 0;
|
|
13
|
-
const viewer_data_engine_material_engine_1 = require("@shapediver/viewer.data-engine.material-engine");
|
|
14
|
-
const viewer_shared_node_tree_1 = require("@shapediver/viewer.shared.node-tree");
|
|
15
|
-
const viewer_shared_services_1 = require("@shapediver/viewer.shared.services");
|
|
16
|
-
class MaterialDatabaseEngine {
|
|
17
|
-
constructor() {
|
|
18
|
-
this._converter = viewer_shared_services_1.Converter.instance;
|
|
19
|
-
this._httpClient = viewer_shared_services_1.HttpClient.instance;
|
|
20
|
-
this._logger = viewer_shared_services_1.Logger.instance;
|
|
21
|
-
this._materialDatabase = {};
|
|
22
|
-
this._materialEngine = viewer_data_engine_material_engine_1.MaterialEngine.instance;
|
|
23
|
-
}
|
|
24
|
-
static get instance() {
|
|
25
|
-
return this._instance || (this._instance = new this());
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Assigns materials from the material database to the geometry data in the given node.
|
|
29
|
-
*
|
|
30
|
-
* @param node the scene graph node
|
|
31
|
-
*/
|
|
32
|
-
assignMaterialFromDatabase(node) {
|
|
33
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
-
if (Object.keys(this._materialDatabase).length === 0)
|
|
35
|
-
return;
|
|
36
|
-
// gather the materials that still need to be created
|
|
37
|
-
// and the corresponding geometry data to assign the created material to
|
|
38
|
-
const materialsToCreate = {};
|
|
39
|
-
let updateNode = false;
|
|
40
|
-
node.traverse((n) => {
|
|
41
|
-
var _a;
|
|
42
|
-
// check if the name of the material is corresponding to a material in the material database output
|
|
43
|
-
for (let i = 0; i < n.data.length; i++) {
|
|
44
|
-
const data = n.data[i];
|
|
45
|
-
if (data instanceof viewer_shared_node_tree_1.GeometryData) {
|
|
46
|
-
const name = (_a = data.material) === null || _a === void 0 ? void 0 : _a.name;
|
|
47
|
-
if (name) {
|
|
48
|
-
// if the material is not found directly, try with original node name as prefix
|
|
49
|
-
// this is can be used for instances
|
|
50
|
-
const materialName = this._materialDatabase[name]
|
|
51
|
-
? name
|
|
52
|
-
: `${node.originalName}_${name}`;
|
|
53
|
-
if (this._materialDatabase[materialName]) {
|
|
54
|
-
if (!this._materialDatabase[materialName].material) {
|
|
55
|
-
if (!materialsToCreate[materialName])
|
|
56
|
-
materialsToCreate[materialName] = [];
|
|
57
|
-
materialsToCreate[materialName].push(data);
|
|
58
|
-
}
|
|
59
|
-
else if (data.material !==
|
|
60
|
-
this._materialDatabase[materialName].material) {
|
|
61
|
-
data.material =
|
|
62
|
-
this._materialDatabase[materialName]
|
|
63
|
-
.material || null;
|
|
64
|
-
// trigger an update of the geometry and the node
|
|
65
|
-
data.updateVersion();
|
|
66
|
-
updateNode = true;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
});
|
|
73
|
-
if (updateNode)
|
|
74
|
-
node.updateVersion();
|
|
75
|
-
// create the materials that are missing
|
|
76
|
-
const materialNames = Object.keys(materialsToCreate);
|
|
77
|
-
if (materialNames.length === 0)
|
|
78
|
-
return;
|
|
79
|
-
const promises = [];
|
|
80
|
-
for (const materialName of materialNames) {
|
|
81
|
-
promises.push(this._materialEngine.createMaterialDataFromDefinition(this._materialDatabase[materialName].definition));
|
|
82
|
-
}
|
|
83
|
-
// create the materials
|
|
84
|
-
const materials = yield Promise.all(promises);
|
|
85
|
-
updateNode = false;
|
|
86
|
-
// assign the created materials to the corresponding geometry data
|
|
87
|
-
for (let i = 0; i < materialNames.length; i++) {
|
|
88
|
-
const material = materials[i];
|
|
89
|
-
material.name = materialNames[i];
|
|
90
|
-
this._materialDatabase[material.name].material = material;
|
|
91
|
-
const geometryData = materialsToCreate[material.name];
|
|
92
|
-
for (const data of geometryData) {
|
|
93
|
-
data.material = material;
|
|
94
|
-
data.updateVersion();
|
|
95
|
-
updateNode = true;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
if (updateNode)
|
|
99
|
-
node.updateVersion();
|
|
100
|
-
});
|
|
101
|
-
}
|
|
102
|
-
/**
|
|
103
|
-
* Load the material database from the given output content.
|
|
104
|
-
*
|
|
105
|
-
* @param content the output content
|
|
106
|
-
* @returns a scene graph node placeholder for the material database
|
|
107
|
-
*/
|
|
108
|
-
loadContent(content) {
|
|
109
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
110
|
-
const materialDatabaseData = content.data;
|
|
111
|
-
const materialDatabase = new viewer_shared_node_tree_1.TreeNode("materialDatabase");
|
|
112
|
-
if (!materialDatabaseData)
|
|
113
|
-
return materialDatabase;
|
|
114
|
-
for (const key in materialDatabaseData) {
|
|
115
|
-
if (this._materialDatabase[key]) {
|
|
116
|
-
if (JSON.stringify(this._materialDatabase[key].definition) !==
|
|
117
|
-
JSON.stringify(materialDatabaseData[key])) {
|
|
118
|
-
this._materialDatabase[key] = {
|
|
119
|
-
definition: materialDatabaseData[key],
|
|
120
|
-
};
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
else {
|
|
124
|
-
this._materialDatabase[key] = {
|
|
125
|
-
definition: materialDatabaseData[key],
|
|
126
|
-
};
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
return materialDatabase;
|
|
130
|
-
});
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
exports.MaterialDatabaseEngine = MaterialDatabaseEngine;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.MaterialDatabaseEngine = void 0;
|
|
13
|
+
const viewer_data_engine_material_engine_1 = require("@shapediver/viewer.data-engine.material-engine");
|
|
14
|
+
const viewer_shared_node_tree_1 = require("@shapediver/viewer.shared.node-tree");
|
|
15
|
+
const viewer_shared_services_1 = require("@shapediver/viewer.shared.services");
|
|
16
|
+
class MaterialDatabaseEngine {
|
|
17
|
+
constructor() {
|
|
18
|
+
this._converter = viewer_shared_services_1.Converter.instance;
|
|
19
|
+
this._httpClient = viewer_shared_services_1.HttpClient.instance;
|
|
20
|
+
this._logger = viewer_shared_services_1.Logger.instance;
|
|
21
|
+
this._materialDatabase = {};
|
|
22
|
+
this._materialEngine = viewer_data_engine_material_engine_1.MaterialEngine.instance;
|
|
23
|
+
}
|
|
24
|
+
static get instance() {
|
|
25
|
+
return this._instance || (this._instance = new this());
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Assigns materials from the material database to the geometry data in the given node.
|
|
29
|
+
*
|
|
30
|
+
* @param node the scene graph node
|
|
31
|
+
*/
|
|
32
|
+
assignMaterialFromDatabase(node) {
|
|
33
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
34
|
+
if (Object.keys(this._materialDatabase).length === 0)
|
|
35
|
+
return;
|
|
36
|
+
// gather the materials that still need to be created
|
|
37
|
+
// and the corresponding geometry data to assign the created material to
|
|
38
|
+
const materialsToCreate = {};
|
|
39
|
+
let updateNode = false;
|
|
40
|
+
node.traverse((n) => {
|
|
41
|
+
var _a;
|
|
42
|
+
// check if the name of the material is corresponding to a material in the material database output
|
|
43
|
+
for (let i = 0; i < n.data.length; i++) {
|
|
44
|
+
const data = n.data[i];
|
|
45
|
+
if (data instanceof viewer_shared_node_tree_1.GeometryData) {
|
|
46
|
+
const name = (_a = data.material) === null || _a === void 0 ? void 0 : _a.name;
|
|
47
|
+
if (name) {
|
|
48
|
+
// if the material is not found directly, try with original node name as prefix
|
|
49
|
+
// this is can be used for instances
|
|
50
|
+
const materialName = this._materialDatabase[name]
|
|
51
|
+
? name
|
|
52
|
+
: `${node.originalName}_${name}`;
|
|
53
|
+
if (this._materialDatabase[materialName]) {
|
|
54
|
+
if (!this._materialDatabase[materialName].material) {
|
|
55
|
+
if (!materialsToCreate[materialName])
|
|
56
|
+
materialsToCreate[materialName] = [];
|
|
57
|
+
materialsToCreate[materialName].push(data);
|
|
58
|
+
}
|
|
59
|
+
else if (data.material !==
|
|
60
|
+
this._materialDatabase[materialName].material) {
|
|
61
|
+
data.material =
|
|
62
|
+
this._materialDatabase[materialName]
|
|
63
|
+
.material || null;
|
|
64
|
+
// trigger an update of the geometry and the node
|
|
65
|
+
data.updateVersion();
|
|
66
|
+
updateNode = true;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
if (updateNode)
|
|
74
|
+
node.updateVersion();
|
|
75
|
+
// create the materials that are missing
|
|
76
|
+
const materialNames = Object.keys(materialsToCreate);
|
|
77
|
+
if (materialNames.length === 0)
|
|
78
|
+
return;
|
|
79
|
+
const promises = [];
|
|
80
|
+
for (const materialName of materialNames) {
|
|
81
|
+
promises.push(this._materialEngine.createMaterialDataFromDefinition(this._materialDatabase[materialName].definition));
|
|
82
|
+
}
|
|
83
|
+
// create the materials
|
|
84
|
+
const materials = yield Promise.all(promises);
|
|
85
|
+
updateNode = false;
|
|
86
|
+
// assign the created materials to the corresponding geometry data
|
|
87
|
+
for (let i = 0; i < materialNames.length; i++) {
|
|
88
|
+
const material = materials[i];
|
|
89
|
+
material.name = materialNames[i];
|
|
90
|
+
this._materialDatabase[material.name].material = material;
|
|
91
|
+
const geometryData = materialsToCreate[material.name];
|
|
92
|
+
for (const data of geometryData) {
|
|
93
|
+
data.material = material;
|
|
94
|
+
data.updateVersion();
|
|
95
|
+
updateNode = true;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
if (updateNode)
|
|
99
|
+
node.updateVersion();
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Load the material database from the given output content.
|
|
104
|
+
*
|
|
105
|
+
* @param content the output content
|
|
106
|
+
* @returns a scene graph node placeholder for the material database
|
|
107
|
+
*/
|
|
108
|
+
loadContent(content) {
|
|
109
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
110
|
+
const materialDatabaseData = content.data;
|
|
111
|
+
const materialDatabase = new viewer_shared_node_tree_1.TreeNode("materialDatabase");
|
|
112
|
+
if (!materialDatabaseData)
|
|
113
|
+
return materialDatabase;
|
|
114
|
+
for (const key in materialDatabaseData) {
|
|
115
|
+
if (this._materialDatabase[key]) {
|
|
116
|
+
if (JSON.stringify(this._materialDatabase[key].definition) !==
|
|
117
|
+
JSON.stringify(materialDatabaseData[key])) {
|
|
118
|
+
this._materialDatabase[key] = {
|
|
119
|
+
definition: materialDatabaseData[key],
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
else {
|
|
124
|
+
this._materialDatabase[key] = {
|
|
125
|
+
definition: materialDatabaseData[key],
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
return materialDatabase;
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
exports.MaterialDatabaseEngine = MaterialDatabaseEngine;
|
|
134
134
|
//# sourceMappingURL=MaterialDatabaseEngine.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MaterialDatabaseEngine.js","sourceRoot":"","sources":["../src/MaterialDatabaseEngine.ts"],"names":[],"mappings":";;;;;;;;;;;;AACA,uGAA8E;AAC9E,iFAI6C;AAC7C,+EAI4C;AAO5C,MAAa,sBAAsB;IAAnC;QACkB,eAAU,GAAc,kCAAS,CAAC,QAAQ,CAAC;QAC3C,gBAAW,GAAe,mCAAU,CAAC,QAAQ,CAAC;QAC9C,YAAO,GAAW,+BAAM,CAAC,QAAQ,CAAC;QAClC,sBAAiB,GAO9B,EAAE,CAAC;QACU,oBAAe,GAAmB,mDAAc,CAAC,QAAQ,CAAC;IA+H5E,CAAC;IA3HO,MAAM,KAAK,QAAQ;QACzB,OAAO,IAAI,CAAC,SAAS,IAAI,CAAC,IAAI,CAAC,SAAS,GAAG,IAAI,IAAI,EAAE,CAAC,CAAC;IACxD,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C,aAAa,EAAE,CAAC;QACtC,CAAC;KAAA;IAED;;;;;OAKG;IACU,WAAW,CAAC,OAAyB;;YACjD,MAAM,oBAAoB,GAAG,OAAO,CAAC,IAIpC,CAAC;YACF,MAAM,gBAAgB,GAAG,IAAI,kCAAQ,CAAC,kBAAkB,CAAC,CAAC;YAC1D,IAAI,CAAC,oBAAoB;gBAAE,OAAO,gBAAgB,CAAC;YAEnD,KAAK,MAAM,GAAG,IAAI,oBAAoB,EAAE,CAAC;gBACxC,IAAI,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,EAAE,CAAC;oBACjC,IACC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC,UAAU,CAAC;wBACtD,IAAI,CAAC,SAAS,CAAC,oBAAoB,CAAC,GAAG,CAAC,CAAC,EACxC,CAAC;wBACF,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,GAAG;4BAC7B,UAAU,EAAE,oBAAoB,CAAC,GAAG,CAAC;yBACrC,CAAC;oBACH,CAAC;gBACF,CAAC;qBAAM,CAAC;oBACP,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,GAAG;wBAC7B,UAAU,EAAE,oBAAoB,CAAC,GAAG,CAAC;qBACrC,CAAC;gBACH,CAAC;YACF,CAAC;YAED,OAAO,gBAAgB,CAAC;QACzB,CAAC;KAAA;CACD;AA3ID,wDA2IC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { MaterialDatabaseEngine } from "./MaterialDatabaseEngine";
|
|
2
|
-
export { MaterialDatabaseEngine };
|
|
1
|
+
import { MaterialDatabaseEngine } from "./MaterialDatabaseEngine";
|
|
2
|
+
export { MaterialDatabaseEngine };
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.MaterialDatabaseEngine = void 0;
|
|
4
|
-
const viewer_shared_global_access_objects_1 = require("@shapediver/viewer.shared.global-access-objects");
|
|
5
|
-
const MaterialDatabaseEngine_1 = require("./MaterialDatabaseEngine");
|
|
6
|
-
Object.defineProperty(exports, "MaterialDatabaseEngine", { enumerable: true, get: function () { return MaterialDatabaseEngine_1.MaterialDatabaseEngine; } });
|
|
7
|
-
const instance = MaterialDatabaseEngine_1.MaterialDatabaseEngine.instance;
|
|
8
|
-
viewer_shared_global_access_objects_1.GlobalAccessObjects.instance.assignMaterialFromDatabase =
|
|
9
|
-
instance.assignMaterialFromDatabase.bind(instance);
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MaterialDatabaseEngine = void 0;
|
|
4
|
+
const viewer_shared_global_access_objects_1 = require("@shapediver/viewer.shared.global-access-objects");
|
|
5
|
+
const MaterialDatabaseEngine_1 = require("./MaterialDatabaseEngine");
|
|
6
|
+
Object.defineProperty(exports, "MaterialDatabaseEngine", { enumerable: true, get: function () { return MaterialDatabaseEngine_1.MaterialDatabaseEngine; } });
|
|
7
|
+
const instance = MaterialDatabaseEngine_1.MaterialDatabaseEngine.instance;
|
|
8
|
+
viewer_shared_global_access_objects_1.GlobalAccessObjects.instance.assignMaterialFromDatabase =
|
|
9
|
+
instance.assignMaterialFromDatabase.bind(instance);
|
|
10
10
|
//# sourceMappingURL=index.js.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shapediver/viewer.data-engine.material-database-engine",
|
|
3
|
-
"version": "3.16.
|
|
3
|
+
"version": "3.16.9",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "Michael Oppitz <michael@shapediver.com>",
|
|
@@ -38,13 +38,13 @@
|
|
|
38
38
|
"testEnvironment": "node"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@shapediver/viewer.data-engine.material-engine": "3.16.
|
|
42
|
-
"@shapediver/viewer.data-engine.shared-types": "3.16.
|
|
43
|
-
"@shapediver/viewer.shared.global-access-objects": "3.16.
|
|
44
|
-
"@shapediver/viewer.shared.node-tree": "3.16.
|
|
45
|
-
"@shapediver/viewer.shared.services": "3.16.
|
|
46
|
-
"@shapediver/viewer.shared.types": "3.16.
|
|
47
|
-
"gl-matrix": "3.
|
|
41
|
+
"@shapediver/viewer.data-engine.material-engine": "3.16.9",
|
|
42
|
+
"@shapediver/viewer.data-engine.shared-types": "3.16.9",
|
|
43
|
+
"@shapediver/viewer.shared.global-access-objects": "3.16.9",
|
|
44
|
+
"@shapediver/viewer.shared.node-tree": "3.16.9",
|
|
45
|
+
"@shapediver/viewer.shared.services": "3.16.9",
|
|
46
|
+
"@shapediver/viewer.shared.types": "3.16.9",
|
|
47
|
+
"gl-matrix": "3.4.4"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "a0c09ebab3b0b75f36130a56d9ed81436846e3c7"
|
|
50
50
|
}
|