@shapediver/viewer.data-engine.geometry-engine 2.10.1-rc.0 → 2.12.0

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.
Files changed (37) hide show
  1. package/dist/GeometryEngine.d.ts.map +1 -1
  2. package/dist/GeometryEngine.js +18 -14
  3. package/dist/GeometryEngine.js.map +1 -1
  4. package/dist/gltfv1/GLTFLoader.d.ts.map +1 -1
  5. package/dist/gltfv1/GLTFLoader.js +53 -49
  6. package/dist/gltfv1/GLTFLoader.js.map +1 -1
  7. package/dist/gltfv1/SDGTFLoader.js +98 -94
  8. package/dist/gltfv1/SDGTFLoader.js.map +1 -1
  9. package/dist/gltfv2/GLTFLoader.d.ts +2 -2
  10. package/dist/gltfv2/GLTFLoader.d.ts.map +1 -1
  11. package/dist/gltfv2/GLTFLoader.js +67 -63
  12. package/dist/gltfv2/GLTFLoader.js.map +1 -1
  13. package/dist/gltfv2/loaders/AccessorLoader.js +15 -11
  14. package/dist/gltfv2/loaders/AccessorLoader.js.map +1 -1
  15. package/dist/gltfv2/loaders/BufferLoader.d.ts.map +1 -1
  16. package/dist/gltfv2/loaders/BufferLoader.js +10 -6
  17. package/dist/gltfv2/loaders/BufferLoader.js.map +1 -1
  18. package/dist/gltfv2/loaders/BufferViewLoader.js +5 -1
  19. package/dist/gltfv2/loaders/BufferViewLoader.js.map +1 -1
  20. package/dist/gltfv2/loaders/GeometryLoader.js +19 -15
  21. package/dist/gltfv2/loaders/GeometryLoader.js.map +1 -1
  22. package/dist/gltfv2/loaders/MaterialLoader.d.ts.map +1 -1
  23. package/dist/gltfv2/loaders/MaterialLoader.js +78 -60
  24. package/dist/gltfv2/loaders/MaterialLoader.js.map +1 -1
  25. package/dist/gltfv2/loaders/TextureLoader.d.ts +4 -1
  26. package/dist/gltfv2/loaders/TextureLoader.d.ts.map +1 -1
  27. package/dist/gltfv2/loaders/TextureLoader.js +27 -20
  28. package/dist/gltfv2/loaders/TextureLoader.js.map +1 -1
  29. package/dist/index.js +5 -2
  30. package/dist/index.js.map +1 -1
  31. package/package.json +10 -10
  32. package/src/GeometryEngine.ts +29 -29
  33. package/src/gltfv1/GLTFLoader.ts +31 -31
  34. package/src/gltfv2/GLTFLoader.ts +66 -66
  35. package/src/gltfv2/loaders/BufferLoader.ts +10 -10
  36. package/src/gltfv2/loaders/MaterialLoader.ts +39 -33
  37. package/src/gltfv2/loaders/TextureLoader.ts +41 -30
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@shapediver/viewer.data-engine.geometry-engine",
3
- "version": "2.10.1-rc.0",
3
+ "version": "2.12.0",
4
4
  "description": "",
5
5
  "keywords": [],
6
6
  "author": "Michael Oppitz <michael@shapediver.com>",
@@ -40,14 +40,14 @@
40
40
  },
41
41
  "dependencies": {
42
42
  "@shapediver/sdk.geometry-api-sdk-v2": "1.6.0",
43
- "@shapediver/viewer.data-engine.material-engine": "2.10.1-rc.0",
44
- "@shapediver/viewer.data-engine.shared-types": "2.10.1-rc.0",
45
- "@shapediver/viewer.rendering-engine.camera-engine": "2.10.1-rc.0",
46
- "@shapediver/viewer.rendering-engine.light-engine": "2.10.1-rc.0",
47
- "@shapediver/viewer.shared.build-data": "2.10.1-rc.0",
48
- "@shapediver/viewer.shared.node-tree": "2.10.1-rc.0",
49
- "@shapediver/viewer.shared.services": "2.10.1-rc.0",
50
- "@shapediver/viewer.shared.types": "2.10.1-rc.0",
43
+ "@shapediver/viewer.data-engine.material-engine": "2.12.0",
44
+ "@shapediver/viewer.data-engine.shared-types": "2.12.0",
45
+ "@shapediver/viewer.rendering-engine.camera-engine": "2.12.0",
46
+ "@shapediver/viewer.rendering-engine.light-engine": "2.12.0",
47
+ "@shapediver/viewer.shared.build-data": "2.12.0",
48
+ "@shapediver/viewer.shared.node-tree": "2.12.0",
49
+ "@shapediver/viewer.shared.services": "2.12.0",
50
+ "@shapediver/viewer.shared.types": "2.12.0",
51
51
  "axios": "^1.2.6",
52
52
  "gl-matrix": "3.3.0"
53
53
  },
@@ -56,5 +56,5 @@
56
56
  "path": false,
57
57
  "os": false
58
58
  },
59
- "gitHead": "7d6e75b740536d82351b9f4d1c2b0722bbde5a87"
59
+ "gitHead": "4453bb1d704facd5722ffd81518e54b5453d991f"
60
60
  }
@@ -1,9 +1,9 @@
1
- import { ITreeNode } from '@shapediver/viewer.shared.node-tree'
2
- import { HttpClient, Logger, PerformanceEvaluator, ShapeDiverViewerDataProcessingError } from '@shapediver/viewer.shared.services'
1
+ import { ITreeNode } from '@shapediver/viewer.shared.node-tree';
2
+ import { HttpClient, HttpResponse, Logger, PerformanceEvaluator, ShapeDiverViewerDataProcessingError } from '@shapediver/viewer.shared.services';
3
3
 
4
- import { GLTFLoader as GLTF_v1Loader } from './gltfv1/GLTFLoader'
5
- import { GLTFLoader as GLTF_v2Loader } from './gltfv2/GLTFLoader'
6
- import { ShapeDiverResponseOutputContent } from '@shapediver/sdk.geometry-api-sdk-v2'
4
+ import { GLTFLoader as GLTF_v1Loader } from './gltfv1/GLTFLoader';
5
+ import { GLTFLoader as GLTF_v2Loader } from './gltfv2/GLTFLoader';
6
+ import { ShapeDiverResponseOutputContent } from '@shapediver/sdk.geometry-api-sdk-v2';
7
7
 
8
8
  export class GeometryEngine {
9
9
  // #region Properties (7)
@@ -52,7 +52,7 @@ export class GeometryEngine {
52
52
  if (!content || (content && !content.href))
53
53
  throw new ShapeDiverViewerDataProcessingError('GeometryEngine cannot load content.');
54
54
 
55
- while(this._loadingQueueLength <= this._loadingQueue.length)
55
+ while (this._loadingQueueLength <= this._loadingQueue.length)
56
56
  await new Promise(resolve => setTimeout(resolve, 10));
57
57
 
58
58
  const url = content.href!;
@@ -60,19 +60,19 @@ export class GeometryEngine {
60
60
  const loadingPromise = new Promise<ITreeNode>(async (resolve, reject) => {
61
61
  let gltfContent, gltfBinary, gltfBaseUrl, gltfHeader;
62
62
  let version = '2.0';
63
-
63
+
64
64
  if (content.format === 'glb' || content.format === 'gltf') {
65
65
  this._performanceEvaluator.startSection('gltfProcessing.' + url);
66
-
66
+
67
67
  this._performanceEvaluator.startSection('loadGltf.' + url);
68
68
  const axiosResponse = await this._httpClient.get(url!, {
69
69
  responseType: 'arraybuffer'
70
- });
70
+ }) as HttpResponse<ArrayBuffer>;
71
71
  this._performanceEvaluator.endSection('loadGltf.' + url);
72
-
72
+
73
73
  const magic = new TextDecoder().decode(new Uint8Array(axiosResponse.data, 0, 4));
74
74
  const isBinary = magic === 'glTF';
75
-
75
+
76
76
  if (isBinary) {
77
77
  gltfBinary = axiosResponse.data;
78
78
  // create header data
@@ -83,18 +83,18 @@ export class GeometryEngine {
83
83
  length: headerDataView.getUint32(8, true),
84
84
  contentLength: headerDataView.getUint32(12, true),
85
85
  contentFormat: headerDataView.getUint32(16, true)
86
- }
87
- if (gltfHeader.magic != 'glTF')
86
+ };
87
+ if (gltfHeader.magic != 'glTF')
88
88
  throw new ShapeDiverViewerDataProcessingError('Invalid data: glTF magic wrong.');
89
-
89
+
90
90
  // create content
91
91
  const contentDataView = new DataView(gltfBinary, this.BINARY_EXTENSION_HEADER_LENGTH, gltfHeader.contentLength);
92
92
  const contentDecoded = new TextDecoder().decode(contentDataView);
93
93
  gltfContent = JSON.parse(contentDecoded);
94
-
95
- if(gltfContent && gltfContent.asset && gltfContent.asset.version) {
94
+
95
+ if (gltfContent && gltfContent.asset && gltfContent.asset.version) {
96
96
  const assetVersion = (gltfContent.asset.version + '').endsWith('.0') ? gltfContent.asset.version : gltfContent.asset.version + '.0';
97
- if(gltfHeader.version + '.0' === assetVersion) {
97
+ if (gltfHeader.version + '.0' === assetVersion) {
98
98
  version = gltfHeader.version + '.0';
99
99
  } else {
100
100
  throw new ShapeDiverViewerDataProcessingError('GeometryEngine.loadContent: glTF header version (' + gltfHeader.version + ') is not the same as asset version (' + assetVersion + ').');
@@ -104,42 +104,42 @@ export class GeometryEngine {
104
104
  }
105
105
  } else {
106
106
  gltfContent = JSON.parse(new TextDecoder().decode(axiosResponse.data));
107
-
108
- if(gltfContent && gltfContent.asset && gltfContent.asset.version) {
109
- if(gltfContent.asset.version !== '2.0')
107
+
108
+ if (gltfContent && gltfContent.asset && gltfContent.asset.version) {
109
+ if (gltfContent.asset.version !== '2.0')
110
110
  throw new ShapeDiverViewerDataProcessingError('GeometryEngine.loadContent: Only gltf v2 is supported in a non-binary format.');
111
111
  } else {
112
112
  this._logger.warn('GeometryEngine.loadContent: No version specified in asset, trying to load as v2.');
113
113
  version = '2.0';
114
114
  }
115
-
115
+
116
116
  const removeLastDirectoryPartOf = (the_url: string): string => {
117
- const dir_char = the_url.includes("/") ? "/" : "\\";
117
+ const dir_char = the_url.includes('/') ? '/' : '\\';
118
118
  const the_arr = the_url.split(dir_char);
119
119
  the_arr.pop();
120
120
  return the_arr.join(dir_char);
121
- }
122
-
121
+ };
122
+
123
123
  gltfBaseUrl = removeLastDirectoryPartOf(url!);
124
124
  if (!gltfBaseUrl && window && window.location && window.location.href)
125
125
  gltfBaseUrl = removeLastDirectoryPartOf(window.location.href);
126
126
  }
127
127
  }
128
-
128
+
129
129
  let promise: Promise<ITreeNode>;
130
130
  if (version === '1.0') {
131
- promise = new GLTF_v1Loader().load(gltfContent, gltfBinary, gltfHeader, gltfBaseUrl, taskEventId)
131
+ promise = new GLTF_v1Loader().load(gltfContent, gltfBinary, gltfHeader, gltfBaseUrl, taskEventId);
132
132
  } else {
133
133
  promise = new GLTF_v2Loader().load(gltfContent, gltfBinary, gltfHeader, gltfBaseUrl, taskEventId);
134
134
  }
135
- promise.catch(e => { reject(e) })
135
+ promise.catch(e => { reject(e); });
136
136
  resolve(promise);
137
- })
137
+ });
138
138
 
139
139
  this._loadingQueue.push(loadingPromise);
140
140
  const node = await loadingPromise;
141
141
  this._loadingQueue.splice(this._loadingQueue.indexOf(loadingPromise), 1);
142
-
142
+
143
143
  this._performanceEvaluator.endSection('gltfProcessing.' + url);
144
144
 
145
145
  return node;
@@ -1,12 +1,13 @@
1
- import { ITreeNode, TreeNode } from '@shapediver/viewer.shared.node-tree'
2
- import { Converter, HttpClient, PerformanceEvaluator, UuidGenerator, Logger, ShapeDiverViewerDataProcessingError, EventEngine, EVENTTYPE } from '@shapediver/viewer.shared.services'
1
+ /* eslint-disable no-prototype-builtins */
2
+ import { ITreeNode, TreeNode } from '@shapediver/viewer.shared.node-tree';
3
+ import { HttpClient, PerformanceEvaluator, UuidGenerator, Logger, ShapeDiverViewerDataProcessingError, EventEngine, EVENTTYPE, HttpResponse } from '@shapediver/viewer.shared.services';
3
4
  import {
4
5
  ACCESSORCOMPONENTTYPE_V1 as ACCESSOR_COMPONENTTYPE,
5
6
  ACCESSORTYPE_V1 as ACCESSORTYPE,
6
7
  IGLTF_v1,
7
8
  IGLTF_v1_Material,
8
- } from '@shapediver/viewer.data-engine.shared-types'
9
- import { mat4, vec3, vec4 } from 'gl-matrix'
9
+ } from '@shapediver/viewer.data-engine.shared-types';
10
+ import { mat4, vec3, vec4 } from 'gl-matrix';
10
11
  import {
11
12
  AttributeData,
12
13
  GeometryData,
@@ -16,9 +17,9 @@ import {
16
17
  ITaskEvent,
17
18
  TASK_TYPE,
18
19
  PRIMITIVE_MODE,
19
- } from '@shapediver/viewer.shared.types'
20
+ } from '@shapediver/viewer.shared.types';
20
21
 
21
- import { SDGTFLoader } from './SDGTFLoader'
22
+ import { SDGTFLoader } from './SDGTFLoader';
22
23
 
23
24
  export class GLTFLoader {
24
25
  // #region Properties (5)
@@ -36,7 +37,7 @@ export class GLTFLoader {
36
37
  private _baseUri: string | undefined;
37
38
  private _body: ArrayBuffer | undefined;
38
39
  private _content!: IGLTF_v1;
39
- private _eventId: string = "";
40
+ private _eventId: string = '';
40
41
  private _numberOfNodes = 0;
41
42
  private _numberOfConvertedNodes = 0;
42
43
  private _progressTimer = 0;
@@ -80,12 +81,11 @@ export class GLTFLoader {
80
81
 
81
82
  public async loadWithUrl(url?: string | undefined): Promise<ITreeNode> {
82
83
  this._performanceEvaluator.startSection('gltfProcessing.' + url);
83
- let binaryGeometry: ArrayBuffer;
84
84
 
85
85
  this._performanceEvaluator.startSection('loadGltf.' + url);
86
- binaryGeometry = (await this._httpClient.get(url!, {
86
+ const binaryGeometry = (await this._httpClient.get(url!, {
87
87
  responseType: 'arraybuffer'
88
- })).data;
88
+ }) as HttpResponse<ArrayBuffer>).data;
89
89
  this._performanceEvaluator.endSection('loadGltf.' + url);
90
90
 
91
91
  // create header data
@@ -96,7 +96,7 @@ export class GLTFLoader {
96
96
  length: headerDataView.getUint32(8, true),
97
97
  contentLength: headerDataView.getUint32(12, true),
98
98
  contentFormat: headerDataView.getUint32(16, true)
99
- }
99
+ };
100
100
  if (header.magic != 'glTF')
101
101
  throw new ShapeDiverViewerDataProcessingError('GLTFLoader.load: Invalid data: glTF magic wrong.');
102
102
 
@@ -140,7 +140,7 @@ export class GLTFLoader {
140
140
  }
141
141
 
142
142
  private async loadAccessor(accessorName: string): Promise<AttributeData> {
143
- if (!this._content.accessors![accessorName]) throw new Error('Accessor not available.')
143
+ if (!this._content.accessors![accessorName]) throw new Error('Accessor not available.');
144
144
  const accessor = this._content.accessors![accessorName];
145
145
  const bufferView = await this.loadBufferView(accessor.bufferView!);
146
146
 
@@ -155,15 +155,15 @@ export class GLTFLoader {
155
155
  const normalized = false;
156
156
  const target = this._content.bufferViews![accessor.bufferView] ? this._content.bufferViews![accessor.bufferView].target : undefined;
157
157
 
158
- const min = this._content.asset && this._content.asset?.generator === "ShapeDiverGltfV1Writer" ? accessor.min || [] : [];
159
- const max = this._content.asset && this._content.asset?.generator === "ShapeDiverGltfV1Writer" ? accessor.max || [] : [];
158
+ const min = this._content.asset && this._content.asset?.generator === 'ShapeDiverGltfV1Writer' ? accessor.min || [] : [];
159
+ const max = this._content.asset && this._content.asset?.generator === 'ShapeDiverGltfV1Writer' ? accessor.max || [] : [];
160
160
 
161
161
  // The buffer is not interleaved if the stride is the item size in bytes.
162
162
  return new AttributeData(new ArrayType(bufferView), itemSize, itemBytes, byteOffset, elementBytes, normalized, accessor.count, min, max, byteStride, target);
163
163
  }
164
164
 
165
165
  private async loadBuffer(bufferName: string): Promise<ArrayBuffer> {
166
- if (!this._content.buffers![bufferName]) throw new Error('Buffer not available.')
166
+ if (!this._content.buffers![bufferName]) throw new Error('Buffer not available.');
167
167
  const buffer = this._content.buffers![bufferName];
168
168
 
169
169
  if (bufferName === 'binary_glTF')
@@ -172,7 +172,7 @@ export class GLTFLoader {
172
172
  if (buffer.type === 'arraybuffer') {
173
173
  const binaryGeometry: ArrayBuffer = (await this._httpClient.get(buffer.uri!, {
174
174
  responseType: 'arraybuffer'
175
- })).data;
175
+ }) as HttpResponse<ArrayBuffer>).data;
176
176
  return binaryGeometry;
177
177
  }
178
178
  if(!this._body) throw new Error('Buffer not available.');
@@ -180,7 +180,7 @@ export class GLTFLoader {
180
180
  }
181
181
 
182
182
  private async loadBufferView(bufferViewName: string): Promise<ArrayBuffer> {
183
- if (!this._content.bufferViews![bufferViewName]) throw new Error('Buffer View not available.')
183
+ if (!this._content.bufferViews![bufferViewName]) throw new Error('Buffer View not available.');
184
184
  const bufferView = this._content.bufferViews![bufferViewName];
185
185
  const buffer: ArrayBuffer = await this.loadBuffer(bufferView.buffer!);
186
186
  const byteLength = bufferView.byteLength !== undefined ? bufferView.byteLength : 0;
@@ -190,14 +190,14 @@ export class GLTFLoader {
190
190
 
191
191
 
192
192
  private async loadMaterial(materialName: string): Promise<MaterialStandardData> {
193
- if(!this._content.materials![materialName]) throw new Error('Material not available.')
193
+ if(!this._content.materials![materialName]) throw new Error('Material not available.');
194
194
  const material: IGLTF_v1_Material = this._content.materials![materialName];
195
195
  const materialData = new MaterialStandardData();
196
196
  if(material.name !== undefined) materialData.name = material.name;
197
197
 
198
198
  if(material.extensions && material.extensions.KHR_materials_common) {
199
199
  const technique = material.extensions.KHR_materials_common.technique;
200
- if(technique && technique !== 'BLINN') this._logger.warn('The technique ' + technique + ' is not supported. Trying to load the material either way.')
200
+ if(technique && technique !== 'BLINN') this._logger.warn('The technique ' + technique + ' is not supported. Trying to load the material either way.');
201
201
  const values = material.extensions.KHR_materials_common.values;
202
202
 
203
203
  if (values.hasOwnProperty('doubleSided'))
@@ -209,7 +209,7 @@ export class GLTFLoader {
209
209
  materialData.color = diffuseScaled;
210
210
  materialData.opacity = Math.max(0.0, Math.min(values.diffuse[3], 1.0));
211
211
  } else if(values.hasOwnProperty('diffuse')) {
212
- this._logger.warn('GLTFLoader.loadMaterial: The value diffuse was set for a material, but is not supported in that type.')
212
+ this._logger.warn('GLTFLoader.loadMaterial: The value diffuse was set for a material, but is not supported in that type.');
213
213
  }
214
214
 
215
215
  if (!values.hasOwnProperty('diffuse') && values.hasOwnProperty('ambient')) {
@@ -220,7 +220,7 @@ export class GLTFLoader {
220
220
  if (values.hasOwnProperty('emission') && Array.isArray(values.emission)) {
221
221
  materialData.emissiveness = values.emission;
222
222
  } else if (values.hasOwnProperty('emission')) {
223
- this._logger.warn('GLTFLoader.loadMaterial: The value emission was set for a material, but is not supported in that type.')
223
+ this._logger.warn('GLTFLoader.loadMaterial: The value emission was set for a material, but is not supported in that type.');
224
224
  }
225
225
 
226
226
  if (values.hasOwnProperty('shininess')) {
@@ -244,7 +244,7 @@ export class GLTFLoader {
244
244
  }
245
245
 
246
246
  private async loadMesh(meshName: string): Promise<ITreeNode> {
247
- if (!this._content.meshes![meshName]) throw new Error('Mesh not available.')
247
+ if (!this._content.meshes![meshName]) throw new Error('Mesh not available.');
248
248
  const mesh = this._content.meshes![meshName];
249
249
  const meshNode = new TreeNode(meshName);
250
250
 
@@ -253,16 +253,16 @@ export class GLTFLoader {
253
253
  const primitiveNode = new TreeNode('primitive_' + i);
254
254
  meshNode.addChild(primitiveNode);
255
255
 
256
- let primitive = mesh.primitives![i];
256
+ const primitive = mesh.primitives![i];
257
257
  const attributes: {
258
258
  [key: string]: AttributeData
259
259
  } = {};
260
260
 
261
- for (let attribute in primitive.attributes) {
261
+ for (const attribute in primitive.attributes) {
262
262
  // attribute name conversion to be consistent witg gltf
263
263
  let attributeName = attribute;
264
264
  if(/\d/.test(attributeName) && !attributeName.includes('_')) {
265
- const index = attributeName.search(/\d/)
265
+ const index = attributeName.search(/\d/);
266
266
  attributeName = attributeName.substring(0, index) + '_' + attributeName.substring(index, attributeName.length);
267
267
  } else if(attributeName === 'TEXCOORD' || attributeName === 'COLOR' || attributeName === 'JOINTS' || attributeName === 'WEIGHTS') {
268
268
  attributeName += '_0';
@@ -272,7 +272,7 @@ export class GLTFLoader {
272
272
 
273
273
  attributes[attributeName] = await this.loadAccessor(primitive.attributes[attribute]);
274
274
  if(attributeName.startsWith('COLOR'))
275
- attributes[attributeName] = new AttributeData(attributes[attributeName].array, attributes[attributeName].itemSize, attributes[attributeName].itemBytes, attributes[attributeName].byteOffset, attributes[attributeName].elementBytes, true, attributes[attributeName].count, [], [], attributes[attributeName].byteStride, attributes[attributeName].target)
275
+ attributes[attributeName] = new AttributeData(attributes[attributeName].array, attributes[attributeName].itemSize, attributes[attributeName].itemBytes, attributes[attributeName].byteOffset, attributes[attributeName].elementBytes, true, attributes[attributeName].count, [], [], attributes[attributeName].byteStride, attributes[attributeName].target);
276
276
  }
277
277
 
278
278
  let material: MaterialStandardData | undefined;
@@ -286,7 +286,7 @@ export class GLTFLoader {
286
286
  }
287
287
 
288
288
  private async loadNode(nodeName: string): Promise<ITreeNode> {
289
- if (!this._content.nodes![nodeName]) throw new Error('Node not available.')
289
+ if (!this._content.nodes![nodeName]) throw new Error('Node not available.');
290
290
  const node = this._content.nodes![nodeName];
291
291
  const nodeDef = new TreeNode(nodeName);
292
292
 
@@ -337,15 +337,15 @@ export class GLTFLoader {
337
337
  }
338
338
 
339
339
  private async loadScene(): Promise<ITreeNode> {
340
- if (!this._content.scene) throw new Error('No scene.')
341
- if (!this._content.scenes![this._content.scene!]) throw new Error('Scene not available.')
340
+ if (!this._content.scene) throw new Error('No scene.');
341
+ if (!this._content.scenes![this._content.scene!]) throw new Error('Scene not available.');
342
342
  const scene = this._content.scenes![this._content.scene!];
343
343
  const sceneDef = new TreeNode(this._content.scene!);
344
- if(this._content.asset && this._content.asset?.generator !== "ShapeDiverGltfWriter" && this._content.asset?.generator !== "ShapeDiverGltfV1Writer") {
344
+ if(this._content.asset && this._content.asset?.generator !== 'ShapeDiverGltfWriter' && this._content.asset?.generator !== 'ShapeDiverGltfV1Writer') {
345
345
  sceneDef.addTransformation({
346
346
  id: this._uuidGenerator.create(),
347
347
  matrix: this._globalTransformation
348
- })
348
+ });
349
349
  }
350
350
  if(scene.nodes)
351
351
  for (let i = 0, len = scene.nodes!.length; i < len; i++)