@shapediver/viewer.shared.types 2.8.2 → 2.8.4
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/implementation/data/AnimationData.d.ts +1 -1
- package/dist/implementation/data/AnimationData.d.ts.map +1 -1
- package/dist/implementation/data/AnimationData.js +3 -3
- package/dist/implementation/data/AnimationData.js.map +1 -1
- package/dist/implementation/data/BoneData.d.ts +1 -1
- package/dist/implementation/data/BoneData.d.ts.map +1 -1
- package/dist/implementation/data/BoneData.js +3 -3
- package/dist/implementation/data/BoneData.js.map +1 -1
- package/dist/implementation/data/CustomData.d.ts +1 -1
- package/dist/implementation/data/CustomData.d.ts.map +1 -1
- package/dist/implementation/data/CustomData.js +3 -3
- package/dist/implementation/data/CustomData.js.map +1 -1
- package/dist/implementation/data/GeometryData.d.ts +4 -6
- package/dist/implementation/data/GeometryData.d.ts.map +1 -1
- package/dist/implementation/data/GeometryData.js +11 -21
- package/dist/implementation/data/GeometryData.js.map +1 -1
- package/dist/implementation/data/HTMLElementAnchorData.d.ts +4 -0
- package/dist/implementation/data/HTMLElementAnchorData.d.ts.map +1 -1
- package/dist/implementation/data/HTMLElementAnchorData.js +7 -1
- package/dist/implementation/data/HTMLElementAnchorData.js.map +1 -1
- package/dist/implementation/material/AbstractMaterialData.d.ts +1 -1
- package/dist/implementation/material/AbstractMaterialData.d.ts.map +1 -1
- package/dist/implementation/material/AbstractMaterialData.js +2 -2
- package/dist/implementation/material/AbstractMaterialData.js.map +1 -1
- package/dist/implementation/material/MapData.d.ts +1 -1
- package/dist/implementation/material/MapData.d.ts.map +1 -1
- package/dist/implementation/material/MapData.js +3 -3
- package/dist/implementation/material/MapData.js.map +1 -1
- package/dist/implementation/material/MaterialGemData.d.ts +1 -1
- package/dist/implementation/material/MaterialGemData.d.ts.map +1 -1
- package/dist/implementation/material/MaterialGemData.js +3 -3
- package/dist/implementation/material/MaterialGemData.js.map +1 -1
- package/dist/implementation/material/MaterialShadowData.d.ts +1 -1
- package/dist/implementation/material/MaterialShadowData.d.ts.map +1 -1
- package/dist/implementation/material/MaterialShadowData.js +3 -3
- package/dist/implementation/material/MaterialShadowData.js.map +1 -1
- package/dist/implementation/material/MaterialSpecularGlossinessData.d.ts +1 -1
- package/dist/implementation/material/MaterialSpecularGlossinessData.d.ts.map +1 -1
- package/dist/implementation/material/MaterialSpecularGlossinessData.js +3 -3
- package/dist/implementation/material/MaterialSpecularGlossinessData.js.map +1 -1
- package/dist/implementation/material/MaterialStandardData.d.ts +1 -1
- package/dist/implementation/material/MaterialStandardData.d.ts.map +1 -1
- package/dist/implementation/material/MaterialStandardData.js +3 -3
- package/dist/implementation/material/MaterialStandardData.js.map +1 -1
- package/dist/implementation/material/MaterialUnlitData.d.ts +1 -1
- package/dist/implementation/material/MaterialUnlitData.d.ts.map +1 -1
- package/dist/implementation/material/MaterialUnlitData.js +3 -3
- package/dist/implementation/material/MaterialUnlitData.js.map +1 -1
- package/dist/implementation/material/MaterialVariantsData.d.ts +1 -1
- package/dist/implementation/material/MaterialVariantsData.d.ts.map +1 -1
- package/dist/implementation/material/MaterialVariantsData.js +3 -3
- package/dist/implementation/material/MaterialVariantsData.js.map +1 -1
- package/dist/implementation/sdtf/SDTFAttributesData.d.ts +1 -1
- package/dist/implementation/sdtf/SDTFAttributesData.d.ts.map +1 -1
- package/dist/implementation/sdtf/SDTFAttributesData.js +3 -3
- package/dist/implementation/sdtf/SDTFAttributesData.js.map +1 -1
- package/dist/implementation/sdtf/SDTFItemData.d.ts +1 -1
- package/dist/implementation/sdtf/SDTFItemData.d.ts.map +1 -1
- package/dist/implementation/sdtf/SDTFItemData.js +3 -3
- package/dist/implementation/sdtf/SDTFItemData.js.map +1 -1
- package/dist/implementation/sdtf/SDTFOverviewData.d.ts +1 -1
- package/dist/implementation/sdtf/SDTFOverviewData.d.ts.map +1 -1
- package/dist/implementation/sdtf/SDTFOverviewData.js +3 -3
- package/dist/implementation/sdtf/SDTFOverviewData.js.map +1 -1
- package/package.json +5 -5
- package/src/implementation/data/AnimationData.ts +4 -3
- package/src/implementation/data/BoneData.ts +4 -3
- package/src/implementation/data/CustomData.ts +4 -3
- package/src/implementation/data/GeometryData.ts +17 -20
- package/src/implementation/data/HTMLElementAnchorData.ts +11 -1
- package/src/implementation/material/AbstractMaterialData.ts +3 -2
- package/src/implementation/material/MapData.ts +4 -2
- package/src/implementation/material/MaterialGemData.ts +4 -3
- package/src/implementation/material/MaterialShadowData.ts +4 -3
- package/src/implementation/material/MaterialSpecularGlossinessData.ts +4 -3
- package/src/implementation/material/MaterialStandardData.ts +4 -3
- package/src/implementation/material/MaterialUnlitData.ts +4 -3
- package/src/implementation/material/MaterialVariantsData.ts +3 -3
- package/src/implementation/sdtf/SDTFAttributesData.ts +4 -3
- package/src/implementation/sdtf/SDTFItemData.ts +4 -3
- package/src/implementation/sdtf/SDTFOverviewData.ts +4 -3
|
@@ -18,8 +18,8 @@ const sdk_sdtf_primitives_1 = require("@shapediver/sdk.sdtf-primitives");
|
|
|
18
18
|
class SDTFOverviewData extends viewer_shared_node_tree_1.AbstractTreeNodeData {
|
|
19
19
|
// #endregion Properties (1)
|
|
20
20
|
// #region Constructors (1)
|
|
21
|
-
constructor(overview, id) {
|
|
22
|
-
super(id);
|
|
21
|
+
constructor(overview, id, version) {
|
|
22
|
+
super(id, version);
|
|
23
23
|
// #region Properties (1)
|
|
24
24
|
_SDTFOverviewData_overview.set(this, {});
|
|
25
25
|
__classPrivateFieldSet(this, _SDTFOverviewData_overview, overview, "f");
|
|
@@ -35,7 +35,7 @@ class SDTFOverviewData extends viewer_shared_node_tree_1.AbstractTreeNodeData {
|
|
|
35
35
|
* Clones the scene graph data.
|
|
36
36
|
*/
|
|
37
37
|
clone() {
|
|
38
|
-
return new SDTFOverviewData(__classPrivateFieldGet(this, _SDTFOverviewData_overview, "f"), this.id);
|
|
38
|
+
return new SDTFOverviewData(__classPrivateFieldGet(this, _SDTFOverviewData_overview, "f"), this.id, this.version);
|
|
39
39
|
}
|
|
40
40
|
merge(data) {
|
|
41
41
|
var _a;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SDTFOverviewData.js","sourceRoot":"","sources":["../../../src/implementation/sdtf/SDTFOverviewData.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,iFAAyF;AAEzF,yEAAwE;AAExE,MAAa,gBAAiB,SAAQ,8CAAoB;IAKtD,4BAA4B;IAE5B,2BAA2B;IAE3B,YACI,QAAuB,EACvB,EAAW;
|
|
1
|
+
{"version":3,"file":"SDTFOverviewData.js","sourceRoot":"","sources":["../../../src/implementation/sdtf/SDTFOverviewData.ts"],"names":[],"mappings":"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"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shapediver/viewer.shared.types",
|
|
3
|
-
"version": "2.8.
|
|
3
|
+
"version": "2.8.4",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "Michael Oppitz <michael@shapediver.com>",
|
|
@@ -40,10 +40,10 @@
|
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@shapediver/sdk.sdtf-v1": "1.2.1",
|
|
43
|
-
"@shapediver/viewer.shared.math": "2.8.
|
|
44
|
-
"@shapediver/viewer.shared.node-tree": "2.8.
|
|
45
|
-
"@shapediver/viewer.shared.services": "2.8.
|
|
43
|
+
"@shapediver/viewer.shared.math": "2.8.4",
|
|
44
|
+
"@shapediver/viewer.shared.node-tree": "2.8.4",
|
|
45
|
+
"@shapediver/viewer.shared.services": "2.8.4",
|
|
46
46
|
"gl-matrix": "3.3.0"
|
|
47
47
|
},
|
|
48
|
-
"gitHead": "
|
|
48
|
+
"gitHead": "7e7f8107c304312abd9f4d88fef6b346d23c934b"
|
|
49
49
|
}
|
|
@@ -33,9 +33,10 @@ export class AnimationData extends AbstractTreeNodeData implements IAnimationDat
|
|
|
33
33
|
tracks: IAnimationTrack[],
|
|
34
34
|
start: number,
|
|
35
35
|
duration: number,
|
|
36
|
-
id?: string
|
|
36
|
+
id?: string,
|
|
37
|
+
version?: string
|
|
37
38
|
) {
|
|
38
|
-
super(id);
|
|
39
|
+
super(id, version);
|
|
39
40
|
this.#name = name;
|
|
40
41
|
this.#tracks = tracks;
|
|
41
42
|
this.#start = start;
|
|
@@ -102,7 +103,7 @@ export class AnimationData extends AbstractTreeNodeData implements IAnimationDat
|
|
|
102
103
|
* Clones the scene graph data.
|
|
103
104
|
*/
|
|
104
105
|
public clone(): IAnimationData {
|
|
105
|
-
return new AnimationData(this.name, this.#tracks, this.start, this.duration, this.id);
|
|
106
|
+
return new AnimationData(this.name, this.#tracks, this.start, this.duration, this.id, this.version);
|
|
106
107
|
}
|
|
107
108
|
|
|
108
109
|
public continueAnimation() {
|
|
@@ -11,9 +11,10 @@ export class BoneData extends AbstractTreeNodeData implements IBoneData {
|
|
|
11
11
|
* @param id the id
|
|
12
12
|
*/
|
|
13
13
|
constructor(
|
|
14
|
-
id?: string
|
|
14
|
+
id?: string,
|
|
15
|
+
version?: string
|
|
15
16
|
) {
|
|
16
|
-
super(id);
|
|
17
|
+
super(id, version);
|
|
17
18
|
}
|
|
18
19
|
|
|
19
20
|
// #endregion Constructors (1)
|
|
@@ -24,7 +25,7 @@ export class BoneData extends AbstractTreeNodeData implements IBoneData {
|
|
|
24
25
|
* Clones the scene graph data.
|
|
25
26
|
*/
|
|
26
27
|
public clone(): IBoneData {
|
|
27
|
-
return new BoneData(this.id);
|
|
28
|
+
return new BoneData(this.id, this.version);
|
|
28
29
|
}
|
|
29
30
|
|
|
30
31
|
// #endregion Public Methods (1)
|
|
@@ -18,9 +18,10 @@ export class CustomData extends AbstractTreeNodeData implements ICustomData {
|
|
|
18
18
|
*/
|
|
19
19
|
constructor(
|
|
20
20
|
data: { [key: string]: any },
|
|
21
|
-
id?: string
|
|
21
|
+
id?: string,
|
|
22
|
+
version?: string
|
|
22
23
|
) {
|
|
23
|
-
super(id);
|
|
24
|
+
super(id, version);
|
|
24
25
|
this.#data = data;
|
|
25
26
|
}
|
|
26
27
|
|
|
@@ -44,7 +45,7 @@ export class CustomData extends AbstractTreeNodeData implements ICustomData {
|
|
|
44
45
|
* Clones the scene graph data.
|
|
45
46
|
*/
|
|
46
47
|
public clone(): ICustomData {
|
|
47
|
-
return new CustomData({ ...this.data }, this.id);
|
|
48
|
+
return new CustomData({ ...this.data }, this.id, this.version);
|
|
48
49
|
}
|
|
49
50
|
|
|
50
51
|
// #endregion Public Methods (1)
|
|
@@ -51,9 +51,11 @@ export class AttributeData extends AbstractTreeNodeData implements IAttributeDat
|
|
|
51
51
|
sparse?: boolean,
|
|
52
52
|
sparseIndices?: Int8Array | Uint8Array | Int16Array | Uint16Array | Uint32Array | Float32Array,
|
|
53
53
|
sparseValues?: Int8Array | Uint8Array | Int16Array | Uint16Array | Uint32Array | Float32Array,
|
|
54
|
-
morphAttributeData: IAttributeData[] = []
|
|
54
|
+
morphAttributeData: IAttributeData[] = [],
|
|
55
|
+
id?: string,
|
|
56
|
+
version?: string
|
|
55
57
|
) {
|
|
56
|
-
super();
|
|
58
|
+
super(id, version);
|
|
57
59
|
this.#array = array;
|
|
58
60
|
this.#itemSize = itemSize;
|
|
59
61
|
this.#itemBytes = itemBytes;
|
|
@@ -138,10 +140,8 @@ export class AttributeData extends AbstractTreeNodeData implements IAttributeDat
|
|
|
138
140
|
* Clones the attribute data.
|
|
139
141
|
*/
|
|
140
142
|
public clone(): IAttributeData {
|
|
141
|
-
let array = this.#array.slice(0, this.#array.length);
|
|
142
|
-
array.set(this.#array);
|
|
143
143
|
return new AttributeData(
|
|
144
|
-
array,
|
|
144
|
+
this.#array,
|
|
145
145
|
this.#itemSize,
|
|
146
146
|
this.#itemBytes,
|
|
147
147
|
this.#byteOffset,
|
|
@@ -154,7 +154,9 @@ export class AttributeData extends AbstractTreeNodeData implements IAttributeDat
|
|
|
154
154
|
this.#sparse,
|
|
155
155
|
this.#sparseIndices,
|
|
156
156
|
this.#sparseValues,
|
|
157
|
-
this.#morphAttributeData
|
|
157
|
+
this.#morphAttributeData,
|
|
158
|
+
this.id,
|
|
159
|
+
this.version
|
|
158
160
|
);
|
|
159
161
|
}
|
|
160
162
|
|
|
@@ -199,8 +201,10 @@ export class PrimitiveData extends AbstractTreeNodeData implements IPrimitiveDat
|
|
|
199
201
|
indices: IAttributeData | null = null,
|
|
200
202
|
material: IMaterialAbstractData | null = null,
|
|
201
203
|
attributeMaterial: IMaterialAbstractData | null = null,
|
|
204
|
+
id?: string,
|
|
205
|
+
version?: string
|
|
202
206
|
) {
|
|
203
|
-
super();
|
|
207
|
+
super(id, version);
|
|
204
208
|
this.#attributes = attributes;
|
|
205
209
|
this.#mode = mode;
|
|
206
210
|
|
|
@@ -285,7 +289,8 @@ export class PrimitiveData extends AbstractTreeNodeData implements IPrimitiveDat
|
|
|
285
289
|
} = {};
|
|
286
290
|
for (let attribute in this.#attributes)
|
|
287
291
|
attributes[attribute] = <IAttributeData>this.#attributes[attribute].clone();
|
|
288
|
-
|
|
292
|
+
|
|
293
|
+
return new PrimitiveData(attributes, this.#mode, <AttributeData>this.#indices, <IMaterialAbstractData>this.#material, <IMaterialAbstractData>this.#attributeMaterial, this.id, this.version);
|
|
289
294
|
}
|
|
290
295
|
|
|
291
296
|
public computeBoundingBox(matrix: mat4): IBox {
|
|
@@ -339,7 +344,6 @@ export class GeometryData extends AbstractTreeNodeData implements IGeometryData
|
|
|
339
344
|
#boundingBox: IBox = new Box();
|
|
340
345
|
#renderOrder: number = 0;
|
|
341
346
|
#morphWeights: number[] = [];
|
|
342
|
-
#skinNode: ITreeNode | undefined;
|
|
343
347
|
#threeJsObject: { [key: string]: THREE.Mesh | THREE.Points | THREE.LineSegments | THREE.LineLoop | THREE.Line } = {};
|
|
344
348
|
|
|
345
349
|
// #endregion Properties (4)
|
|
@@ -354,10 +358,11 @@ export class GeometryData extends AbstractTreeNodeData implements IGeometryData
|
|
|
354
358
|
*/
|
|
355
359
|
constructor(
|
|
356
360
|
primitive: IPrimitiveData,
|
|
361
|
+
morphWeights: number[] = [],
|
|
357
362
|
id?: string,
|
|
358
|
-
|
|
363
|
+
version?: string
|
|
359
364
|
) {
|
|
360
|
-
super(id);
|
|
365
|
+
super(id, version);
|
|
361
366
|
this.#primitive = primitive;
|
|
362
367
|
this.#boundingBox = this.primitive.boundingBox.clone();
|
|
363
368
|
this.#morphWeights = morphWeights;
|
|
@@ -390,14 +395,6 @@ export class GeometryData extends AbstractTreeNodeData implements IGeometryData
|
|
|
390
395
|
public set morphWeights(value: number[]) {
|
|
391
396
|
this.#morphWeights = value
|
|
392
397
|
}
|
|
393
|
-
|
|
394
|
-
public get skinNode(): ITreeNode | undefined {
|
|
395
|
-
return this.#skinNode;
|
|
396
|
-
}
|
|
397
|
-
|
|
398
|
-
public set skinNode(value: ITreeNode | undefined) {
|
|
399
|
-
this.#skinNode = value;
|
|
400
|
-
}
|
|
401
398
|
|
|
402
399
|
public get threeJsObject(): { [key: string]: THREE.Mesh | THREE.Points | THREE.LineSegments | THREE.LineLoop | THREE.Line } {
|
|
403
400
|
return this.#threeJsObject;
|
|
@@ -411,7 +408,7 @@ export class GeometryData extends AbstractTreeNodeData implements IGeometryData
|
|
|
411
408
|
* Clones the scene graph data.
|
|
412
409
|
*/
|
|
413
410
|
public clone(): IGeometryData {
|
|
414
|
-
return new GeometryData(this.#primitive
|
|
411
|
+
return new GeometryData(this.#primitive, this.#morphWeights, this.id, this.version);
|
|
415
412
|
}
|
|
416
413
|
|
|
417
414
|
public intersect(origin: vec3, direction: vec3): number | null {
|
|
@@ -37,9 +37,10 @@ export abstract class HTMLElementAnchorData extends AbstractTreeNodeData impleme
|
|
|
37
37
|
viewports?: string[],
|
|
38
38
|
intersectionTarget?: Box | string | string[],
|
|
39
39
|
id?: string,
|
|
40
|
+
version?: string
|
|
40
41
|
}
|
|
41
42
|
) {
|
|
42
|
-
super(properties.id);
|
|
43
|
+
super(properties.id, properties.version);
|
|
43
44
|
|
|
44
45
|
this.#location = properties.location;
|
|
45
46
|
this.#data = properties.data;
|
|
@@ -189,6 +190,7 @@ export class HTMLElementAnchorTextData extends HTMLElementAnchorData {
|
|
|
189
190
|
viewports?: string[],
|
|
190
191
|
intersectionTarget?: Box | string | string[],
|
|
191
192
|
id?: string,
|
|
193
|
+
version?: string
|
|
192
194
|
}) {
|
|
193
195
|
super({
|
|
194
196
|
location: properties.location,
|
|
@@ -198,6 +200,7 @@ export class HTMLElementAnchorTextData extends HTMLElementAnchorData {
|
|
|
198
200
|
viewports: properties.viewports,
|
|
199
201
|
intersectionTarget: properties.intersectionTarget,
|
|
200
202
|
id: properties.id,
|
|
203
|
+
version: properties.version,
|
|
201
204
|
})
|
|
202
205
|
}
|
|
203
206
|
|
|
@@ -213,6 +216,7 @@ export class HTMLElementAnchorTextData extends HTMLElementAnchorData {
|
|
|
213
216
|
viewports: this.viewports,
|
|
214
217
|
intersectionTarget: this.intersectionTarget,
|
|
215
218
|
id: this.id,
|
|
219
|
+
version: this.version
|
|
216
220
|
});
|
|
217
221
|
}
|
|
218
222
|
|
|
@@ -255,6 +259,7 @@ export class HTMLElementAnchorImageData extends HTMLElementAnchorData {
|
|
|
255
259
|
viewports?: string[],
|
|
256
260
|
intersectionTarget?: Box | string | string[],
|
|
257
261
|
id?: string,
|
|
262
|
+
version?: string
|
|
258
263
|
}) {
|
|
259
264
|
super({
|
|
260
265
|
location: properties.location,
|
|
@@ -264,6 +269,7 @@ export class HTMLElementAnchorImageData extends HTMLElementAnchorData {
|
|
|
264
269
|
viewports: properties.viewports,
|
|
265
270
|
intersectionTarget: properties.intersectionTarget,
|
|
266
271
|
id: properties.id,
|
|
272
|
+
version: properties.version
|
|
267
273
|
})
|
|
268
274
|
}
|
|
269
275
|
|
|
@@ -279,6 +285,7 @@ export class HTMLElementAnchorImageData extends HTMLElementAnchorData {
|
|
|
279
285
|
viewports: this.viewports,
|
|
280
286
|
intersectionTarget: this.intersectionTarget,
|
|
281
287
|
id: this.id,
|
|
288
|
+
version: this.version
|
|
282
289
|
});
|
|
283
290
|
}
|
|
284
291
|
|
|
@@ -320,6 +327,7 @@ export class HTMLElementAnchorCustomData extends HTMLElementAnchorData {
|
|
|
320
327
|
viewports?: string[],
|
|
321
328
|
intersectionTarget?: Box | string | string[],
|
|
322
329
|
id?: string,
|
|
330
|
+
version?: string
|
|
323
331
|
create: (properties: { anchor: HTMLElementAnchorData, parent: HTMLDivElement }) => void,
|
|
324
332
|
update: (properties: { anchor: HTMLElementAnchorData, htmlElement: HTMLDivElement, page: vec2, container: vec2, client: vec2, scale: vec2, hidden: boolean, visible: boolean }) => void
|
|
325
333
|
}) {
|
|
@@ -331,6 +339,7 @@ export class HTMLElementAnchorCustomData extends HTMLElementAnchorData {
|
|
|
331
339
|
viewports: properties.viewports,
|
|
332
340
|
intersectionTarget: properties.intersectionTarget,
|
|
333
341
|
id: properties.id,
|
|
342
|
+
version: properties.version
|
|
334
343
|
})
|
|
335
344
|
|
|
336
345
|
this.#create = properties.create;
|
|
@@ -357,6 +366,7 @@ export class HTMLElementAnchorCustomData extends HTMLElementAnchorData {
|
|
|
357
366
|
viewports: this.viewports,
|
|
358
367
|
intersectionTarget: this.intersectionTarget,
|
|
359
368
|
id: this.id,
|
|
369
|
+
version: this.version,
|
|
360
370
|
create: this.#create,
|
|
361
371
|
update: this.#update,
|
|
362
372
|
});
|
|
@@ -39,9 +39,10 @@ export abstract class AbstractMaterialData extends AbstractTreeNodeData implemen
|
|
|
39
39
|
*/
|
|
40
40
|
constructor(
|
|
41
41
|
properties?: IMaterialAbstractDataProperties,
|
|
42
|
-
id?: string
|
|
42
|
+
id?: string,
|
|
43
|
+
version?: string
|
|
43
44
|
) {
|
|
44
|
-
super(id);
|
|
45
|
+
super(id, version);
|
|
45
46
|
if (!properties) return;
|
|
46
47
|
if (properties.alphaMap !== undefined) this.alphaMap = properties.alphaMap;
|
|
47
48
|
if (properties.alphaCutoff !== undefined) this.alphaCutoff = properties.alphaCutoff;
|
|
@@ -34,8 +34,10 @@ export class MapData extends AbstractTreeNodeData implements IMapData {
|
|
|
34
34
|
repeat: vec2 = vec2.fromValues(1, 1),
|
|
35
35
|
rotation: number = 0,
|
|
36
36
|
flipY: boolean = true,
|
|
37
|
+
id?: string,
|
|
38
|
+
version?: string
|
|
37
39
|
) {
|
|
38
|
-
super();
|
|
40
|
+
super(id, version);
|
|
39
41
|
this.#image = image;
|
|
40
42
|
this.#wrapS = wrapS;
|
|
41
43
|
this.#wrapT = wrapT;
|
|
@@ -146,7 +148,7 @@ export class MapData extends AbstractTreeNodeData implements IMapData {
|
|
|
146
148
|
// #region Public Methods (1)
|
|
147
149
|
|
|
148
150
|
public clone(): IMapData {
|
|
149
|
-
return new MapData(<HTMLImageElement>this.image
|
|
151
|
+
return new MapData(<HTMLImageElement>this.image, this.wrapS, this.wrapT, this.minFilter, this.magFilter, this.center, this.color, this.offset, this.repeat, this.rotation, this.flipY, this.id, this.version);
|
|
150
152
|
}
|
|
151
153
|
|
|
152
154
|
// #endregion Public Methods (1)
|
|
@@ -37,9 +37,10 @@ export class MaterialGemData extends AbstractMaterialData implements IMaterialGe
|
|
|
37
37
|
*/
|
|
38
38
|
constructor(
|
|
39
39
|
properties?: IMaterialGemDataProperties,
|
|
40
|
-
id?: string
|
|
40
|
+
id?: string,
|
|
41
|
+
version?: string
|
|
41
42
|
) {
|
|
42
|
-
super(properties, id);
|
|
43
|
+
super(properties, id, version);
|
|
43
44
|
if (!properties) return;
|
|
44
45
|
|
|
45
46
|
if (properties.refractionIndex !== undefined) this.refractionIndex = properties.refractionIndex;
|
|
@@ -221,7 +222,7 @@ export class MaterialGemData extends AbstractMaterialData implements IMaterialGe
|
|
|
221
222
|
dispersion: this.dispersion,
|
|
222
223
|
tracingOpacity: this.tracingOpacity,
|
|
223
224
|
envMap: this.envMap,
|
|
224
|
-
}, this.id);
|
|
225
|
+
}, this.id, this.version);
|
|
225
226
|
}
|
|
226
227
|
|
|
227
228
|
public copy(source: MaterialGemData): void {
|
|
@@ -13,9 +13,10 @@ export class MaterialShadowData extends AbstractMaterialData implements IMateria
|
|
|
13
13
|
*/
|
|
14
14
|
constructor(
|
|
15
15
|
properties?: IMaterialShadowDataProperties,
|
|
16
|
-
id?: string
|
|
16
|
+
id?: string,
|
|
17
|
+
version?: string
|
|
17
18
|
) {
|
|
18
|
-
super(properties, id);
|
|
19
|
+
super(properties, id, version);
|
|
19
20
|
if (!properties) return;
|
|
20
21
|
}
|
|
21
22
|
|
|
@@ -32,7 +33,7 @@ export class MaterialShadowData extends AbstractMaterialData implements IMateria
|
|
|
32
33
|
return new MaterialShadowData({
|
|
33
34
|
color: this.color,
|
|
34
35
|
opacity: this.opacity,
|
|
35
|
-
}, this.id);
|
|
36
|
+
}, this.id, this.version);
|
|
36
37
|
}
|
|
37
38
|
|
|
38
39
|
public copy(source: MaterialShadowData): void {
|
|
@@ -26,9 +26,10 @@ export class MaterialSpecularGlossinessData extends AbstractMaterialData impleme
|
|
|
26
26
|
*/
|
|
27
27
|
constructor(
|
|
28
28
|
properties?: IMaterialSpecularGlossinessDataProperties,
|
|
29
|
-
id?: string
|
|
29
|
+
id?: string,
|
|
30
|
+
version?: string
|
|
30
31
|
) {
|
|
31
|
-
super(properties, id);
|
|
32
|
+
super(properties, id, version);
|
|
32
33
|
if (!properties) return;
|
|
33
34
|
if (properties.glossiness !== undefined) this.glossiness = properties.glossiness;
|
|
34
35
|
if (properties.specular !== undefined) this.specular = properties.specular;
|
|
@@ -120,7 +121,7 @@ export class MaterialSpecularGlossinessData extends AbstractMaterialData impleme
|
|
|
120
121
|
glossiness: this.glossiness,
|
|
121
122
|
glossinessMap: this.glossinessMap,
|
|
122
123
|
envMap: this.envMap,
|
|
123
|
-
}, this.id);
|
|
124
|
+
}, this.id, this.version);
|
|
124
125
|
}
|
|
125
126
|
|
|
126
127
|
public copy(source: MaterialSpecularGlossinessData): void {
|
|
@@ -50,9 +50,10 @@ export class MaterialStandardData extends AbstractMaterialData implements IMater
|
|
|
50
50
|
*/
|
|
51
51
|
constructor(
|
|
52
52
|
properties?: IMaterialStandardDataProperties,
|
|
53
|
-
id?: string
|
|
53
|
+
id?: string,
|
|
54
|
+
version?: string
|
|
54
55
|
) {
|
|
55
|
-
super(properties, id);
|
|
56
|
+
super(properties, id, version);
|
|
56
57
|
if (!properties) return;
|
|
57
58
|
if (properties.metalness !== undefined) this.metalness = properties.metalness;
|
|
58
59
|
if (properties.metalnessMap !== undefined) this.metalnessMap = properties.metalnessMap;
|
|
@@ -434,7 +435,7 @@ export class MaterialStandardData extends AbstractMaterialData implements IMater
|
|
|
434
435
|
specularColorMap: this.specularColorMap,
|
|
435
436
|
specularIntensity: this.specularIntensity,
|
|
436
437
|
specularIntensityMap: this.specularIntensityMap,
|
|
437
|
-
}, this.id);
|
|
438
|
+
}, this.id, this.version);
|
|
438
439
|
}
|
|
439
440
|
|
|
440
441
|
public copy(source: MaterialStandardData): void {
|
|
@@ -20,9 +20,10 @@ export class MaterialUnlitData extends AbstractMaterialData implements IMaterial
|
|
|
20
20
|
*/
|
|
21
21
|
constructor(
|
|
22
22
|
properties?: IMaterialUnlitDataProperties,
|
|
23
|
-
id?: string
|
|
23
|
+
id?: string,
|
|
24
|
+
version?: string
|
|
24
25
|
) {
|
|
25
|
-
super(properties, id);
|
|
26
|
+
super(properties, id, version);
|
|
26
27
|
if (!properties) return;
|
|
27
28
|
if (properties.envMap !== undefined) this.envMap = properties.envMap;
|
|
28
29
|
}
|
|
@@ -63,7 +64,7 @@ export class MaterialUnlitData extends AbstractMaterialData implements IMaterial
|
|
|
63
64
|
opacity: this.opacity,
|
|
64
65
|
side: this.side,
|
|
65
66
|
envMap: this.envMap
|
|
66
|
-
}, this.id);
|
|
67
|
+
}, this.id, this.version);
|
|
67
68
|
}
|
|
68
69
|
|
|
69
70
|
public copy(source: MaterialUnlitData): void {
|
|
@@ -13,8 +13,8 @@ export class MaterialVariantsData extends AbstractTreeNodeData implements IMater
|
|
|
13
13
|
|
|
14
14
|
// #region Constructors (1)
|
|
15
15
|
|
|
16
|
-
constructor(id?: string) {
|
|
17
|
-
super(id);
|
|
16
|
+
constructor(id?: string, version?: string) {
|
|
17
|
+
super(id, version);
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
// #endregion Constructors (1)
|
|
@@ -53,7 +53,7 @@ export class MaterialVariantsData extends AbstractTreeNodeData implements IMater
|
|
|
53
53
|
* Clones the scene graph data.
|
|
54
54
|
*/
|
|
55
55
|
public clone(): IMaterialVariantsData {
|
|
56
|
-
return new MaterialVariantsData(this.id);
|
|
56
|
+
return new MaterialVariantsData(this.id, this.version);
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
// #endregion Public Methods (1)
|
|
@@ -96,9 +96,10 @@ export class SDTFAttributesData extends AbstractTreeNodeData implements ISDTFAtt
|
|
|
96
96
|
attributes: {
|
|
97
97
|
[key: string]: SDTFAttributeData
|
|
98
98
|
} = {},
|
|
99
|
-
id?: string
|
|
99
|
+
id?: string,
|
|
100
|
+
version?: string
|
|
100
101
|
) {
|
|
101
|
-
super(id);
|
|
102
|
+
super(id, version);
|
|
102
103
|
this.#attributes = attributes;
|
|
103
104
|
}
|
|
104
105
|
|
|
@@ -120,7 +121,7 @@ export class SDTFAttributesData extends AbstractTreeNodeData implements ISDTFAtt
|
|
|
120
121
|
* Clones the scene graph data.
|
|
121
122
|
*/
|
|
122
123
|
public clone(): ISDTFAttributesData {
|
|
123
|
-
return new SDTFAttributesData(this.attributes, this.id);
|
|
124
|
+
return new SDTFAttributesData(this.attributes, this.id, this.version);
|
|
124
125
|
}
|
|
125
126
|
|
|
126
127
|
// #endregion Public Methods (1)
|
|
@@ -24,9 +24,10 @@ export class SDTFItemData extends AbstractTreeNodeData implements ISDTFItemData
|
|
|
24
24
|
attributes: {
|
|
25
25
|
[key: string]: ISDTFAttributeData
|
|
26
26
|
},
|
|
27
|
-
id?: string
|
|
27
|
+
id?: string,
|
|
28
|
+
version?: string
|
|
28
29
|
) {
|
|
29
|
-
super(id);
|
|
30
|
+
super(id, version);
|
|
30
31
|
this.#attributes = attributes;
|
|
31
32
|
this.#typeHint = typeHint;
|
|
32
33
|
this.#value = value;
|
|
@@ -64,7 +65,7 @@ export class SDTFItemData extends AbstractTreeNodeData implements ISDTFItemData
|
|
|
64
65
|
* Clones the scene graph data.
|
|
65
66
|
*/
|
|
66
67
|
public clone(): ISDTFItemData {
|
|
67
|
-
return new SDTFItemData(this.typeHint, this.value, this.attributes, this.id);
|
|
68
|
+
return new SDTFItemData(this.typeHint, this.value, this.attributes, this.id, this.version);
|
|
68
69
|
}
|
|
69
70
|
|
|
70
71
|
// #endregion Public Methods (1)
|
|
@@ -13,9 +13,10 @@ export class SDTFOverviewData extends AbstractTreeNodeData implements ISDTFOverv
|
|
|
13
13
|
|
|
14
14
|
constructor(
|
|
15
15
|
overview: ISDTFOverview,
|
|
16
|
-
id?: string
|
|
16
|
+
id?: string,
|
|
17
|
+
version?: string
|
|
17
18
|
) {
|
|
18
|
-
super(id);
|
|
19
|
+
super(id, version);
|
|
19
20
|
this.#overview = overview;
|
|
20
21
|
}
|
|
21
22
|
|
|
@@ -35,7 +36,7 @@ export class SDTFOverviewData extends AbstractTreeNodeData implements ISDTFOverv
|
|
|
35
36
|
* Clones the scene graph data.
|
|
36
37
|
*/
|
|
37
38
|
public clone(): ISDTFOverviewData {
|
|
38
|
-
return new SDTFOverviewData(this.#overview, this.id);
|
|
39
|
+
return new SDTFOverviewData(this.#overview, this.id, this.version);
|
|
39
40
|
}
|
|
40
41
|
|
|
41
42
|
public merge(data: ISDTFOverviewData) {
|