@shapediver/viewer.shared.node-tree 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/implementation/AbstractTreeNodeData.d.ts +33 -33
- package/dist/implementation/AbstractTreeNodeData.js +81 -81
- package/dist/implementation/AbstractTreeNodeData.js.map +1 -1
- package/dist/implementation/Tree.d.ts +13 -13
- package/dist/implementation/Tree.js +115 -115
- package/dist/implementation/Tree.js.map +1 -1
- package/dist/implementation/TreeNode.d.ts +78 -78
- package/dist/implementation/TreeNode.js +432 -432
- package/dist/implementation/TreeNode.js.map +1 -1
- package/dist/implementation/data/AnimationData.d.ts +32 -32
- package/dist/implementation/data/AnimationData.js +290 -290
- package/dist/implementation/data/AnimationData.js.map +1 -1
- package/dist/implementation/data/ChunkData.d.ts +14 -14
- package/dist/implementation/data/ChunkData.js +46 -46
- package/dist/implementation/data/ChunkData.js.map +1 -1
- package/dist/implementation/data/CustomData.d.ts +24 -24
- package/dist/implementation/data/CustomData.js +50 -50
- package/dist/implementation/data/GeometryData.d.ts +100 -100
- package/dist/implementation/data/GeometryData.js +326 -326
- package/dist/implementation/data/GeometryData.js.map +1 -1
- package/dist/implementation/data/HTMLElementAnchorData.d.ts +102 -102
- package/dist/implementation/data/HTMLElementAnchorData.js +273 -273
- package/dist/implementation/data/HTMLElementAnchorData.js.map +1 -1
- package/dist/implementation/data/InstanceData.d.ts +21 -21
- package/dist/implementation/data/InstanceData.js +58 -58
- package/dist/implementation/material/AbstractMaterialData.d.ts +68 -68
- package/dist/implementation/material/AbstractMaterialData.js +224 -224
- package/dist/implementation/material/MapData.d.ts +53 -53
- package/dist/implementation/material/MapData.js +190 -190
- package/dist/implementation/material/MaterialBasicLineData.d.ts +14 -14
- package/dist/implementation/material/MaterialBasicLineData.js +90 -90
- package/dist/implementation/material/MaterialGemData.d.ts +46 -46
- package/dist/implementation/material/MaterialGemData.js +288 -288
- package/dist/implementation/material/MaterialLambertData.d.ts +21 -21
- package/dist/implementation/material/MaterialLambertData.js +146 -146
- package/dist/implementation/material/MaterialMultiPointData.d.ts +99 -99
- package/dist/implementation/material/MaterialMultiPointData.js +650 -650
- package/dist/implementation/material/MaterialPhongData.d.ts +25 -25
- package/dist/implementation/material/MaterialPhongData.js +170 -170
- package/dist/implementation/material/MaterialPointData.d.ts +19 -19
- package/dist/implementation/material/MaterialPointData.js +131 -131
- package/dist/implementation/material/MaterialShadowData.d.ts +14 -14
- package/dist/implementation/material/MaterialShadowData.js +35 -35
- package/dist/implementation/material/MaterialSpecularGlossinessData.d.ts +27 -27
- package/dist/implementation/material/MaterialSpecularGlossinessData.js +179 -179
- package/dist/implementation/material/MaterialStandardData.d.ts +75 -75
- package/dist/implementation/material/MaterialStandardData.js +467 -467
- package/dist/implementation/material/MaterialUnlitData.d.ts +17 -17
- package/dist/implementation/material/MaterialUnlitData.js +119 -119
- package/dist/implementation/material/MaterialVariantsData.d.ts +15 -15
- package/dist/implementation/material/MaterialVariantsData.js +61 -61
- package/dist/implementation/material/MaterialVariantsData.js.map +1 -1
- package/dist/implementation/sdtf/SDTFAttributesData.d.ts +22 -22
- package/dist/implementation/sdtf/SDTFAttributesData.js +99 -99
- package/dist/implementation/sdtf/SDTFAttributesData.js.map +1 -1
- package/dist/implementation/sdtf/SDTFItemData.d.ts +18 -18
- package/dist/implementation/sdtf/SDTFItemData.js +59 -59
- package/dist/implementation/sdtf/SDTFItemData.js.map +1 -1
- package/dist/implementation/sdtf/SDTFOverviewData.d.ts +12 -12
- package/dist/implementation/sdtf/SDTFOverviewData.js +106 -106
- package/dist/implementation/sdtf/SDTFOverviewData.js.map +1 -1
- package/dist/index.d.ts +35 -35
- package/dist/index.js +59 -59
- package/package.json +6 -6
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
import { IMaterialUnlitData, IMaterialUnlitDataProperties } from "@shapediver/viewer.shared.types";
|
|
2
|
-
import { AbstractMaterialData } from "./AbstractMaterialData";
|
|
3
|
-
export declare class MaterialUnlitData extends AbstractMaterialData implements IMaterialUnlitData {
|
|
4
|
-
#private;
|
|
5
|
-
/**
|
|
6
|
-
* Creates a material data object.
|
|
7
|
-
*
|
|
8
|
-
* @param _attributes the attributes of the material
|
|
9
|
-
* @param id the id
|
|
10
|
-
*/
|
|
11
|
-
constructor(properties?: IMaterialUnlitDataProperties, id?: string, version?: string);
|
|
12
|
-
get envMap(): string | string[] | undefined;
|
|
13
|
-
set envMap(value: string | string[] | undefined);
|
|
14
|
-
clone(): IMaterialUnlitData;
|
|
15
|
-
copy(source: MaterialUnlitData): void;
|
|
16
|
-
reset(): void;
|
|
17
|
-
}
|
|
1
|
+
import { IMaterialUnlitData, IMaterialUnlitDataProperties } from "@shapediver/viewer.shared.types";
|
|
2
|
+
import { AbstractMaterialData } from "./AbstractMaterialData";
|
|
3
|
+
export declare class MaterialUnlitData extends AbstractMaterialData implements IMaterialUnlitData {
|
|
4
|
+
#private;
|
|
5
|
+
/**
|
|
6
|
+
* Creates a material data object.
|
|
7
|
+
*
|
|
8
|
+
* @param _attributes the attributes of the material
|
|
9
|
+
* @param id the id
|
|
10
|
+
*/
|
|
11
|
+
constructor(properties?: IMaterialUnlitDataProperties, id?: string, version?: string);
|
|
12
|
+
get envMap(): string | string[] | undefined;
|
|
13
|
+
set envMap(value: string | string[] | undefined);
|
|
14
|
+
clone(): IMaterialUnlitData;
|
|
15
|
+
copy(source: MaterialUnlitData): void;
|
|
16
|
+
reset(): void;
|
|
17
|
+
}
|
|
18
18
|
//# sourceMappingURL=MaterialUnlitData.d.ts.map
|
|
@@ -1,120 +1,120 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
3
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
4
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
5
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
6
|
-
};
|
|
7
|
-
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
8
|
-
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
9
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
10
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
11
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
12
|
-
};
|
|
13
|
-
var _MaterialUnlitData_envMap;
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.MaterialUnlitData = void 0;
|
|
16
|
-
const viewer_shared_types_1 = require("@shapediver/viewer.shared.types");
|
|
17
|
-
const AbstractMaterialData_1 = require("./AbstractMaterialData");
|
|
18
|
-
class MaterialUnlitData extends AbstractMaterialData_1.AbstractMaterialData {
|
|
19
|
-
// #endregion Properties (1)
|
|
20
|
-
// #region Constructors (1)
|
|
21
|
-
/**
|
|
22
|
-
* Creates a material data object.
|
|
23
|
-
*
|
|
24
|
-
* @param _attributes the attributes of the material
|
|
25
|
-
* @param id the id
|
|
26
|
-
*/
|
|
27
|
-
constructor(properties, id, version) {
|
|
28
|
-
super(properties, id, version);
|
|
29
|
-
// #region Properties (1)
|
|
30
|
-
_MaterialUnlitData_envMap.set(this, void 0);
|
|
31
|
-
if (!properties)
|
|
32
|
-
return;
|
|
33
|
-
if (properties.envMap !== undefined)
|
|
34
|
-
this.envMap = properties.envMap;
|
|
35
|
-
}
|
|
36
|
-
// #endregion Constructors (1)
|
|
37
|
-
// #region Public Accessors (2)
|
|
38
|
-
get envMap() {
|
|
39
|
-
return __classPrivateFieldGet(this, _MaterialUnlitData_envMap, "f");
|
|
40
|
-
}
|
|
41
|
-
set envMap(value) {
|
|
42
|
-
__classPrivateFieldSet(this, _MaterialUnlitData_envMap, value, "f");
|
|
43
|
-
}
|
|
44
|
-
// #endregion Public Accessors (2)
|
|
45
|
-
// #region Public Methods (3)
|
|
46
|
-
clone() {
|
|
47
|
-
return new MaterialUnlitData({
|
|
48
|
-
alphaMap: this.alphaMap,
|
|
49
|
-
alphaCutoff: this.alphaCutoff,
|
|
50
|
-
alphaMode: this.alphaMode,
|
|
51
|
-
aoMap: this.aoMap,
|
|
52
|
-
aoMapIntensity: this.aoMapIntensity,
|
|
53
|
-
bumpMap: this.bumpMap,
|
|
54
|
-
bumpScale: this.bumpScale,
|
|
55
|
-
color: this.color,
|
|
56
|
-
depthTest: this.depthTest,
|
|
57
|
-
depthWrite: this.depthWrite,
|
|
58
|
-
emissiveMap: this.emissiveMap,
|
|
59
|
-
emissiveness: this.emissiveness,
|
|
60
|
-
shading: this.shading,
|
|
61
|
-
map: this.map,
|
|
62
|
-
name: this.name,
|
|
63
|
-
normalMap: this.normalMap,
|
|
64
|
-
normalScale: this.normalScale,
|
|
65
|
-
opacity: this.opacity,
|
|
66
|
-
side: this.side,
|
|
67
|
-
transparent: this.transparent,
|
|
68
|
-
envMap: this.envMap,
|
|
69
|
-
}, this.id, this.version);
|
|
70
|
-
}
|
|
71
|
-
copy(source) {
|
|
72
|
-
this.alphaCutoff = source.alphaCutoff;
|
|
73
|
-
this.alphaMap = source.alphaMap;
|
|
74
|
-
this.alphaMode = source.alphaMode;
|
|
75
|
-
this.aoMap = source.aoMap;
|
|
76
|
-
this.aoMapIntensity = source.aoMapIntensity;
|
|
77
|
-
this.bumpMap = source.bumpMap;
|
|
78
|
-
this.bumpScale = source.bumpScale;
|
|
79
|
-
this.color = source.color;
|
|
80
|
-
this.depthTest = source.depthTest;
|
|
81
|
-
this.depthWrite = source.depthWrite;
|
|
82
|
-
this.emissiveMap = source.emissiveMap;
|
|
83
|
-
this.emissiveness = source.emissiveness;
|
|
84
|
-
this.materialOutput = source.materialOutput;
|
|
85
|
-
this.map = source.map;
|
|
86
|
-
this.normalMap = source.normalMap;
|
|
87
|
-
this.normalScale = source.normalScale;
|
|
88
|
-
this.opacity = source.opacity;
|
|
89
|
-
this.shading = source.shading;
|
|
90
|
-
this.side = source.side;
|
|
91
|
-
this.envMap = source.envMap;
|
|
92
|
-
this.transparent = source.transparent;
|
|
93
|
-
}
|
|
94
|
-
reset() {
|
|
95
|
-
this.alphaCutoff = 0;
|
|
96
|
-
this.alphaMap = undefined;
|
|
97
|
-
this.alphaMode = viewer_shared_types_1.MATERIAL_ALPHA.OPAQUE;
|
|
98
|
-
this.aoMap = undefined;
|
|
99
|
-
this.aoMapIntensity = 1.0;
|
|
100
|
-
this.bumpMap = undefined;
|
|
101
|
-
this.bumpScale = 1.0;
|
|
102
|
-
this.color = "#ffffff";
|
|
103
|
-
this.depthTest = undefined;
|
|
104
|
-
this.depthWrite = undefined;
|
|
105
|
-
this.emissiveMap = undefined;
|
|
106
|
-
this.emissiveness = "#000000";
|
|
107
|
-
this.materialOutput = false;
|
|
108
|
-
this.map = undefined;
|
|
109
|
-
this.normalMap = undefined;
|
|
110
|
-
this.normalScale = 1.0;
|
|
111
|
-
this.opacity = 1.0;
|
|
112
|
-
this.shading = viewer_shared_types_1.MATERIAL_SHADING.SMOOTH;
|
|
113
|
-
this.side = viewer_shared_types_1.MATERIAL_SIDE.DOUBLE;
|
|
114
|
-
this.transparent = undefined;
|
|
115
|
-
this.envMap = undefined;
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
exports.MaterialUnlitData = MaterialUnlitData;
|
|
119
|
-
_MaterialUnlitData_envMap = new WeakMap();
|
|
1
|
+
"use strict";
|
|
2
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
3
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
4
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
5
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
6
|
+
};
|
|
7
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
8
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
9
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
10
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
11
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
12
|
+
};
|
|
13
|
+
var _MaterialUnlitData_envMap;
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.MaterialUnlitData = void 0;
|
|
16
|
+
const viewer_shared_types_1 = require("@shapediver/viewer.shared.types");
|
|
17
|
+
const AbstractMaterialData_1 = require("./AbstractMaterialData");
|
|
18
|
+
class MaterialUnlitData extends AbstractMaterialData_1.AbstractMaterialData {
|
|
19
|
+
// #endregion Properties (1)
|
|
20
|
+
// #region Constructors (1)
|
|
21
|
+
/**
|
|
22
|
+
* Creates a material data object.
|
|
23
|
+
*
|
|
24
|
+
* @param _attributes the attributes of the material
|
|
25
|
+
* @param id the id
|
|
26
|
+
*/
|
|
27
|
+
constructor(properties, id, version) {
|
|
28
|
+
super(properties, id, version);
|
|
29
|
+
// #region Properties (1)
|
|
30
|
+
_MaterialUnlitData_envMap.set(this, void 0);
|
|
31
|
+
if (!properties)
|
|
32
|
+
return;
|
|
33
|
+
if (properties.envMap !== undefined)
|
|
34
|
+
this.envMap = properties.envMap;
|
|
35
|
+
}
|
|
36
|
+
// #endregion Constructors (1)
|
|
37
|
+
// #region Public Accessors (2)
|
|
38
|
+
get envMap() {
|
|
39
|
+
return __classPrivateFieldGet(this, _MaterialUnlitData_envMap, "f");
|
|
40
|
+
}
|
|
41
|
+
set envMap(value) {
|
|
42
|
+
__classPrivateFieldSet(this, _MaterialUnlitData_envMap, value, "f");
|
|
43
|
+
}
|
|
44
|
+
// #endregion Public Accessors (2)
|
|
45
|
+
// #region Public Methods (3)
|
|
46
|
+
clone() {
|
|
47
|
+
return new MaterialUnlitData({
|
|
48
|
+
alphaMap: this.alphaMap,
|
|
49
|
+
alphaCutoff: this.alphaCutoff,
|
|
50
|
+
alphaMode: this.alphaMode,
|
|
51
|
+
aoMap: this.aoMap,
|
|
52
|
+
aoMapIntensity: this.aoMapIntensity,
|
|
53
|
+
bumpMap: this.bumpMap,
|
|
54
|
+
bumpScale: this.bumpScale,
|
|
55
|
+
color: this.color,
|
|
56
|
+
depthTest: this.depthTest,
|
|
57
|
+
depthWrite: this.depthWrite,
|
|
58
|
+
emissiveMap: this.emissiveMap,
|
|
59
|
+
emissiveness: this.emissiveness,
|
|
60
|
+
shading: this.shading,
|
|
61
|
+
map: this.map,
|
|
62
|
+
name: this.name,
|
|
63
|
+
normalMap: this.normalMap,
|
|
64
|
+
normalScale: this.normalScale,
|
|
65
|
+
opacity: this.opacity,
|
|
66
|
+
side: this.side,
|
|
67
|
+
transparent: this.transparent,
|
|
68
|
+
envMap: this.envMap,
|
|
69
|
+
}, this.id, this.version);
|
|
70
|
+
}
|
|
71
|
+
copy(source) {
|
|
72
|
+
this.alphaCutoff = source.alphaCutoff;
|
|
73
|
+
this.alphaMap = source.alphaMap;
|
|
74
|
+
this.alphaMode = source.alphaMode;
|
|
75
|
+
this.aoMap = source.aoMap;
|
|
76
|
+
this.aoMapIntensity = source.aoMapIntensity;
|
|
77
|
+
this.bumpMap = source.bumpMap;
|
|
78
|
+
this.bumpScale = source.bumpScale;
|
|
79
|
+
this.color = source.color;
|
|
80
|
+
this.depthTest = source.depthTest;
|
|
81
|
+
this.depthWrite = source.depthWrite;
|
|
82
|
+
this.emissiveMap = source.emissiveMap;
|
|
83
|
+
this.emissiveness = source.emissiveness;
|
|
84
|
+
this.materialOutput = source.materialOutput;
|
|
85
|
+
this.map = source.map;
|
|
86
|
+
this.normalMap = source.normalMap;
|
|
87
|
+
this.normalScale = source.normalScale;
|
|
88
|
+
this.opacity = source.opacity;
|
|
89
|
+
this.shading = source.shading;
|
|
90
|
+
this.side = source.side;
|
|
91
|
+
this.envMap = source.envMap;
|
|
92
|
+
this.transparent = source.transparent;
|
|
93
|
+
}
|
|
94
|
+
reset() {
|
|
95
|
+
this.alphaCutoff = 0;
|
|
96
|
+
this.alphaMap = undefined;
|
|
97
|
+
this.alphaMode = viewer_shared_types_1.MATERIAL_ALPHA.OPAQUE;
|
|
98
|
+
this.aoMap = undefined;
|
|
99
|
+
this.aoMapIntensity = 1.0;
|
|
100
|
+
this.bumpMap = undefined;
|
|
101
|
+
this.bumpScale = 1.0;
|
|
102
|
+
this.color = "#ffffff";
|
|
103
|
+
this.depthTest = undefined;
|
|
104
|
+
this.depthWrite = undefined;
|
|
105
|
+
this.emissiveMap = undefined;
|
|
106
|
+
this.emissiveness = "#000000";
|
|
107
|
+
this.materialOutput = false;
|
|
108
|
+
this.map = undefined;
|
|
109
|
+
this.normalMap = undefined;
|
|
110
|
+
this.normalScale = 1.0;
|
|
111
|
+
this.opacity = 1.0;
|
|
112
|
+
this.shading = viewer_shared_types_1.MATERIAL_SHADING.SMOOTH;
|
|
113
|
+
this.side = viewer_shared_types_1.MATERIAL_SIDE.DOUBLE;
|
|
114
|
+
this.transparent = undefined;
|
|
115
|
+
this.envMap = undefined;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
exports.MaterialUnlitData = MaterialUnlitData;
|
|
119
|
+
_MaterialUnlitData_envMap = new WeakMap();
|
|
120
120
|
//# sourceMappingURL=MaterialUnlitData.js.map
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import { IMaterialVariantsData } from "@shapediver/viewer.shared.types";
|
|
2
|
-
import { AbstractTreeNodeData } from "../AbstractTreeNodeData";
|
|
3
|
-
import { GeometryData } from "../data/GeometryData";
|
|
4
|
-
export declare class MaterialVariantsData extends AbstractTreeNodeData implements IMaterialVariantsData {
|
|
5
|
-
#private;
|
|
6
|
-
constructor(id?: string, version?: string);
|
|
7
|
-
get geometryData(): GeometryData[];
|
|
8
|
-
get variants(): string[];
|
|
9
|
-
get variantIndex(): number | undefined;
|
|
10
|
-
set variantIndex(value: number | undefined);
|
|
11
|
-
/**
|
|
12
|
-
* Clones the scene graph data.
|
|
13
|
-
*/
|
|
14
|
-
clone(): IMaterialVariantsData;
|
|
15
|
-
}
|
|
1
|
+
import { IMaterialVariantsData } from "@shapediver/viewer.shared.types";
|
|
2
|
+
import { AbstractTreeNodeData } from "../AbstractTreeNodeData";
|
|
3
|
+
import { GeometryData } from "../data/GeometryData";
|
|
4
|
+
export declare class MaterialVariantsData extends AbstractTreeNodeData implements IMaterialVariantsData {
|
|
5
|
+
#private;
|
|
6
|
+
constructor(id?: string, version?: string);
|
|
7
|
+
get geometryData(): GeometryData[];
|
|
8
|
+
get variants(): string[];
|
|
9
|
+
get variantIndex(): number | undefined;
|
|
10
|
+
set variantIndex(value: number | undefined);
|
|
11
|
+
/**
|
|
12
|
+
* Clones the scene graph data.
|
|
13
|
+
*/
|
|
14
|
+
clone(): IMaterialVariantsData;
|
|
15
|
+
}
|
|
16
16
|
//# sourceMappingURL=MaterialVariantsData.d.ts.map
|
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
3
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
4
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
5
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
6
|
-
};
|
|
7
|
-
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
8
|
-
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
9
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
10
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
11
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
12
|
-
};
|
|
13
|
-
var _MaterialVariantsData_variants, _MaterialVariantsData_geometryData, _MaterialVariantsData_variantIndex;
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.MaterialVariantsData = void 0;
|
|
16
|
-
const AbstractTreeNodeData_1 = require("../AbstractTreeNodeData");
|
|
17
|
-
class MaterialVariantsData extends AbstractTreeNodeData_1.AbstractTreeNodeData {
|
|
18
|
-
// #endregion Properties (1)
|
|
19
|
-
// #region Constructors (1)
|
|
20
|
-
constructor(id, version) {
|
|
21
|
-
super(id, version);
|
|
22
|
-
// #region Properties (1)
|
|
23
|
-
_MaterialVariantsData_variants.set(this, []);
|
|
24
|
-
_MaterialVariantsData_geometryData.set(this, []);
|
|
25
|
-
_MaterialVariantsData_variantIndex.set(this, void 0);
|
|
26
|
-
}
|
|
27
|
-
// #endregion Constructors (1)
|
|
28
|
-
// #region Public Accessors (2)
|
|
29
|
-
get geometryData() {
|
|
30
|
-
return __classPrivateFieldGet(this, _MaterialVariantsData_geometryData, "f");
|
|
31
|
-
}
|
|
32
|
-
get variants() {
|
|
33
|
-
return __classPrivateFieldGet(this, _MaterialVariantsData_variants, "f");
|
|
34
|
-
}
|
|
35
|
-
get variantIndex() {
|
|
36
|
-
return __classPrivateFieldGet(this, _MaterialVariantsData_variantIndex, "f");
|
|
37
|
-
}
|
|
38
|
-
set variantIndex(value) {
|
|
39
|
-
__classPrivateFieldSet(this, _MaterialVariantsData_variantIndex, value, "f");
|
|
40
|
-
for (let i = 0; i < this.geometryData.length; i++) {
|
|
41
|
-
const variant = this.geometryData[i].materialVariants.find((v) => v.variant === __classPrivateFieldGet(this, _MaterialVariantsData_variantIndex, "f"));
|
|
42
|
-
if (variant) {
|
|
43
|
-
this.geometryData[i].material = variant.material;
|
|
44
|
-
}
|
|
45
|
-
else {
|
|
46
|
-
this.geometryData[i].material =
|
|
47
|
-
this.geometryData[i].standardMaterial;
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
// #endregion Public Accessors (2)
|
|
52
|
-
// #region Public Methods (1)
|
|
53
|
-
/**
|
|
54
|
-
* Clones the scene graph data.
|
|
55
|
-
*/
|
|
56
|
-
clone() {
|
|
57
|
-
return new MaterialVariantsData(this.id, this.version);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
exports.MaterialVariantsData = MaterialVariantsData;
|
|
61
|
-
_MaterialVariantsData_variants = new WeakMap(), _MaterialVariantsData_geometryData = new WeakMap(), _MaterialVariantsData_variantIndex = new WeakMap();
|
|
1
|
+
"use strict";
|
|
2
|
+
var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {
|
|
3
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
|
|
4
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
5
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
6
|
+
};
|
|
7
|
+
var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
|
|
8
|
+
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
9
|
+
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
10
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
11
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
12
|
+
};
|
|
13
|
+
var _MaterialVariantsData_variants, _MaterialVariantsData_geometryData, _MaterialVariantsData_variantIndex;
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.MaterialVariantsData = void 0;
|
|
16
|
+
const AbstractTreeNodeData_1 = require("../AbstractTreeNodeData");
|
|
17
|
+
class MaterialVariantsData extends AbstractTreeNodeData_1.AbstractTreeNodeData {
|
|
18
|
+
// #endregion Properties (1)
|
|
19
|
+
// #region Constructors (1)
|
|
20
|
+
constructor(id, version) {
|
|
21
|
+
super(id, version);
|
|
22
|
+
// #region Properties (1)
|
|
23
|
+
_MaterialVariantsData_variants.set(this, []);
|
|
24
|
+
_MaterialVariantsData_geometryData.set(this, []);
|
|
25
|
+
_MaterialVariantsData_variantIndex.set(this, void 0);
|
|
26
|
+
}
|
|
27
|
+
// #endregion Constructors (1)
|
|
28
|
+
// #region Public Accessors (2)
|
|
29
|
+
get geometryData() {
|
|
30
|
+
return __classPrivateFieldGet(this, _MaterialVariantsData_geometryData, "f");
|
|
31
|
+
}
|
|
32
|
+
get variants() {
|
|
33
|
+
return __classPrivateFieldGet(this, _MaterialVariantsData_variants, "f");
|
|
34
|
+
}
|
|
35
|
+
get variantIndex() {
|
|
36
|
+
return __classPrivateFieldGet(this, _MaterialVariantsData_variantIndex, "f");
|
|
37
|
+
}
|
|
38
|
+
set variantIndex(value) {
|
|
39
|
+
__classPrivateFieldSet(this, _MaterialVariantsData_variantIndex, value, "f");
|
|
40
|
+
for (let i = 0; i < this.geometryData.length; i++) {
|
|
41
|
+
const variant = this.geometryData[i].materialVariants.find((v) => v.variant === __classPrivateFieldGet(this, _MaterialVariantsData_variantIndex, "f"));
|
|
42
|
+
if (variant) {
|
|
43
|
+
this.geometryData[i].material = variant.material;
|
|
44
|
+
}
|
|
45
|
+
else {
|
|
46
|
+
this.geometryData[i].material =
|
|
47
|
+
this.geometryData[i].standardMaterial;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
// #endregion Public Accessors (2)
|
|
52
|
+
// #region Public Methods (1)
|
|
53
|
+
/**
|
|
54
|
+
* Clones the scene graph data.
|
|
55
|
+
*/
|
|
56
|
+
clone() {
|
|
57
|
+
return new MaterialVariantsData(this.id, this.version);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
exports.MaterialVariantsData = MaterialVariantsData;
|
|
61
|
+
_MaterialVariantsData_variants = new WeakMap(), _MaterialVariantsData_geometryData = new WeakMap(), _MaterialVariantsData_variantIndex = new WeakMap();
|
|
62
62
|
//# sourceMappingURL=MaterialVariantsData.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MaterialVariantsData.js","sourceRoot":"","sources":["../../../src/implementation/material/MaterialVariantsData.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,kEAA6D;AAG7D,MAAa,oBACZ,SAAQ,2CAAoB;IAS5B,4BAA4B;IAE5B,2BAA2B;IAE3B,YAAY,EAAW,EAAE,OAAgB;QACxC,KAAK,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;QAXpB,yBAAyB;
|
|
1
|
+
{"version":3,"file":"MaterialVariantsData.js","sourceRoot":"","sources":["../../../src/implementation/material/MaterialVariantsData.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AACA,kEAA6D;AAG7D,MAAa,oBACZ,SAAQ,2CAAoB;IAS5B,4BAA4B;IAE5B,2BAA2B;IAE3B,YAAY,EAAW,EAAE,OAAgB;QACxC,KAAK,CAAC,EAAE,EAAE,OAAO,CAAC,CAAC;QAXpB,yBAAyB;QAEhB,yCAAsB,EAAE,EAAC;QACzB,6CAAgC,EAAE,EAAC;QAC5C,qDAAuB;IAQvB,CAAC;IAED,8BAA8B;IAE9B,+BAA+B;IAE/B,IAAW,YAAY;QACtB,OAAO,uBAAA,IAAI,0CAAc,CAAC;IAC3B,CAAC;IAED,IAAW,QAAQ;QAClB,OAAO,uBAAA,IAAI,sCAAU,CAAC;IACvB,CAAC;IAED,IAAW,YAAY;QACtB,OAAO,uBAAA,IAAI,0CAAc,CAAC;IAC3B,CAAC;IAED,IAAW,YAAY,CAAC,KAAyB;QAChD,uBAAA,IAAI,sCAAiB,KAAK,MAAA,CAAC;QAC3B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;YACnD,MAAM,OAAO,GAAG,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC,IAAI,CACzD,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,OAAO,KAAK,uBAAA,IAAI,0CAAc,CACvC,CAAC;YACF,IAAI,OAAO,EAAE,CAAC;gBACb,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;YAClD,CAAC;iBAAM,CAAC;gBACP,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,QAAQ;oBAC5B,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,gBAAgB,CAAC;YACxC,CAAC;QACF,CAAC;IACF,CAAC;IAED,kCAAkC;IAElC,6BAA6B;IAE7B;;OAEG;IACI,KAAK;QACX,OAAO,IAAI,oBAAoB,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC;IACxD,CAAC;CAGD;AA7DD,oDA6DC"}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import { SdtfTypeHintName } from "@shapediver/sdk.sdtf-v1";
|
|
2
|
-
import { ISDTFAttributeData, ISDTFAttributesData } from "@shapediver/viewer.shared.types";
|
|
3
|
-
import { AbstractTreeNodeData } from "../AbstractTreeNodeData";
|
|
4
|
-
export declare class SDTFAttributeData implements ISDTFAttributeData {
|
|
5
|
-
#private;
|
|
6
|
-
constructor(typeHint: SdtfTypeHintName | string, value: any);
|
|
7
|
-
get typeHint(): SdtfTypeHintName | string;
|
|
8
|
-
get value(): any;
|
|
9
|
-
}
|
|
10
|
-
export declare class SDTFAttributesData extends AbstractTreeNodeData implements ISDTFAttributesData {
|
|
11
|
-
#private;
|
|
12
|
-
constructor(attributes?: {
|
|
13
|
-
[key: string]: SDTFAttributeData;
|
|
14
|
-
}, id?: string, version?: string);
|
|
15
|
-
get attributes(): {
|
|
16
|
-
[key: string]: SDTFAttributeData;
|
|
17
|
-
};
|
|
18
|
-
/**
|
|
19
|
-
* Clones the scene graph data.
|
|
20
|
-
*/
|
|
21
|
-
clone(): ISDTFAttributesData;
|
|
22
|
-
}
|
|
1
|
+
import { SdtfTypeHintName } from "@shapediver/sdk.sdtf-v1";
|
|
2
|
+
import { ISDTFAttributeData, ISDTFAttributesData } from "@shapediver/viewer.shared.types";
|
|
3
|
+
import { AbstractTreeNodeData } from "../AbstractTreeNodeData";
|
|
4
|
+
export declare class SDTFAttributeData implements ISDTFAttributeData {
|
|
5
|
+
#private;
|
|
6
|
+
constructor(typeHint: SdtfTypeHintName | string, value: any);
|
|
7
|
+
get typeHint(): SdtfTypeHintName | string;
|
|
8
|
+
get value(): any;
|
|
9
|
+
}
|
|
10
|
+
export declare class SDTFAttributesData extends AbstractTreeNodeData implements ISDTFAttributesData {
|
|
11
|
+
#private;
|
|
12
|
+
constructor(attributes?: {
|
|
13
|
+
[key: string]: SDTFAttributeData;
|
|
14
|
+
}, id?: string, version?: string);
|
|
15
|
+
get attributes(): {
|
|
16
|
+
[key: string]: SDTFAttributeData;
|
|
17
|
+
};
|
|
18
|
+
/**
|
|
19
|
+
* Clones the scene graph data.
|
|
20
|
+
*/
|
|
21
|
+
clone(): ISDTFAttributesData;
|
|
22
|
+
}
|
|
23
23
|
//# sourceMappingURL=SDTFAttributesData.d.ts.map
|