@shapediver/viewer.shared.node-tree 3.16.8 → 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,289 +1,289 @@
|
|
|
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 _MaterialGemData_refractionIndex, _MaterialGemData_impurityMap, _MaterialGemData_impurityScale, _MaterialGemData_colorTransferBegin, _MaterialGemData_colorTransferEnd, _MaterialGemData_center, _MaterialGemData_radius, _MaterialGemData_sphericalNormalMap, _MaterialGemData_gamma, _MaterialGemData_contrast, _MaterialGemData_brightness, _MaterialGemData_dispersion, _MaterialGemData_tracingDepth, _MaterialGemData_tracingOpacity, _MaterialGemData_envMap;
|
|
14
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
-
exports.MaterialGemData = void 0;
|
|
16
|
-
const viewer_shared_types_1 = require("@shapediver/viewer.shared.types");
|
|
17
|
-
const gl_matrix_1 = require("gl-matrix");
|
|
18
|
-
const AbstractMaterialData_1 = require("./AbstractMaterialData");
|
|
19
|
-
class MaterialGemData extends AbstractMaterialData_1.AbstractMaterialData {
|
|
20
|
-
// #endregion Properties (5)
|
|
21
|
-
// #region Constructors (1)
|
|
22
|
-
/**
|
|
23
|
-
* Creates a material data object.
|
|
24
|
-
*
|
|
25
|
-
* @param _attributes the attributes of the material
|
|
26
|
-
* @param id the id
|
|
27
|
-
*/
|
|
28
|
-
constructor(properties, id, version) {
|
|
29
|
-
super(properties, id, version);
|
|
30
|
-
// #region Properties (5)
|
|
31
|
-
_MaterialGemData_refractionIndex.set(this, 2.4);
|
|
32
|
-
_MaterialGemData_impurityMap.set(this, void 0);
|
|
33
|
-
_MaterialGemData_impurityScale.set(this, 1.0);
|
|
34
|
-
_MaterialGemData_colorTransferBegin.set(this, "#ffffff");
|
|
35
|
-
_MaterialGemData_colorTransferEnd.set(this, "#ffffff");
|
|
36
|
-
_MaterialGemData_center.set(this, gl_matrix_1.vec3.create());
|
|
37
|
-
_MaterialGemData_radius.set(this, 1);
|
|
38
|
-
_MaterialGemData_sphericalNormalMap.set(this, void 0);
|
|
39
|
-
_MaterialGemData_gamma.set(this, 1);
|
|
40
|
-
_MaterialGemData_contrast.set(this, 1);
|
|
41
|
-
_MaterialGemData_brightness.set(this, 0);
|
|
42
|
-
_MaterialGemData_dispersion.set(this, 0);
|
|
43
|
-
_MaterialGemData_tracingDepth.set(this, 5);
|
|
44
|
-
_MaterialGemData_tracingOpacity.set(this, 0);
|
|
45
|
-
_MaterialGemData_envMap.set(this, void 0);
|
|
46
|
-
if (!properties)
|
|
47
|
-
return;
|
|
48
|
-
if (properties.refractionIndex !== undefined)
|
|
49
|
-
this.refractionIndex = properties.refractionIndex;
|
|
50
|
-
if (properties.impurityMap !== undefined)
|
|
51
|
-
this.impurityMap = properties.impurityMap;
|
|
52
|
-
if (properties.impurityScale !== undefined)
|
|
53
|
-
this.impurityScale = properties.impurityScale;
|
|
54
|
-
if (properties.colorTransferBegin !== undefined)
|
|
55
|
-
this.colorTransferBegin = properties.colorTransferBegin;
|
|
56
|
-
if (properties.colorTransferEnd !== undefined)
|
|
57
|
-
this.colorTransferEnd = properties.colorTransferEnd;
|
|
58
|
-
if (properties.center !== undefined)
|
|
59
|
-
this.center = properties.center;
|
|
60
|
-
if (properties.tracingDepth !== undefined)
|
|
61
|
-
this.tracingDepth = properties.tracingDepth;
|
|
62
|
-
if (properties.radius !== undefined)
|
|
63
|
-
this.radius = properties.radius;
|
|
64
|
-
if (properties.sphericalNormalMap !== undefined)
|
|
65
|
-
this.sphericalNormalMap = properties.sphericalNormalMap;
|
|
66
|
-
if (properties.gamma !== undefined)
|
|
67
|
-
this.gamma = properties.gamma;
|
|
68
|
-
if (properties.contrast !== undefined)
|
|
69
|
-
this.contrast = properties.contrast;
|
|
70
|
-
if (properties.brightness !== undefined)
|
|
71
|
-
this.brightness = properties.brightness;
|
|
72
|
-
if (properties.dispersion !== undefined)
|
|
73
|
-
this.dispersion = properties.dispersion;
|
|
74
|
-
if (properties.tracingOpacity !== undefined)
|
|
75
|
-
this.tracingOpacity = properties.tracingOpacity;
|
|
76
|
-
if (properties.envMap !== undefined)
|
|
77
|
-
this.envMap = properties.envMap;
|
|
78
|
-
}
|
|
79
|
-
// #endregion Constructors (1)
|
|
80
|
-
// #region Public Accessors (10)
|
|
81
|
-
get refractionIndex() {
|
|
82
|
-
return __classPrivateFieldGet(this, _MaterialGemData_refractionIndex, "f");
|
|
83
|
-
}
|
|
84
|
-
set refractionIndex(value) {
|
|
85
|
-
__classPrivateFieldSet(this, _MaterialGemData_refractionIndex, value, "f");
|
|
86
|
-
}
|
|
87
|
-
get impurityMap() {
|
|
88
|
-
return __classPrivateFieldGet(this, _MaterialGemData_impurityMap, "f");
|
|
89
|
-
}
|
|
90
|
-
set impurityMap(value) {
|
|
91
|
-
__classPrivateFieldSet(this, _MaterialGemData_impurityMap, value, "f");
|
|
92
|
-
}
|
|
93
|
-
get impurityScale() {
|
|
94
|
-
return __classPrivateFieldGet(this, _MaterialGemData_impurityScale, "f");
|
|
95
|
-
}
|
|
96
|
-
set impurityScale(value) {
|
|
97
|
-
__classPrivateFieldSet(this, _MaterialGemData_impurityScale, value, "f");
|
|
98
|
-
}
|
|
99
|
-
get colorTransferBegin() {
|
|
100
|
-
return __classPrivateFieldGet(this, _MaterialGemData_colorTransferBegin, "f");
|
|
101
|
-
}
|
|
102
|
-
set colorTransferBegin(value) {
|
|
103
|
-
__classPrivateFieldSet(this, _MaterialGemData_colorTransferBegin, value, "f");
|
|
104
|
-
}
|
|
105
|
-
get colorTransferEnd() {
|
|
106
|
-
return __classPrivateFieldGet(this, _MaterialGemData_colorTransferEnd, "f");
|
|
107
|
-
}
|
|
108
|
-
set colorTransferEnd(value) {
|
|
109
|
-
__classPrivateFieldSet(this, _MaterialGemData_colorTransferEnd, value, "f");
|
|
110
|
-
}
|
|
111
|
-
get center() {
|
|
112
|
-
return __classPrivateFieldGet(this, _MaterialGemData_center, "f");
|
|
113
|
-
}
|
|
114
|
-
set center(value) {
|
|
115
|
-
__classPrivateFieldSet(this, _MaterialGemData_center, value, "f");
|
|
116
|
-
}
|
|
117
|
-
get tracingDepth() {
|
|
118
|
-
return __classPrivateFieldGet(this, _MaterialGemData_tracingDepth, "f");
|
|
119
|
-
}
|
|
120
|
-
set tracingDepth(value) {
|
|
121
|
-
__classPrivateFieldSet(this, _MaterialGemData_tracingDepth, value, "f");
|
|
122
|
-
}
|
|
123
|
-
get radius() {
|
|
124
|
-
return __classPrivateFieldGet(this, _MaterialGemData_radius, "f");
|
|
125
|
-
}
|
|
126
|
-
set radius(value) {
|
|
127
|
-
__classPrivateFieldSet(this, _MaterialGemData_radius, value, "f");
|
|
128
|
-
}
|
|
129
|
-
get sphericalNormalMap() {
|
|
130
|
-
return __classPrivateFieldGet(this, _MaterialGemData_sphericalNormalMap, "f");
|
|
131
|
-
}
|
|
132
|
-
set sphericalNormalMap(value) {
|
|
133
|
-
__classPrivateFieldSet(this, _MaterialGemData_sphericalNormalMap, value, "f");
|
|
134
|
-
}
|
|
135
|
-
get gamma() {
|
|
136
|
-
return __classPrivateFieldGet(this, _MaterialGemData_gamma, "f");
|
|
137
|
-
}
|
|
138
|
-
set gamma(value) {
|
|
139
|
-
__classPrivateFieldSet(this, _MaterialGemData_gamma, value, "f");
|
|
140
|
-
}
|
|
141
|
-
get contrast() {
|
|
142
|
-
return __classPrivateFieldGet(this, _MaterialGemData_contrast, "f");
|
|
143
|
-
}
|
|
144
|
-
set contrast(value) {
|
|
145
|
-
__classPrivateFieldSet(this, _MaterialGemData_contrast, value, "f");
|
|
146
|
-
}
|
|
147
|
-
get brightness() {
|
|
148
|
-
return __classPrivateFieldGet(this, _MaterialGemData_brightness, "f");
|
|
149
|
-
}
|
|
150
|
-
set brightness(value) {
|
|
151
|
-
__classPrivateFieldSet(this, _MaterialGemData_brightness, value, "f");
|
|
152
|
-
}
|
|
153
|
-
get dispersion() {
|
|
154
|
-
return __classPrivateFieldGet(this, _MaterialGemData_dispersion, "f");
|
|
155
|
-
}
|
|
156
|
-
set dispersion(value) {
|
|
157
|
-
__classPrivateFieldSet(this, _MaterialGemData_dispersion, value, "f");
|
|
158
|
-
}
|
|
159
|
-
get tracingOpacity() {
|
|
160
|
-
return __classPrivateFieldGet(this, _MaterialGemData_tracingOpacity, "f");
|
|
161
|
-
}
|
|
162
|
-
set tracingOpacity(value) {
|
|
163
|
-
__classPrivateFieldSet(this, _MaterialGemData_tracingOpacity, value, "f");
|
|
164
|
-
}
|
|
165
|
-
get envMap() {
|
|
166
|
-
return __classPrivateFieldGet(this, _MaterialGemData_envMap, "f");
|
|
167
|
-
}
|
|
168
|
-
set envMap(value) {
|
|
169
|
-
__classPrivateFieldSet(this, _MaterialGemData_envMap, value, "f");
|
|
170
|
-
}
|
|
171
|
-
// #endregion Public Accessors (10)
|
|
172
|
-
// #region Public Methods (3)
|
|
173
|
-
clone() {
|
|
174
|
-
return new MaterialGemData({
|
|
175
|
-
alphaMap: this.alphaMap,
|
|
176
|
-
alphaCutoff: this.alphaCutoff,
|
|
177
|
-
alphaMode: this.alphaMode,
|
|
178
|
-
aoMap: this.aoMap,
|
|
179
|
-
aoMapIntensity: this.aoMapIntensity,
|
|
180
|
-
bumpMap: this.bumpMap,
|
|
181
|
-
bumpScale: this.bumpScale,
|
|
182
|
-
color: this.color,
|
|
183
|
-
depthTest: this.depthTest,
|
|
184
|
-
depthWrite: this.depthWrite,
|
|
185
|
-
emissiveMap: this.emissiveMap,
|
|
186
|
-
emissiveness: this.emissiveness,
|
|
187
|
-
shading: this.shading,
|
|
188
|
-
map: this.map,
|
|
189
|
-
name: this.name,
|
|
190
|
-
normalMap: this.normalMap,
|
|
191
|
-
normalScale: this.normalScale,
|
|
192
|
-
opacity: this.opacity,
|
|
193
|
-
side: this.side,
|
|
194
|
-
transparent: this.transparent,
|
|
195
|
-
refractionIndex: this.refractionIndex,
|
|
196
|
-
impurityMap: this.impurityMap,
|
|
197
|
-
impurityScale: this.impurityScale,
|
|
198
|
-
colorTransferBegin: this.colorTransferBegin,
|
|
199
|
-
colorTransferEnd: this.colorTransferEnd,
|
|
200
|
-
center: this.center,
|
|
201
|
-
tracingDepth: this.tracingDepth,
|
|
202
|
-
radius: this.radius,
|
|
203
|
-
sphericalNormalMap: this.sphericalNormalMap,
|
|
204
|
-
gamma: this.gamma,
|
|
205
|
-
contrast: this.contrast,
|
|
206
|
-
brightness: this.brightness,
|
|
207
|
-
dispersion: this.dispersion,
|
|
208
|
-
tracingOpacity: this.tracingOpacity,
|
|
209
|
-
envMap: this.envMap,
|
|
210
|
-
}, this.id, this.version);
|
|
211
|
-
}
|
|
212
|
-
copy(source) {
|
|
213
|
-
this.alphaCutoff = source.alphaCutoff;
|
|
214
|
-
this.alphaMap = source.alphaMap;
|
|
215
|
-
this.alphaMode = source.alphaMode;
|
|
216
|
-
this.aoMap = source.aoMap;
|
|
217
|
-
this.aoMapIntensity = source.aoMapIntensity;
|
|
218
|
-
this.bumpMap = source.bumpMap;
|
|
219
|
-
this.bumpScale = source.bumpScale;
|
|
220
|
-
this.color = source.color;
|
|
221
|
-
this.depthTest = source.depthTest;
|
|
222
|
-
this.depthWrite = source.depthWrite;
|
|
223
|
-
this.emissiveMap = source.emissiveMap;
|
|
224
|
-
this.emissiveness = source.emissiveness;
|
|
225
|
-
this.materialOutput = source.materialOutput;
|
|
226
|
-
this.map = source.map;
|
|
227
|
-
this.normalMap = source.normalMap;
|
|
228
|
-
this.normalScale = source.normalScale;
|
|
229
|
-
this.opacity = source.opacity;
|
|
230
|
-
this.shading = source.shading;
|
|
231
|
-
this.side = source.side;
|
|
232
|
-
this.transparent = source.transparent;
|
|
233
|
-
this.refractionIndex = source.refractionIndex;
|
|
234
|
-
this.impurityMap = source.impurityMap;
|
|
235
|
-
this.impurityScale = source.impurityScale;
|
|
236
|
-
this.colorTransferBegin = source.colorTransferBegin;
|
|
237
|
-
this.colorTransferEnd = source.colorTransferEnd;
|
|
238
|
-
this.center = source.center;
|
|
239
|
-
this.tracingDepth = source.tracingDepth;
|
|
240
|
-
this.radius = source.radius;
|
|
241
|
-
this.sphericalNormalMap = source.sphericalNormalMap;
|
|
242
|
-
this.gamma = source.gamma;
|
|
243
|
-
this.contrast = source.contrast;
|
|
244
|
-
this.brightness = source.brightness;
|
|
245
|
-
this.dispersion = source.dispersion;
|
|
246
|
-
this.tracingOpacity = source.tracingOpacity;
|
|
247
|
-
this.envMap = source.envMap;
|
|
248
|
-
}
|
|
249
|
-
reset() {
|
|
250
|
-
this.alphaCutoff = 0;
|
|
251
|
-
this.alphaMap = undefined;
|
|
252
|
-
this.alphaMode = viewer_shared_types_1.MATERIAL_ALPHA.OPAQUE;
|
|
253
|
-
this.aoMap = undefined;
|
|
254
|
-
this.aoMapIntensity = 1.0;
|
|
255
|
-
this.bumpMap = undefined;
|
|
256
|
-
this.bumpScale = 1.0;
|
|
257
|
-
this.color = "#ffffff";
|
|
258
|
-
this.depthTest = undefined;
|
|
259
|
-
this.depthWrite = undefined;
|
|
260
|
-
this.emissiveMap = undefined;
|
|
261
|
-
this.emissiveness = "#000000";
|
|
262
|
-
this.materialOutput = false;
|
|
263
|
-
this.map = undefined;
|
|
264
|
-
this.normalMap = undefined;
|
|
265
|
-
this.normalScale = 1.0;
|
|
266
|
-
this.opacity = 1.0;
|
|
267
|
-
this.shading = viewer_shared_types_1.MATERIAL_SHADING.SMOOTH;
|
|
268
|
-
this.side = viewer_shared_types_1.MATERIAL_SIDE.DOUBLE;
|
|
269
|
-
this.transparent = undefined;
|
|
270
|
-
this.refractionIndex = 2.4;
|
|
271
|
-
this.impurityMap = undefined;
|
|
272
|
-
this.impurityScale = 1.0;
|
|
273
|
-
this.colorTransferBegin = "#ffffff";
|
|
274
|
-
this.colorTransferEnd = "#ffffff";
|
|
275
|
-
this.center = gl_matrix_1.vec3.create();
|
|
276
|
-
this.radius = 1;
|
|
277
|
-
this.sphericalNormalMap = undefined;
|
|
278
|
-
this.gamma = 1;
|
|
279
|
-
this.contrast = 1;
|
|
280
|
-
this.brightness = 0;
|
|
281
|
-
this.dispersion = 0;
|
|
282
|
-
this.tracingDepth = 5;
|
|
283
|
-
this.tracingOpacity = 0;
|
|
284
|
-
this.envMap = undefined;
|
|
285
|
-
}
|
|
286
|
-
}
|
|
287
|
-
exports.MaterialGemData = MaterialGemData;
|
|
288
|
-
_MaterialGemData_refractionIndex = new WeakMap(), _MaterialGemData_impurityMap = new WeakMap(), _MaterialGemData_impurityScale = new WeakMap(), _MaterialGemData_colorTransferBegin = new WeakMap(), _MaterialGemData_colorTransferEnd = new WeakMap(), _MaterialGemData_center = new WeakMap(), _MaterialGemData_radius = new WeakMap(), _MaterialGemData_sphericalNormalMap = new WeakMap(), _MaterialGemData_gamma = new WeakMap(), _MaterialGemData_contrast = new WeakMap(), _MaterialGemData_brightness = new WeakMap(), _MaterialGemData_dispersion = new WeakMap(), _MaterialGemData_tracingDepth = new WeakMap(), _MaterialGemData_tracingOpacity = new WeakMap(), _MaterialGemData_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 _MaterialGemData_refractionIndex, _MaterialGemData_impurityMap, _MaterialGemData_impurityScale, _MaterialGemData_colorTransferBegin, _MaterialGemData_colorTransferEnd, _MaterialGemData_center, _MaterialGemData_radius, _MaterialGemData_sphericalNormalMap, _MaterialGemData_gamma, _MaterialGemData_contrast, _MaterialGemData_brightness, _MaterialGemData_dispersion, _MaterialGemData_tracingDepth, _MaterialGemData_tracingOpacity, _MaterialGemData_envMap;
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.MaterialGemData = void 0;
|
|
16
|
+
const viewer_shared_types_1 = require("@shapediver/viewer.shared.types");
|
|
17
|
+
const gl_matrix_1 = require("gl-matrix");
|
|
18
|
+
const AbstractMaterialData_1 = require("./AbstractMaterialData");
|
|
19
|
+
class MaterialGemData extends AbstractMaterialData_1.AbstractMaterialData {
|
|
20
|
+
// #endregion Properties (5)
|
|
21
|
+
// #region Constructors (1)
|
|
22
|
+
/**
|
|
23
|
+
* Creates a material data object.
|
|
24
|
+
*
|
|
25
|
+
* @param _attributes the attributes of the material
|
|
26
|
+
* @param id the id
|
|
27
|
+
*/
|
|
28
|
+
constructor(properties, id, version) {
|
|
29
|
+
super(properties, id, version);
|
|
30
|
+
// #region Properties (5)
|
|
31
|
+
_MaterialGemData_refractionIndex.set(this, 2.4);
|
|
32
|
+
_MaterialGemData_impurityMap.set(this, void 0);
|
|
33
|
+
_MaterialGemData_impurityScale.set(this, 1.0);
|
|
34
|
+
_MaterialGemData_colorTransferBegin.set(this, "#ffffff");
|
|
35
|
+
_MaterialGemData_colorTransferEnd.set(this, "#ffffff");
|
|
36
|
+
_MaterialGemData_center.set(this, gl_matrix_1.vec3.create());
|
|
37
|
+
_MaterialGemData_radius.set(this, 1);
|
|
38
|
+
_MaterialGemData_sphericalNormalMap.set(this, void 0);
|
|
39
|
+
_MaterialGemData_gamma.set(this, 1);
|
|
40
|
+
_MaterialGemData_contrast.set(this, 1);
|
|
41
|
+
_MaterialGemData_brightness.set(this, 0);
|
|
42
|
+
_MaterialGemData_dispersion.set(this, 0);
|
|
43
|
+
_MaterialGemData_tracingDepth.set(this, 5);
|
|
44
|
+
_MaterialGemData_tracingOpacity.set(this, 0);
|
|
45
|
+
_MaterialGemData_envMap.set(this, void 0);
|
|
46
|
+
if (!properties)
|
|
47
|
+
return;
|
|
48
|
+
if (properties.refractionIndex !== undefined)
|
|
49
|
+
this.refractionIndex = properties.refractionIndex;
|
|
50
|
+
if (properties.impurityMap !== undefined)
|
|
51
|
+
this.impurityMap = properties.impurityMap;
|
|
52
|
+
if (properties.impurityScale !== undefined)
|
|
53
|
+
this.impurityScale = properties.impurityScale;
|
|
54
|
+
if (properties.colorTransferBegin !== undefined)
|
|
55
|
+
this.colorTransferBegin = properties.colorTransferBegin;
|
|
56
|
+
if (properties.colorTransferEnd !== undefined)
|
|
57
|
+
this.colorTransferEnd = properties.colorTransferEnd;
|
|
58
|
+
if (properties.center !== undefined)
|
|
59
|
+
this.center = properties.center;
|
|
60
|
+
if (properties.tracingDepth !== undefined)
|
|
61
|
+
this.tracingDepth = properties.tracingDepth;
|
|
62
|
+
if (properties.radius !== undefined)
|
|
63
|
+
this.radius = properties.radius;
|
|
64
|
+
if (properties.sphericalNormalMap !== undefined)
|
|
65
|
+
this.sphericalNormalMap = properties.sphericalNormalMap;
|
|
66
|
+
if (properties.gamma !== undefined)
|
|
67
|
+
this.gamma = properties.gamma;
|
|
68
|
+
if (properties.contrast !== undefined)
|
|
69
|
+
this.contrast = properties.contrast;
|
|
70
|
+
if (properties.brightness !== undefined)
|
|
71
|
+
this.brightness = properties.brightness;
|
|
72
|
+
if (properties.dispersion !== undefined)
|
|
73
|
+
this.dispersion = properties.dispersion;
|
|
74
|
+
if (properties.tracingOpacity !== undefined)
|
|
75
|
+
this.tracingOpacity = properties.tracingOpacity;
|
|
76
|
+
if (properties.envMap !== undefined)
|
|
77
|
+
this.envMap = properties.envMap;
|
|
78
|
+
}
|
|
79
|
+
// #endregion Constructors (1)
|
|
80
|
+
// #region Public Accessors (10)
|
|
81
|
+
get refractionIndex() {
|
|
82
|
+
return __classPrivateFieldGet(this, _MaterialGemData_refractionIndex, "f");
|
|
83
|
+
}
|
|
84
|
+
set refractionIndex(value) {
|
|
85
|
+
__classPrivateFieldSet(this, _MaterialGemData_refractionIndex, value, "f");
|
|
86
|
+
}
|
|
87
|
+
get impurityMap() {
|
|
88
|
+
return __classPrivateFieldGet(this, _MaterialGemData_impurityMap, "f");
|
|
89
|
+
}
|
|
90
|
+
set impurityMap(value) {
|
|
91
|
+
__classPrivateFieldSet(this, _MaterialGemData_impurityMap, value, "f");
|
|
92
|
+
}
|
|
93
|
+
get impurityScale() {
|
|
94
|
+
return __classPrivateFieldGet(this, _MaterialGemData_impurityScale, "f");
|
|
95
|
+
}
|
|
96
|
+
set impurityScale(value) {
|
|
97
|
+
__classPrivateFieldSet(this, _MaterialGemData_impurityScale, value, "f");
|
|
98
|
+
}
|
|
99
|
+
get colorTransferBegin() {
|
|
100
|
+
return __classPrivateFieldGet(this, _MaterialGemData_colorTransferBegin, "f");
|
|
101
|
+
}
|
|
102
|
+
set colorTransferBegin(value) {
|
|
103
|
+
__classPrivateFieldSet(this, _MaterialGemData_colorTransferBegin, value, "f");
|
|
104
|
+
}
|
|
105
|
+
get colorTransferEnd() {
|
|
106
|
+
return __classPrivateFieldGet(this, _MaterialGemData_colorTransferEnd, "f");
|
|
107
|
+
}
|
|
108
|
+
set colorTransferEnd(value) {
|
|
109
|
+
__classPrivateFieldSet(this, _MaterialGemData_colorTransferEnd, value, "f");
|
|
110
|
+
}
|
|
111
|
+
get center() {
|
|
112
|
+
return __classPrivateFieldGet(this, _MaterialGemData_center, "f");
|
|
113
|
+
}
|
|
114
|
+
set center(value) {
|
|
115
|
+
__classPrivateFieldSet(this, _MaterialGemData_center, value, "f");
|
|
116
|
+
}
|
|
117
|
+
get tracingDepth() {
|
|
118
|
+
return __classPrivateFieldGet(this, _MaterialGemData_tracingDepth, "f");
|
|
119
|
+
}
|
|
120
|
+
set tracingDepth(value) {
|
|
121
|
+
__classPrivateFieldSet(this, _MaterialGemData_tracingDepth, value, "f");
|
|
122
|
+
}
|
|
123
|
+
get radius() {
|
|
124
|
+
return __classPrivateFieldGet(this, _MaterialGemData_radius, "f");
|
|
125
|
+
}
|
|
126
|
+
set radius(value) {
|
|
127
|
+
__classPrivateFieldSet(this, _MaterialGemData_radius, value, "f");
|
|
128
|
+
}
|
|
129
|
+
get sphericalNormalMap() {
|
|
130
|
+
return __classPrivateFieldGet(this, _MaterialGemData_sphericalNormalMap, "f");
|
|
131
|
+
}
|
|
132
|
+
set sphericalNormalMap(value) {
|
|
133
|
+
__classPrivateFieldSet(this, _MaterialGemData_sphericalNormalMap, value, "f");
|
|
134
|
+
}
|
|
135
|
+
get gamma() {
|
|
136
|
+
return __classPrivateFieldGet(this, _MaterialGemData_gamma, "f");
|
|
137
|
+
}
|
|
138
|
+
set gamma(value) {
|
|
139
|
+
__classPrivateFieldSet(this, _MaterialGemData_gamma, value, "f");
|
|
140
|
+
}
|
|
141
|
+
get contrast() {
|
|
142
|
+
return __classPrivateFieldGet(this, _MaterialGemData_contrast, "f");
|
|
143
|
+
}
|
|
144
|
+
set contrast(value) {
|
|
145
|
+
__classPrivateFieldSet(this, _MaterialGemData_contrast, value, "f");
|
|
146
|
+
}
|
|
147
|
+
get brightness() {
|
|
148
|
+
return __classPrivateFieldGet(this, _MaterialGemData_brightness, "f");
|
|
149
|
+
}
|
|
150
|
+
set brightness(value) {
|
|
151
|
+
__classPrivateFieldSet(this, _MaterialGemData_brightness, value, "f");
|
|
152
|
+
}
|
|
153
|
+
get dispersion() {
|
|
154
|
+
return __classPrivateFieldGet(this, _MaterialGemData_dispersion, "f");
|
|
155
|
+
}
|
|
156
|
+
set dispersion(value) {
|
|
157
|
+
__classPrivateFieldSet(this, _MaterialGemData_dispersion, value, "f");
|
|
158
|
+
}
|
|
159
|
+
get tracingOpacity() {
|
|
160
|
+
return __classPrivateFieldGet(this, _MaterialGemData_tracingOpacity, "f");
|
|
161
|
+
}
|
|
162
|
+
set tracingOpacity(value) {
|
|
163
|
+
__classPrivateFieldSet(this, _MaterialGemData_tracingOpacity, value, "f");
|
|
164
|
+
}
|
|
165
|
+
get envMap() {
|
|
166
|
+
return __classPrivateFieldGet(this, _MaterialGemData_envMap, "f");
|
|
167
|
+
}
|
|
168
|
+
set envMap(value) {
|
|
169
|
+
__classPrivateFieldSet(this, _MaterialGemData_envMap, value, "f");
|
|
170
|
+
}
|
|
171
|
+
// #endregion Public Accessors (10)
|
|
172
|
+
// #region Public Methods (3)
|
|
173
|
+
clone() {
|
|
174
|
+
return new MaterialGemData({
|
|
175
|
+
alphaMap: this.alphaMap,
|
|
176
|
+
alphaCutoff: this.alphaCutoff,
|
|
177
|
+
alphaMode: this.alphaMode,
|
|
178
|
+
aoMap: this.aoMap,
|
|
179
|
+
aoMapIntensity: this.aoMapIntensity,
|
|
180
|
+
bumpMap: this.bumpMap,
|
|
181
|
+
bumpScale: this.bumpScale,
|
|
182
|
+
color: this.color,
|
|
183
|
+
depthTest: this.depthTest,
|
|
184
|
+
depthWrite: this.depthWrite,
|
|
185
|
+
emissiveMap: this.emissiveMap,
|
|
186
|
+
emissiveness: this.emissiveness,
|
|
187
|
+
shading: this.shading,
|
|
188
|
+
map: this.map,
|
|
189
|
+
name: this.name,
|
|
190
|
+
normalMap: this.normalMap,
|
|
191
|
+
normalScale: this.normalScale,
|
|
192
|
+
opacity: this.opacity,
|
|
193
|
+
side: this.side,
|
|
194
|
+
transparent: this.transparent,
|
|
195
|
+
refractionIndex: this.refractionIndex,
|
|
196
|
+
impurityMap: this.impurityMap,
|
|
197
|
+
impurityScale: this.impurityScale,
|
|
198
|
+
colorTransferBegin: this.colorTransferBegin,
|
|
199
|
+
colorTransferEnd: this.colorTransferEnd,
|
|
200
|
+
center: this.center,
|
|
201
|
+
tracingDepth: this.tracingDepth,
|
|
202
|
+
radius: this.radius,
|
|
203
|
+
sphericalNormalMap: this.sphericalNormalMap,
|
|
204
|
+
gamma: this.gamma,
|
|
205
|
+
contrast: this.contrast,
|
|
206
|
+
brightness: this.brightness,
|
|
207
|
+
dispersion: this.dispersion,
|
|
208
|
+
tracingOpacity: this.tracingOpacity,
|
|
209
|
+
envMap: this.envMap,
|
|
210
|
+
}, this.id, this.version);
|
|
211
|
+
}
|
|
212
|
+
copy(source) {
|
|
213
|
+
this.alphaCutoff = source.alphaCutoff;
|
|
214
|
+
this.alphaMap = source.alphaMap;
|
|
215
|
+
this.alphaMode = source.alphaMode;
|
|
216
|
+
this.aoMap = source.aoMap;
|
|
217
|
+
this.aoMapIntensity = source.aoMapIntensity;
|
|
218
|
+
this.bumpMap = source.bumpMap;
|
|
219
|
+
this.bumpScale = source.bumpScale;
|
|
220
|
+
this.color = source.color;
|
|
221
|
+
this.depthTest = source.depthTest;
|
|
222
|
+
this.depthWrite = source.depthWrite;
|
|
223
|
+
this.emissiveMap = source.emissiveMap;
|
|
224
|
+
this.emissiveness = source.emissiveness;
|
|
225
|
+
this.materialOutput = source.materialOutput;
|
|
226
|
+
this.map = source.map;
|
|
227
|
+
this.normalMap = source.normalMap;
|
|
228
|
+
this.normalScale = source.normalScale;
|
|
229
|
+
this.opacity = source.opacity;
|
|
230
|
+
this.shading = source.shading;
|
|
231
|
+
this.side = source.side;
|
|
232
|
+
this.transparent = source.transparent;
|
|
233
|
+
this.refractionIndex = source.refractionIndex;
|
|
234
|
+
this.impurityMap = source.impurityMap;
|
|
235
|
+
this.impurityScale = source.impurityScale;
|
|
236
|
+
this.colorTransferBegin = source.colorTransferBegin;
|
|
237
|
+
this.colorTransferEnd = source.colorTransferEnd;
|
|
238
|
+
this.center = source.center;
|
|
239
|
+
this.tracingDepth = source.tracingDepth;
|
|
240
|
+
this.radius = source.radius;
|
|
241
|
+
this.sphericalNormalMap = source.sphericalNormalMap;
|
|
242
|
+
this.gamma = source.gamma;
|
|
243
|
+
this.contrast = source.contrast;
|
|
244
|
+
this.brightness = source.brightness;
|
|
245
|
+
this.dispersion = source.dispersion;
|
|
246
|
+
this.tracingOpacity = source.tracingOpacity;
|
|
247
|
+
this.envMap = source.envMap;
|
|
248
|
+
}
|
|
249
|
+
reset() {
|
|
250
|
+
this.alphaCutoff = 0;
|
|
251
|
+
this.alphaMap = undefined;
|
|
252
|
+
this.alphaMode = viewer_shared_types_1.MATERIAL_ALPHA.OPAQUE;
|
|
253
|
+
this.aoMap = undefined;
|
|
254
|
+
this.aoMapIntensity = 1.0;
|
|
255
|
+
this.bumpMap = undefined;
|
|
256
|
+
this.bumpScale = 1.0;
|
|
257
|
+
this.color = "#ffffff";
|
|
258
|
+
this.depthTest = undefined;
|
|
259
|
+
this.depthWrite = undefined;
|
|
260
|
+
this.emissiveMap = undefined;
|
|
261
|
+
this.emissiveness = "#000000";
|
|
262
|
+
this.materialOutput = false;
|
|
263
|
+
this.map = undefined;
|
|
264
|
+
this.normalMap = undefined;
|
|
265
|
+
this.normalScale = 1.0;
|
|
266
|
+
this.opacity = 1.0;
|
|
267
|
+
this.shading = viewer_shared_types_1.MATERIAL_SHADING.SMOOTH;
|
|
268
|
+
this.side = viewer_shared_types_1.MATERIAL_SIDE.DOUBLE;
|
|
269
|
+
this.transparent = undefined;
|
|
270
|
+
this.refractionIndex = 2.4;
|
|
271
|
+
this.impurityMap = undefined;
|
|
272
|
+
this.impurityScale = 1.0;
|
|
273
|
+
this.colorTransferBegin = "#ffffff";
|
|
274
|
+
this.colorTransferEnd = "#ffffff";
|
|
275
|
+
this.center = gl_matrix_1.vec3.create();
|
|
276
|
+
this.radius = 1;
|
|
277
|
+
this.sphericalNormalMap = undefined;
|
|
278
|
+
this.gamma = 1;
|
|
279
|
+
this.contrast = 1;
|
|
280
|
+
this.brightness = 0;
|
|
281
|
+
this.dispersion = 0;
|
|
282
|
+
this.tracingDepth = 5;
|
|
283
|
+
this.tracingOpacity = 0;
|
|
284
|
+
this.envMap = undefined;
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
exports.MaterialGemData = MaterialGemData;
|
|
288
|
+
_MaterialGemData_refractionIndex = new WeakMap(), _MaterialGemData_impurityMap = new WeakMap(), _MaterialGemData_impurityScale = new WeakMap(), _MaterialGemData_colorTransferBegin = new WeakMap(), _MaterialGemData_colorTransferEnd = new WeakMap(), _MaterialGemData_center = new WeakMap(), _MaterialGemData_radius = new WeakMap(), _MaterialGemData_sphericalNormalMap = new WeakMap(), _MaterialGemData_gamma = new WeakMap(), _MaterialGemData_contrast = new WeakMap(), _MaterialGemData_brightness = new WeakMap(), _MaterialGemData_dispersion = new WeakMap(), _MaterialGemData_tracingDepth = new WeakMap(), _MaterialGemData_tracingOpacity = new WeakMap(), _MaterialGemData_envMap = new WeakMap();
|
|
289
289
|
//# sourceMappingURL=MaterialGemData.js.map
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { IMapData, IMaterialLambertData, IMaterialLambertDataProperties } from "@shapediver/viewer.shared.types";
|
|
2
|
-
import { AbstractMaterialData } from "./AbstractMaterialData";
|
|
3
|
-
export declare class MaterialLambertData extends AbstractMaterialData implements IMaterialLambertData {
|
|
4
|
-
#private;
|
|
5
|
-
constructor(properties?: IMaterialLambertDataProperties, id?: string, version?: string);
|
|
6
|
-
get displacementBias(): number;
|
|
7
|
-
set displacementBias(value: number);
|
|
8
|
-
get displacementMap(): IMapData | undefined;
|
|
9
|
-
set displacementMap(value: IMapData | undefined);
|
|
10
|
-
get displacementScale(): number;
|
|
11
|
-
set displacementScale(value: number);
|
|
12
|
-
get specularMap(): IMapData | undefined;
|
|
13
|
-
set specularMap(value: IMapData | undefined);
|
|
14
|
-
get envMap(): string | string[] | undefined;
|
|
15
|
-
set envMap(value: string | string[] | undefined);
|
|
16
|
-
get reflectivity(): number;
|
|
17
|
-
set reflectivity(value: number);
|
|
18
|
-
clone(): IMaterialLambertData;
|
|
19
|
-
copy(source: IMaterialLambertData): void;
|
|
20
|
-
reset(): void;
|
|
21
|
-
}
|
|
1
|
+
import { IMapData, IMaterialLambertData, IMaterialLambertDataProperties } from "@shapediver/viewer.shared.types";
|
|
2
|
+
import { AbstractMaterialData } from "./AbstractMaterialData";
|
|
3
|
+
export declare class MaterialLambertData extends AbstractMaterialData implements IMaterialLambertData {
|
|
4
|
+
#private;
|
|
5
|
+
constructor(properties?: IMaterialLambertDataProperties, id?: string, version?: string);
|
|
6
|
+
get displacementBias(): number;
|
|
7
|
+
set displacementBias(value: number);
|
|
8
|
+
get displacementMap(): IMapData | undefined;
|
|
9
|
+
set displacementMap(value: IMapData | undefined);
|
|
10
|
+
get displacementScale(): number;
|
|
11
|
+
set displacementScale(value: number);
|
|
12
|
+
get specularMap(): IMapData | undefined;
|
|
13
|
+
set specularMap(value: IMapData | undefined);
|
|
14
|
+
get envMap(): string | string[] | undefined;
|
|
15
|
+
set envMap(value: string | string[] | undefined);
|
|
16
|
+
get reflectivity(): number;
|
|
17
|
+
set reflectivity(value: number);
|
|
18
|
+
clone(): IMaterialLambertData;
|
|
19
|
+
copy(source: IMaterialLambertData): void;
|
|
20
|
+
reset(): void;
|
|
21
|
+
}
|
|
22
22
|
//# sourceMappingURL=MaterialLambertData.d.ts.map
|