@shapediver/viewer.shared.types 2.2.4 → 2.3.1
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/material/MaterialGemData.d.ts +50 -0
- package/dist/implementation/material/MaterialGemData.d.ts.map +1 -0
- package/dist/implementation/material/MaterialGemData.js +292 -0
- package/dist/implementation/material/MaterialGemData.js.map +1 -0
- package/dist/implementation/material/MaterialShadowData.d.ts +15 -0
- package/dist/implementation/material/MaterialShadowData.d.ts.map +1 -0
- package/dist/implementation/material/MaterialShadowData.js +36 -0
- package/dist/implementation/material/MaterialShadowData.js.map +1 -0
- package/dist/index.d.ts +5 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -1
- package/dist/index.js.map +1 -1
- package/dist/interfaces/data/material/IMaterialGemDataProperties.d.ts +42 -0
- package/dist/interfaces/data/material/IMaterialGemDataProperties.d.ts.map +1 -0
- package/dist/interfaces/data/material/IMaterialGemDataProperties.js +4 -0
- package/dist/interfaces/data/material/IMaterialGemDataProperties.js.map +1 -0
- package/dist/interfaces/data/material/IMaterialShadowData.d.ts +8 -0
- package/dist/interfaces/data/material/IMaterialShadowData.d.ts.map +1 -0
- package/dist/interfaces/data/material/IMaterialShadowData.js +4 -0
- package/dist/interfaces/data/material/IMaterialShadowData.js.map +1 -0
- package/package.json +5 -5
- package/src/implementation/material/MaterialGemData.ts +312 -0
- package/src/implementation/material/MaterialShadowData.ts +44 -0
- package/src/index.ts +6 -0
- package/src/interfaces/data/material/IMaterialGemDataProperties.ts +52 -0
- package/src/interfaces/data/material/IMaterialShadowData.ts +13 -0
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { AbstractMaterialData } from './AbstractMaterialData';
|
|
2
|
+
import { IMaterialGemData, IMaterialGemDataProperties } from '../../interfaces/data/material/IMaterialGemDataProperties';
|
|
3
|
+
import { IMapData } from '../../interfaces/data/material/IMapData';
|
|
4
|
+
import { mat3, mat4, vec3 } from 'gl-matrix';
|
|
5
|
+
export declare class MaterialGemData extends AbstractMaterialData implements IMaterialGemData {
|
|
6
|
+
#private;
|
|
7
|
+
/**
|
|
8
|
+
* Creates a material data object.
|
|
9
|
+
*
|
|
10
|
+
* @param _attributes the attributes of the material
|
|
11
|
+
* @param id the id
|
|
12
|
+
*/
|
|
13
|
+
constructor(properties?: IMaterialGemDataProperties, id?: string);
|
|
14
|
+
get refractionIndex(): number;
|
|
15
|
+
set refractionIndex(value: number);
|
|
16
|
+
get impurityMap(): IMapData | undefined;
|
|
17
|
+
set impurityMap(value: IMapData | undefined);
|
|
18
|
+
get impurityScale(): number;
|
|
19
|
+
set impurityScale(value: number);
|
|
20
|
+
get colorTransferBegin(): string;
|
|
21
|
+
set colorTransferBegin(value: string);
|
|
22
|
+
get colorTransferEnd(): string;
|
|
23
|
+
set colorTransferEnd(value: string);
|
|
24
|
+
get center(): vec3;
|
|
25
|
+
set center(value: vec3);
|
|
26
|
+
get tracingDepth(): number;
|
|
27
|
+
set tracingDepth(value: number);
|
|
28
|
+
get radius(): number;
|
|
29
|
+
set radius(value: number);
|
|
30
|
+
get sphericalNormalMap(): IMapData | undefined;
|
|
31
|
+
set sphericalNormalMap(value: IMapData | undefined);
|
|
32
|
+
get gamma(): number;
|
|
33
|
+
set gamma(value: number);
|
|
34
|
+
get contrast(): number;
|
|
35
|
+
set contrast(value: number);
|
|
36
|
+
get brightness(): number;
|
|
37
|
+
set brightness(value: number);
|
|
38
|
+
get dispersion(): number;
|
|
39
|
+
set dispersion(value: number);
|
|
40
|
+
get tracingOpacity(): number;
|
|
41
|
+
set tracingOpacity(value: number);
|
|
42
|
+
get inverseModelMatrix(): mat4;
|
|
43
|
+
set inverseModelMatrix(value: mat4);
|
|
44
|
+
get inverseTransposeModelMatrix(): mat3;
|
|
45
|
+
set inverseTransposeModelMatrix(value: mat3);
|
|
46
|
+
clone(): IMaterialGemData;
|
|
47
|
+
copy(source: MaterialGemData): void;
|
|
48
|
+
reset(): void;
|
|
49
|
+
}
|
|
50
|
+
//# sourceMappingURL=MaterialGemData.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MaterialGemData.d.ts","sourceRoot":"","sources":["../../../src/implementation/material/MaterialGemData.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,gBAAgB,EAAE,0BAA0B,EAAE,MAAM,2DAA2D,CAAC;AAEzH,OAAO,EAAE,QAAQ,EAAE,MAAM,yCAAyC,CAAC;AACnE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAE7C,qBAAa,eAAgB,SAAQ,oBAAqB,YAAW,gBAAgB;;IAyBjF;;;;;OAKG;gBAEC,UAAU,CAAC,EAAE,0BAA0B,EACvC,EAAE,CAAC,EAAE,MAAM;IA2Bf,IAAW,eAAe,IAAI,MAAM,CAEnC;IAED,IAAW,eAAe,CAAC,KAAK,EAAE,MAAM,EAEvC;IAED,IAAW,WAAW,IAAI,QAAQ,GAAG,SAAS,CAE7C;IAED,IAAW,WAAW,CAAC,KAAK,EAAE,QAAQ,GAAG,SAAS,EAEjD;IAED,IAAW,aAAa,IAAI,MAAM,CAEjC;IAED,IAAW,aAAa,CAAC,KAAK,EAAE,MAAM,EAErC;IAED,IAAW,kBAAkB,IAAI,MAAM,CAEtC;IAED,IAAW,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAE1C;IAED,IAAW,gBAAgB,IAAI,MAAM,CAEpC;IAED,IAAW,gBAAgB,CAAC,KAAK,EAAE,MAAM,EAExC;IAED,IAAW,MAAM,IAAI,IAAI,CAExB;IAED,IAAW,MAAM,CAAC,KAAK,EAAE,IAAI,EAE5B;IAED,IAAW,YAAY,IAAI,MAAM,CAEhC;IAED,IAAW,YAAY,CAAC,KAAK,EAAE,MAAM,EAEpC;IAED,IAAW,MAAM,IAAI,MAAM,CAE1B;IAED,IAAW,MAAM,CAAC,KAAK,EAAE,MAAM,EAE9B;IAED,IAAW,kBAAkB,IAAI,QAAQ,GAAG,SAAS,CAEpD;IAED,IAAW,kBAAkB,CAAC,KAAK,EAAE,QAAQ,GAAG,SAAS,EAExD;IAED,IAAW,KAAK,IAAI,MAAM,CAEzB;IAED,IAAW,KAAK,CAAC,KAAK,EAAE,MAAM,EAE7B;IAED,IAAW,QAAQ,IAAI,MAAM,CAE5B;IAED,IAAW,QAAQ,CAAC,KAAK,EAAE,MAAM,EAEhC;IAED,IAAW,UAAU,IAAI,MAAM,CAE9B;IAED,IAAW,UAAU,CAAC,KAAK,EAAE,MAAM,EAElC;IAED,IAAW,UAAU,IAAI,MAAM,CAE9B;IAED,IAAW,UAAU,CAAC,KAAK,EAAE,MAAM,EAElC;IAED,IAAW,cAAc,IAAI,MAAM,CAElC;IAED,IAAW,cAAc,CAAC,KAAK,EAAE,MAAM,EAEtC;IAED,IAAW,kBAAkB,IAAI,IAAI,CAEpC;IAED,IAAW,kBAAkB,CAAC,KAAK,EAAE,IAAI,EAExC;IAED,IAAW,2BAA2B,IAAI,IAAI,CAE7C;IAED,IAAW,2BAA2B,CAAC,KAAK,EAAE,IAAI,EAEjD;IAMM,KAAK,IAAI,gBAAgB;IAsCzB,IAAI,CAAC,MAAM,EAAE,eAAe,GAAG,IAAI;IAqCnC,KAAK,IAAI,IAAI;CAsCvB"}
|
|
@@ -0,0 +1,292 @@
|
|
|
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_inverseModelMatrix, _MaterialGemData_inverseTransposeModelMatrix;
|
|
14
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
|
+
exports.MaterialGemData = void 0;
|
|
16
|
+
const AbstractMaterialData_1 = require("./AbstractMaterialData");
|
|
17
|
+
const IMaterialAbstractData_1 = require("../../interfaces/data/material/IMaterialAbstractData");
|
|
18
|
+
const gl_matrix_1 = require("gl-matrix");
|
|
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) {
|
|
29
|
+
super(properties, id);
|
|
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_inverseModelMatrix.set(this, gl_matrix_1.mat4.create());
|
|
46
|
+
_MaterialGemData_inverseTransposeModelMatrix.set(this, gl_matrix_1.mat3.create());
|
|
47
|
+
if (!properties)
|
|
48
|
+
return;
|
|
49
|
+
if (properties.refractionIndex !== undefined)
|
|
50
|
+
this.refractionIndex = properties.refractionIndex;
|
|
51
|
+
if (properties.impurityMap !== undefined)
|
|
52
|
+
this.impurityMap = properties.impurityMap;
|
|
53
|
+
if (properties.impurityScale !== undefined)
|
|
54
|
+
this.impurityScale = properties.impurityScale;
|
|
55
|
+
if (properties.colorTransferBegin !== undefined)
|
|
56
|
+
this.colorTransferBegin = properties.colorTransferBegin;
|
|
57
|
+
if (properties.colorTransferEnd !== undefined)
|
|
58
|
+
this.colorTransferEnd = properties.colorTransferEnd;
|
|
59
|
+
if (properties.center !== undefined)
|
|
60
|
+
this.center = properties.center;
|
|
61
|
+
if (properties.tracingDepth !== undefined)
|
|
62
|
+
this.tracingDepth = properties.tracingDepth;
|
|
63
|
+
if (properties.radius !== undefined)
|
|
64
|
+
this.radius = properties.radius;
|
|
65
|
+
if (properties.sphericalNormalMap !== undefined)
|
|
66
|
+
this.sphericalNormalMap = properties.sphericalNormalMap;
|
|
67
|
+
if (properties.gamma !== undefined)
|
|
68
|
+
this.gamma = properties.gamma;
|
|
69
|
+
if (properties.contrast !== undefined)
|
|
70
|
+
this.contrast = properties.contrast;
|
|
71
|
+
if (properties.brightness !== undefined)
|
|
72
|
+
this.brightness = properties.brightness;
|
|
73
|
+
if (properties.dispersion !== undefined)
|
|
74
|
+
this.dispersion = properties.dispersion;
|
|
75
|
+
if (properties.tracingOpacity !== undefined)
|
|
76
|
+
this.tracingOpacity = properties.tracingOpacity;
|
|
77
|
+
if (properties.inverseModelMatrix !== undefined)
|
|
78
|
+
this.inverseModelMatrix = properties.inverseModelMatrix;
|
|
79
|
+
if (properties.inverseTransposeModelMatrix !== undefined)
|
|
80
|
+
this.inverseTransposeModelMatrix = properties.inverseTransposeModelMatrix;
|
|
81
|
+
}
|
|
82
|
+
// #endregion Constructors (1)
|
|
83
|
+
// #region Public Accessors (10)
|
|
84
|
+
get refractionIndex() {
|
|
85
|
+
return __classPrivateFieldGet(this, _MaterialGemData_refractionIndex, "f");
|
|
86
|
+
}
|
|
87
|
+
set refractionIndex(value) {
|
|
88
|
+
__classPrivateFieldSet(this, _MaterialGemData_refractionIndex, value, "f");
|
|
89
|
+
}
|
|
90
|
+
get impurityMap() {
|
|
91
|
+
return __classPrivateFieldGet(this, _MaterialGemData_impurityMap, "f");
|
|
92
|
+
}
|
|
93
|
+
set impurityMap(value) {
|
|
94
|
+
__classPrivateFieldSet(this, _MaterialGemData_impurityMap, value, "f");
|
|
95
|
+
}
|
|
96
|
+
get impurityScale() {
|
|
97
|
+
return __classPrivateFieldGet(this, _MaterialGemData_impurityScale, "f");
|
|
98
|
+
}
|
|
99
|
+
set impurityScale(value) {
|
|
100
|
+
__classPrivateFieldSet(this, _MaterialGemData_impurityScale, value, "f");
|
|
101
|
+
}
|
|
102
|
+
get colorTransferBegin() {
|
|
103
|
+
return __classPrivateFieldGet(this, _MaterialGemData_colorTransferBegin, "f");
|
|
104
|
+
}
|
|
105
|
+
set colorTransferBegin(value) {
|
|
106
|
+
__classPrivateFieldSet(this, _MaterialGemData_colorTransferBegin, value, "f");
|
|
107
|
+
}
|
|
108
|
+
get colorTransferEnd() {
|
|
109
|
+
return __classPrivateFieldGet(this, _MaterialGemData_colorTransferEnd, "f");
|
|
110
|
+
}
|
|
111
|
+
set colorTransferEnd(value) {
|
|
112
|
+
__classPrivateFieldSet(this, _MaterialGemData_colorTransferEnd, value, "f");
|
|
113
|
+
}
|
|
114
|
+
get center() {
|
|
115
|
+
return __classPrivateFieldGet(this, _MaterialGemData_center, "f");
|
|
116
|
+
}
|
|
117
|
+
set center(value) {
|
|
118
|
+
__classPrivateFieldSet(this, _MaterialGemData_center, value, "f");
|
|
119
|
+
}
|
|
120
|
+
get tracingDepth() {
|
|
121
|
+
return __classPrivateFieldGet(this, _MaterialGemData_tracingDepth, "f");
|
|
122
|
+
}
|
|
123
|
+
set tracingDepth(value) {
|
|
124
|
+
__classPrivateFieldSet(this, _MaterialGemData_tracingDepth, value, "f");
|
|
125
|
+
}
|
|
126
|
+
get radius() {
|
|
127
|
+
return __classPrivateFieldGet(this, _MaterialGemData_radius, "f");
|
|
128
|
+
}
|
|
129
|
+
set radius(value) {
|
|
130
|
+
__classPrivateFieldSet(this, _MaterialGemData_radius, value, "f");
|
|
131
|
+
}
|
|
132
|
+
get sphericalNormalMap() {
|
|
133
|
+
return __classPrivateFieldGet(this, _MaterialGemData_sphericalNormalMap, "f");
|
|
134
|
+
}
|
|
135
|
+
set sphericalNormalMap(value) {
|
|
136
|
+
__classPrivateFieldSet(this, _MaterialGemData_sphericalNormalMap, value, "f");
|
|
137
|
+
}
|
|
138
|
+
get gamma() {
|
|
139
|
+
return __classPrivateFieldGet(this, _MaterialGemData_gamma, "f");
|
|
140
|
+
}
|
|
141
|
+
set gamma(value) {
|
|
142
|
+
__classPrivateFieldSet(this, _MaterialGemData_gamma, value, "f");
|
|
143
|
+
}
|
|
144
|
+
get contrast() {
|
|
145
|
+
return __classPrivateFieldGet(this, _MaterialGemData_contrast, "f");
|
|
146
|
+
}
|
|
147
|
+
set contrast(value) {
|
|
148
|
+
__classPrivateFieldSet(this, _MaterialGemData_contrast, value, "f");
|
|
149
|
+
}
|
|
150
|
+
get brightness() {
|
|
151
|
+
return __classPrivateFieldGet(this, _MaterialGemData_brightness, "f");
|
|
152
|
+
}
|
|
153
|
+
set brightness(value) {
|
|
154
|
+
__classPrivateFieldSet(this, _MaterialGemData_brightness, value, "f");
|
|
155
|
+
}
|
|
156
|
+
get dispersion() {
|
|
157
|
+
return __classPrivateFieldGet(this, _MaterialGemData_dispersion, "f");
|
|
158
|
+
}
|
|
159
|
+
set dispersion(value) {
|
|
160
|
+
__classPrivateFieldSet(this, _MaterialGemData_dispersion, value, "f");
|
|
161
|
+
}
|
|
162
|
+
get tracingOpacity() {
|
|
163
|
+
return __classPrivateFieldGet(this, _MaterialGemData_tracingOpacity, "f");
|
|
164
|
+
}
|
|
165
|
+
set tracingOpacity(value) {
|
|
166
|
+
__classPrivateFieldSet(this, _MaterialGemData_tracingOpacity, value, "f");
|
|
167
|
+
}
|
|
168
|
+
get inverseModelMatrix() {
|
|
169
|
+
return __classPrivateFieldGet(this, _MaterialGemData_inverseModelMatrix, "f");
|
|
170
|
+
}
|
|
171
|
+
set inverseModelMatrix(value) {
|
|
172
|
+
__classPrivateFieldSet(this, _MaterialGemData_inverseModelMatrix, value, "f");
|
|
173
|
+
}
|
|
174
|
+
get inverseTransposeModelMatrix() {
|
|
175
|
+
return __classPrivateFieldGet(this, _MaterialGemData_inverseTransposeModelMatrix, "f");
|
|
176
|
+
}
|
|
177
|
+
set inverseTransposeModelMatrix(value) {
|
|
178
|
+
__classPrivateFieldSet(this, _MaterialGemData_inverseTransposeModelMatrix, value, "f");
|
|
179
|
+
}
|
|
180
|
+
// #endregion Public Accessors (10)
|
|
181
|
+
// #region Public Methods (3)
|
|
182
|
+
clone() {
|
|
183
|
+
return new MaterialGemData({
|
|
184
|
+
alphaMap: this.alphaMap,
|
|
185
|
+
alphaCutoff: this.alphaCutoff,
|
|
186
|
+
alphaMode: this.alphaMode,
|
|
187
|
+
aoMap: this.aoMap,
|
|
188
|
+
aoMapIntensity: this.aoMapIntensity,
|
|
189
|
+
bumpMap: this.bumpMap,
|
|
190
|
+
bumpScale: this.bumpScale,
|
|
191
|
+
color: this.color,
|
|
192
|
+
emissiveMap: this.emissiveMap,
|
|
193
|
+
emissiveness: this.emissiveness,
|
|
194
|
+
shading: this.shading,
|
|
195
|
+
map: this.map,
|
|
196
|
+
name: this.name,
|
|
197
|
+
normalMap: this.normalMap,
|
|
198
|
+
normalScale: this.normalScale,
|
|
199
|
+
opacity: this.opacity,
|
|
200
|
+
side: this.side,
|
|
201
|
+
refractionIndex: this.refractionIndex,
|
|
202
|
+
impurityMap: this.impurityMap,
|
|
203
|
+
impurityScale: this.impurityScale,
|
|
204
|
+
colorTransferBegin: this.colorTransferBegin,
|
|
205
|
+
colorTransferEnd: this.colorTransferEnd,
|
|
206
|
+
center: this.center,
|
|
207
|
+
tracingDepth: this.tracingDepth,
|
|
208
|
+
radius: this.radius,
|
|
209
|
+
sphericalNormalMap: this.sphericalNormalMap,
|
|
210
|
+
gamma: this.gamma,
|
|
211
|
+
contrast: this.contrast,
|
|
212
|
+
brightness: this.brightness,
|
|
213
|
+
dispersion: this.dispersion,
|
|
214
|
+
tracingOpacity: this.tracingOpacity,
|
|
215
|
+
inverseModelMatrix: this.inverseModelMatrix,
|
|
216
|
+
inverseTransposeModelMatrix: this.inverseTransposeModelMatrix,
|
|
217
|
+
}, this.id);
|
|
218
|
+
}
|
|
219
|
+
copy(source) {
|
|
220
|
+
this.alphaCutoff = source.alphaCutoff;
|
|
221
|
+
this.alphaMap = source.alphaMap;
|
|
222
|
+
this.alphaMode = source.alphaMode;
|
|
223
|
+
this.aoMap = source.aoMap;
|
|
224
|
+
this.aoMapIntensity = source.aoMapIntensity;
|
|
225
|
+
this.bumpMap = source.bumpMap;
|
|
226
|
+
this.bumpScale = source.bumpScale;
|
|
227
|
+
this.color = source.color;
|
|
228
|
+
this.emissiveMap = source.emissiveMap;
|
|
229
|
+
this.emissiveness = source.emissiveness;
|
|
230
|
+
this.materialOutput = source.materialOutput;
|
|
231
|
+
this.map = source.map;
|
|
232
|
+
this.normalMap = source.normalMap;
|
|
233
|
+
this.normalScale = source.normalScale;
|
|
234
|
+
this.opacity = source.opacity;
|
|
235
|
+
this.shading = source.shading;
|
|
236
|
+
this.side = source.side;
|
|
237
|
+
this.refractionIndex = this.refractionIndex;
|
|
238
|
+
this.impurityMap = this.impurityMap;
|
|
239
|
+
this.impurityScale = this.impurityScale;
|
|
240
|
+
this.colorTransferBegin = this.colorTransferBegin;
|
|
241
|
+
this.colorTransferEnd = this.colorTransferEnd;
|
|
242
|
+
this.center = this.center;
|
|
243
|
+
this.tracingDepth = this.tracingDepth;
|
|
244
|
+
this.radius = this.radius;
|
|
245
|
+
this.sphericalNormalMap = this.sphericalNormalMap;
|
|
246
|
+
this.gamma = this.gamma;
|
|
247
|
+
this.contrast = this.contrast;
|
|
248
|
+
this.brightness = this.brightness;
|
|
249
|
+
this.dispersion = this.dispersion;
|
|
250
|
+
this.tracingOpacity = this.tracingOpacity;
|
|
251
|
+
this.inverseModelMatrix = this.inverseModelMatrix;
|
|
252
|
+
this.inverseTransposeModelMatrix = this.inverseTransposeModelMatrix;
|
|
253
|
+
}
|
|
254
|
+
reset() {
|
|
255
|
+
this.alphaCutoff = 0;
|
|
256
|
+
this.alphaMap = undefined;
|
|
257
|
+
this.alphaMode = IMaterialAbstractData_1.MATERIAL_ALPHA.OPAQUE;
|
|
258
|
+
this.aoMap = undefined;
|
|
259
|
+
this.aoMapIntensity = 1.0;
|
|
260
|
+
this.bumpMap = undefined;
|
|
261
|
+
this.bumpScale = 1.0;
|
|
262
|
+
this.color = '#ffffff';
|
|
263
|
+
this.emissiveMap = undefined;
|
|
264
|
+
this.emissiveness = '#000000';
|
|
265
|
+
this.materialOutput = false;
|
|
266
|
+
this.map = undefined;
|
|
267
|
+
this.normalMap = undefined;
|
|
268
|
+
this.normalScale = 1.0;
|
|
269
|
+
this.opacity = 1.0;
|
|
270
|
+
this.shading = IMaterialAbstractData_1.MATERIAL_SHADING.SMOOTH;
|
|
271
|
+
this.side = IMaterialAbstractData_1.MATERIAL_SIDE.DOUBLE;
|
|
272
|
+
this.refractionIndex = 2.4;
|
|
273
|
+
this.impurityMap = undefined;
|
|
274
|
+
this.impurityScale = 1.0;
|
|
275
|
+
this.colorTransferBegin = '#ffffff';
|
|
276
|
+
this.colorTransferEnd = '#ffffff';
|
|
277
|
+
this.center = gl_matrix_1.vec3.create();
|
|
278
|
+
this.radius = 1;
|
|
279
|
+
this.sphericalNormalMap = undefined;
|
|
280
|
+
this.gamma = 1;
|
|
281
|
+
this.contrast = 1;
|
|
282
|
+
this.brightness = 0;
|
|
283
|
+
this.dispersion = 0;
|
|
284
|
+
this.tracingDepth = 5;
|
|
285
|
+
this.tracingOpacity = 0;
|
|
286
|
+
this.inverseModelMatrix = gl_matrix_1.mat4.create();
|
|
287
|
+
this.inverseTransposeModelMatrix = gl_matrix_1.mat3.create();
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
exports.MaterialGemData = MaterialGemData;
|
|
291
|
+
_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_inverseModelMatrix = new WeakMap(), _MaterialGemData_inverseTransposeModelMatrix = new WeakMap();
|
|
292
|
+
//# sourceMappingURL=MaterialGemData.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MaterialGemData.js","sourceRoot":"","sources":["../../../src/implementation/material/MaterialGemData.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,iEAA8D;AAE9D,gGAAuH;AAEvH,yCAA6C;AAE7C,MAAa,eAAgB,SAAQ,2CAAoB;IAqBrD,4BAA4B;IAE5B,2BAA2B;IAE3B;;;;;OAKG;IACH,YACI,UAAuC,EACvC,EAAW;QAEX,KAAK,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;QAlC1B,yBAAyB;QAGzB,2CAA2B,GAAG,EAAC;QAC/B,+CAAwB;QACxB,yCAAyB,GAAG,EAAC;QAC7B,8CAA8B,SAAS,EAAC;QACxC,4CAA4B,SAAS,EAAC;QACtC,kCAAgB,gBAAI,CAAC,MAAM,EAAE,EAAC;QAC9B,kCAAkB,CAAC,EAAC;QACpB,sDAA+B;QAC/B,iCAAiB,CAAC,EAAC;QACnB,oCAAoB,CAAC,EAAC;QACtB,sCAAsB,CAAC,EAAC;QACxB,sCAAsB,CAAC,EAAC;QACxB,wCAAwB,CAAC,EAAC;QAC1B,0CAA0B,CAAC,EAAC;QAC5B,8CAA4B,gBAAI,CAAC,MAAM,EAAE,EAAC;QAC1C,uDAAqC,gBAAI,CAAC,MAAM,EAAE,EAAC;QAiB/C,IAAI,CAAC,UAAU;YAAE,OAAO;QAExB,IAAI,UAAU,CAAC,eAAe,KAAK,SAAS;YAAE,IAAI,CAAC,eAAe,GAAG,UAAU,CAAC,eAAe,CAAC;QAChG,IAAI,UAAU,CAAC,WAAW,KAAK,SAAS;YAAE,IAAI,CAAC,WAAW,GAAG,UAAU,CAAC,WAAW,CAAC;QACpF,IAAI,UAAU,CAAC,aAAa,KAAK,SAAS;YAAE,IAAI,CAAC,aAAa,GAAG,UAAU,CAAC,aAAa,CAAC;QAC1F,IAAI,UAAU,CAAC,kBAA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 +1,15 @@
|
|
|
1
|
+
import { IMaterialShadowData, IMaterialShadowDataProperties } from "../../interfaces/data/material/IMaterialShadowData";
|
|
2
|
+
import { AbstractMaterialData } from "./AbstractMaterialData";
|
|
3
|
+
export declare class MaterialShadowData extends AbstractMaterialData implements IMaterialShadowData {
|
|
4
|
+
/**
|
|
5
|
+
* Creates a material data object.
|
|
6
|
+
*
|
|
7
|
+
* @param _attributes the attributes of the material
|
|
8
|
+
* @param id the id
|
|
9
|
+
*/
|
|
10
|
+
constructor(properties?: IMaterialShadowDataProperties, id?: string);
|
|
11
|
+
reset(): void;
|
|
12
|
+
clone(): IMaterialShadowData;
|
|
13
|
+
copy(source: MaterialShadowData): void;
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=MaterialShadowData.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MaterialShadowData.d.ts","sourceRoot":"","sources":["../../../src/implementation/material/MaterialShadowData.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,6BAA6B,EAAE,MAAM,oDAAoD,CAAC;AACxH,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAG9D,qBAAa,kBAAmB,SAAQ,oBAAqB,YAAW,mBAAmB;IAGvF;;;;;OAKG;gBAEC,UAAU,CAAC,EAAE,6BAA6B,EAC1C,EAAE,CAAC,EAAE,MAAM;IAUR,KAAK,IAAI,IAAI;IAKb,KAAK,IAAI,mBAAmB;IAO5B,IAAI,CAAC,MAAM,EAAE,kBAAkB,GAAG,IAAI;CAMhD"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MaterialShadowData = void 0;
|
|
4
|
+
const AbstractMaterialData_1 = require("./AbstractMaterialData");
|
|
5
|
+
class MaterialShadowData extends AbstractMaterialData_1.AbstractMaterialData {
|
|
6
|
+
// #region Constructors (1)
|
|
7
|
+
/**
|
|
8
|
+
* Creates a material data object.
|
|
9
|
+
*
|
|
10
|
+
* @param _attributes the attributes of the material
|
|
11
|
+
* @param id the id
|
|
12
|
+
*/
|
|
13
|
+
constructor(properties, id) {
|
|
14
|
+
super(properties, id);
|
|
15
|
+
if (!properties)
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
// #endregion Constructors (1)
|
|
19
|
+
// #region Public Methods (1)
|
|
20
|
+
reset() {
|
|
21
|
+
this.color = '#000000';
|
|
22
|
+
this.opacity = 1.0;
|
|
23
|
+
}
|
|
24
|
+
clone() {
|
|
25
|
+
return new MaterialShadowData({
|
|
26
|
+
color: this.color,
|
|
27
|
+
opacity: this.opacity,
|
|
28
|
+
}, this.id);
|
|
29
|
+
}
|
|
30
|
+
copy(source) {
|
|
31
|
+
this.color = source.color;
|
|
32
|
+
this.opacity = source.opacity;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.MaterialShadowData = MaterialShadowData;
|
|
36
|
+
//# sourceMappingURL=MaterialShadowData.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MaterialShadowData.js","sourceRoot":"","sources":["../../../src/implementation/material/MaterialShadowData.ts"],"names":[],"mappings":";;;AACA,iEAA8D;AAG9D,MAAa,kBAAmB,SAAQ,2CAAoB;IACxD,2BAA2B;IAE3B;;;;;OAKG;IACH,YACI,UAA0C,EAC1C,EAAW;QAEX,KAAK,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC;QACtB,IAAI,CAAC,UAAU;YAAE,OAAO;IAC5B,CAAC;IAED,8BAA8B;IAE9B,6BAA6B;IAEtB,KAAK;QACR,IAAI,CAAC,KAAK,GAAG,SAAS,CAAC;QACvB,IAAI,CAAC,OAAO,GAAG,GAAG,CAAC;IACvB,CAAC;IAEM,KAAK;QACR,OAAO,IAAI,kBAAkB,CAAC;YAC1B,KAAK,EAAE,IAAI,CAAC,KAAK;YACjB,OAAO,EAAE,IAAI,CAAC,OAAO;SACxB,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC;IAChB,CAAC;IAEM,IAAI,CAAC,MAA0B;QAClC,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;QAC1B,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;IAClC,CAAC;CAGJ;AAvCD,gDAuCC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -35,7 +35,11 @@ import { IBoneData } from './interfaces/data/IBoneData';
|
|
|
35
35
|
import { BoneData } from './implementation/data/BoneData';
|
|
36
36
|
import { SdtfTypeHintName } from '@shapediver/sdk.sdtf-v1';
|
|
37
37
|
import { SdtfPrimitiveTypeGuard } from '@shapediver/sdk.sdtf-primitives';
|
|
38
|
-
|
|
38
|
+
import { MaterialGemData } from './implementation/material/MaterialGemData';
|
|
39
|
+
import { IMaterialGemData, IMaterialGemDataProperties } from './interfaces/data/material/IMaterialGemDataProperties';
|
|
40
|
+
import { MaterialShadowData } from './implementation/material/MaterialShadowData';
|
|
41
|
+
import { IMaterialShadowData, IMaterialShadowDataProperties } from './interfaces/data/material/IMaterialShadowData';
|
|
42
|
+
export { IMaterialStandardData, MaterialStandardData, IMaterialStandardDataProperties, IMaterialAbstractData, IMaterialAbstractDataProperties, AbstractMaterialData, IMaterialUnlitData, MaterialUnlitData, IMaterialUnlitDataProperties, IMaterialShadowData, MaterialShadowData, IMaterialShadowDataProperties, IMaterialSpecularGlossinessData, MaterialSpecularGlossinessData, IMaterialSpecularGlossinessDataProperties, IMaterialGemData, MaterialGemData, IMaterialGemDataProperties, IMapData, MapData, MATERIAL_SIDE, MATERIAL_ALPHA, MATERIAL_SHADING, TEXTURE_WRAPPING, TEXTURE_FILTERING };
|
|
39
43
|
export { IAnimationData, AnimationData, IAnimationTrack, IGeometryData, IAttributeData, IPrimitiveData, IMaterialVariantsData, GeometryData, AttributeData, PrimitiveData, MaterialVariantsData, PRIMITIVE_MODE };
|
|
40
44
|
export { IAnchorDataImage, IAnchorDataText, IHTMLElementAnchorData, HTMLElementAnchorCustomData, HTMLElementAnchorTextData, HTMLElementAnchorImageData, HTMLElementAnchorData };
|
|
41
45
|
export { ICustomData, CustomData, IBoneData, BoneData };
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAA;AAC7D,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,oCAAoC,CAAA;AAC/F,OAAO,EACL,oBAAoB,EACrB,MAAM,gDAAgD,CAAA;AACvD,OAAO,EAAE,2BAA2B,EAAE,qBAAqB,EAAE,0BAA0B,EAAE,yBAAyB,EAAE,MAAM,6CAA6C,CAAA;AACvK,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAA;AACjE,OAAO,EAAE,aAAa,EAAE,MAAM,qCAAqC,CAAA;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAA;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,mCAAmC,CAAA;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AAC/D,OAAO,EAAE,WAAW,EAAE,MAAM,iCAAiC,CAAA;AAC7D,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAA;AACtE,OAAO,EAAE,oBAAoB,EAAE,MAAM,gDAAgD,CAAA;AACrF,OAAO,EAAE,OAAO,EAAE,MAAM,mCAAmC,CAAA;AAC3D,OAAO,EAAE,8BAA8B,EAAE,MAAM,0DAA0D,CAAA;AACzG,OAAO,EAAE,iBAAiB,EAAE,MAAM,6CAA6C,CAAA;AAC/E,OAAO,EAAE,gBAAgB,EAAE,eAAe,EAAE,sBAAsB,EAAE,MAAM,0CAA0C,CAAA;AACpH,OAAO,EAAE,qBAAqB,EAAE,+BAA+B,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1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SdtfPrimitiveTypeGuard = exports.SDTF_TYPEHINT = exports.SDTFItemData = exports.SDTFAttributeData = exports.SDTFAttributesData = exports.SDTFOverviewData = exports.TASK_TYPE = exports.BoneData = exports.CustomData = exports.HTMLElementAnchorData = exports.HTMLElementAnchorImageData = exports.HTMLElementAnchorTextData = exports.HTMLElementAnchorCustomData = exports.PRIMITIVE_MODE = exports.MaterialVariantsData = exports.PrimitiveData = exports.AttributeData = exports.GeometryData = exports.AnimationData = exports.TEXTURE_FILTERING = exports.TEXTURE_WRAPPING = exports.MATERIAL_SHADING = exports.MATERIAL_ALPHA = exports.MATERIAL_SIDE = exports.MapData = exports.MaterialSpecularGlossinessData = exports.MaterialUnlitData = exports.AbstractMaterialData = exports.MaterialStandardData = void 0;
|
|
3
|
+
exports.SdtfPrimitiveTypeGuard = exports.SDTF_TYPEHINT = exports.SDTFItemData = exports.SDTFAttributeData = exports.SDTFAttributesData = exports.SDTFOverviewData = exports.TASK_TYPE = exports.BoneData = exports.CustomData = exports.HTMLElementAnchorData = exports.HTMLElementAnchorImageData = exports.HTMLElementAnchorTextData = exports.HTMLElementAnchorCustomData = exports.PRIMITIVE_MODE = exports.MaterialVariantsData = exports.PrimitiveData = exports.AttributeData = exports.GeometryData = exports.AnimationData = exports.TEXTURE_FILTERING = exports.TEXTURE_WRAPPING = exports.MATERIAL_SHADING = exports.MATERIAL_ALPHA = exports.MATERIAL_SIDE = exports.MapData = exports.MaterialGemData = exports.MaterialSpecularGlossinessData = exports.MaterialShadowData = exports.MaterialUnlitData = exports.AbstractMaterialData = exports.MaterialStandardData = void 0;
|
|
4
4
|
const CustomData_1 = require("./implementation/data/CustomData");
|
|
5
5
|
Object.defineProperty(exports, "CustomData", { enumerable: true, get: function () { return CustomData_1.CustomData; } });
|
|
6
6
|
const GeometryData_1 = require("./implementation/data/GeometryData");
|
|
@@ -50,4 +50,8 @@ const sdk_sdtf_v1_1 = require("@shapediver/sdk.sdtf-v1");
|
|
|
50
50
|
Object.defineProperty(exports, "SDTF_TYPEHINT", { enumerable: true, get: function () { return sdk_sdtf_v1_1.SdtfTypeHintName; } });
|
|
51
51
|
const sdk_sdtf_primitives_1 = require("@shapediver/sdk.sdtf-primitives");
|
|
52
52
|
Object.defineProperty(exports, "SdtfPrimitiveTypeGuard", { enumerable: true, get: function () { return sdk_sdtf_primitives_1.SdtfPrimitiveTypeGuard; } });
|
|
53
|
+
const MaterialGemData_1 = require("./implementation/material/MaterialGemData");
|
|
54
|
+
Object.defineProperty(exports, "MaterialGemData", { enumerable: true, get: function () { return MaterialGemData_1.MaterialGemData; } });
|
|
55
|
+
const MaterialShadowData_1 = require("./implementation/material/MaterialShadowData");
|
|
56
|
+
Object.defineProperty(exports, "MaterialShadowData", { enumerable: true, get: function () { return MaterialShadowData_1.MaterialShadowData; } });
|
|
53
57
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,iEAA6D;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,iEAA6D;AA+D9C,2FA/DN,uBAAU,OA+DM;AA9DzB,qEAA+F;AAsDuC,8FAtD7H,4BAAa,OAsD6H;AAA3B,6FAtDhG,2BAAY,OAsDgG;AAAiB,8FAtD/G,4BAAa,OAsD+G;AArDlK,yFAEuD;AAyC9B,qGA1CvB,2CAAoB,OA0CuB;AAxC7C,uFAAuK;AAsD1G,4GAtDpD,mDAA2B,OAsDoD;AAAyD,sGAtD3G,6CAAqB,OAsD2G;AAAjD,2GAtDxD,kDAA0B,OAsDwD;AAArD,0GAtDD,iDAAyB,OAsDC;AArDnH,qEAAiE;AAiEqE,6FAjE7H,2BAAY,OAiE6H;AAhElJ,uEAAmE;AAgDjD,8FAhDT,6BAAa,OAgDS;AA3C/B,+DAAsE;AAuDwB,0FAvDzE,sBAAS,OAuDyE;AAtDvG,yFAAqF;AA0C+E,qGA1C3J,2CAAoB,OA0C2J;AAzCxL,+DAA2D;AAqC/C,wFArCH,iBAAO,OAqCG;AApCnB,6GAAyG;AAkCtE,+GAlC1B,+DAA8B,OAkC0B;AAjCjE,mFAA+E;AA+BzD,kGA/Bb,qCAAiB,OA+Ba;AA7BvC,4FAA0K;AAiCtI,+FAjC6B,sCAAc,OAiC7B;AAAE,iGAjC6B,wCAAgB,OAiC7B;AAA/C,8FAjC8E,qCAAa,OAiC9E;AAhClC,mEAA+G;AAoC2E,+FApClI,8BAAc,OAoCkI;AAnCxM,kEAAmG;AA+B7B,iGA/B7D,2BAAgB,OA+B6D;AAAE,kGA/B7D,4BAAiB,OA+B6D;AAxBzG,yFAAqF;AAmB3B,qGAnBjD,2CAAoB,OAmBiD;AAjB9E,iFAAgG;AA0CmB,kGA1C1G,sCAAiB,OA0C0G;AAA9E,mGA1C1B,uCAAkB,OA0C0B;AAzCxE,6EAAyE;AAyCpD,iGAzCZ,mCAAgB,OAyCY;AAnCrC,6DAAyD;AA2BnB,yFA3B7B,mBAAQ,OA2B6B;AA1B9C,yDAA0D;AAmCpC,8FAnCb,8BAAgB,OAmCU;AAlCnC,yEAAwE;AAkCnC,uGAlC5B,4CAAsB,OAkC4B;AAjC3D,+EAA2E;AAWvD,gGAXX,iCAAe,OAWW;AATnC,qFAAiF;AAO1D,mGAPd,uCAAkB,OAOc"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { mat3, mat4, vec3 } from "gl-matrix";
|
|
2
|
+
import { IMapData } from "./IMapData";
|
|
3
|
+
import { IMaterialAbstractData, IMaterialAbstractDataProperties } from "./IMaterialAbstractData";
|
|
4
|
+
export interface IMaterialGemDataProperties extends IMaterialAbstractDataProperties {
|
|
5
|
+
refractionIndex?: number;
|
|
6
|
+
impurityMap?: IMapData;
|
|
7
|
+
impurityScale?: number;
|
|
8
|
+
colorTransferBegin?: string;
|
|
9
|
+
colorTransferEnd?: string;
|
|
10
|
+
center?: vec3;
|
|
11
|
+
radius?: number;
|
|
12
|
+
sphericalNormalMap?: IMapData;
|
|
13
|
+
gamma?: number;
|
|
14
|
+
contrast?: number;
|
|
15
|
+
brightness?: number;
|
|
16
|
+
dispersion?: number;
|
|
17
|
+
tracingDepth?: number;
|
|
18
|
+
tracingOpacity?: number;
|
|
19
|
+
inverseModelMatrix?: mat4;
|
|
20
|
+
inverseTransposeModelMatrix?: mat3;
|
|
21
|
+
}
|
|
22
|
+
export interface IMaterialGemData extends IMaterialAbstractData {
|
|
23
|
+
refractionIndex?: number;
|
|
24
|
+
impurityMap?: IMapData;
|
|
25
|
+
impurityScale?: number;
|
|
26
|
+
colorTransferBegin?: string;
|
|
27
|
+
colorTransferEnd?: string;
|
|
28
|
+
center?: vec3;
|
|
29
|
+
radius?: number;
|
|
30
|
+
sphericalNormalMap?: IMapData;
|
|
31
|
+
gamma?: number;
|
|
32
|
+
contrast?: number;
|
|
33
|
+
brightness?: number;
|
|
34
|
+
dispersion?: number;
|
|
35
|
+
tracingDepth?: number;
|
|
36
|
+
tracingOpacity?: number;
|
|
37
|
+
inverseModelMatrix?: mat4;
|
|
38
|
+
inverseTransposeModelMatrix?: mat3;
|
|
39
|
+
clone(): IMaterialGemData;
|
|
40
|
+
copy(source: IMaterialGemData): void;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=IMaterialGemDataProperties.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IMaterialGemDataProperties.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/data/material/IMaterialGemDataProperties.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;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CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,kBAAkB,CAAC,EAAE,IAAI,CAAC;IAC1B,2BAA2B,CAAC,EAAE,IAAI,CAAC;IAEnC,KAAK,IAAI,gBAAgB,CAAC;IAC1B,IAAI,CAAC,MAAM,EAAE,gBAAgB,GAAG,IAAI,CAAC;CAGxC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IMaterialGemDataProperties.js","sourceRoot":"","sources":["../../../../src/interfaces/data/material/IMaterialGemDataProperties.ts"],"names":[],"mappings":";;AAyBC,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { IMaterialAbstractData, IMaterialAbstractDataProperties } from "./IMaterialAbstractData";
|
|
2
|
+
export interface IMaterialShadowDataProperties extends IMaterialAbstractDataProperties {
|
|
3
|
+
}
|
|
4
|
+
export interface IMaterialShadowData extends IMaterialAbstractData {
|
|
5
|
+
clone(): IMaterialShadowData;
|
|
6
|
+
copy(source: IMaterialShadowData): void;
|
|
7
|
+
}
|
|
8
|
+
//# sourceMappingURL=IMaterialShadowData.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IMaterialShadowData.d.ts","sourceRoot":"","sources":["../../../../src/interfaces/data/material/IMaterialShadowData.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,+BAA+B,EAAE,MAAM,yBAAyB,CAAC;AAEjG,MAAM,WAAW,6BAA8B,SAAQ,+BAA+B;CAAG;AAEzF,MAAM,WAAW,mBAAoB,SAAQ,qBAAqB;IAG9D,KAAK,IAAI,mBAAmB,CAAC;IAC7B,IAAI,CAAC,MAAM,EAAE,mBAAmB,GAAG,IAAI,CAAC;CAG3C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IMaterialShadowData.js","sourceRoot":"","sources":["../../../../src/interfaces/data/material/IMaterialShadowData.ts"],"names":[],"mappings":";;AAGyF,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shapediver/viewer.shared.types",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.3.1",
|
|
4
4
|
"description": "",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"author": "Michael Oppitz <michael@shapediver.com>",
|
|
@@ -40,11 +40,11 @@
|
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@shapediver/sdk.sdtf-v1": "1.0.0",
|
|
43
|
-
"@shapediver/viewer.shared.math": "2.
|
|
44
|
-
"@shapediver/viewer.shared.node-tree": "2.
|
|
45
|
-
"@shapediver/viewer.shared.services": "2.
|
|
43
|
+
"@shapediver/viewer.shared.math": "2.3.1",
|
|
44
|
+
"@shapediver/viewer.shared.node-tree": "2.3.1",
|
|
45
|
+
"@shapediver/viewer.shared.services": "2.3.1",
|
|
46
46
|
"gl-matrix": "3.3.0",
|
|
47
47
|
"tsyringe": "^4.5.0"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "620b0b38ad947dbfd6778ed368371da14d2b4451"
|
|
50
50
|
}
|
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
import { AbstractMaterialData } from './AbstractMaterialData';
|
|
2
|
+
import { IMaterialGemData, IMaterialGemDataProperties } from '../../interfaces/data/material/IMaterialGemDataProperties';
|
|
3
|
+
import { MATERIAL_ALPHA, MATERIAL_SHADING, MATERIAL_SIDE } from '../../interfaces/data/material/IMaterialAbstractData';
|
|
4
|
+
import { IMapData } from '../../interfaces/data/material/IMapData';
|
|
5
|
+
import { mat3, mat4, vec3 } from 'gl-matrix';
|
|
6
|
+
|
|
7
|
+
export class MaterialGemData extends AbstractMaterialData implements IMaterialGemData {
|
|
8
|
+
// #region Properties (5)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
#refractionIndex: number = 2.4;
|
|
12
|
+
#impurityMap?: IMapData;
|
|
13
|
+
#impurityScale: number = 1.0;
|
|
14
|
+
#colorTransferBegin: string = '#ffffff';
|
|
15
|
+
#colorTransferEnd: string = '#ffffff';
|
|
16
|
+
#center: vec3 = vec3.create();
|
|
17
|
+
#radius: number = 1;
|
|
18
|
+
#sphericalNormalMap?: IMapData;
|
|
19
|
+
#gamma: number = 1;
|
|
20
|
+
#contrast: number = 1;
|
|
21
|
+
#brightness: number = 0;
|
|
22
|
+
#dispersion: number = 0;
|
|
23
|
+
#tracingDepth: number = 5;
|
|
24
|
+
#tracingOpacity: number = 0;
|
|
25
|
+
#inverseModelMatrix: mat4 = mat4.create();
|
|
26
|
+
#inverseTransposeModelMatrix: mat3 = mat3.create();
|
|
27
|
+
|
|
28
|
+
// #endregion Properties (5)
|
|
29
|
+
|
|
30
|
+
// #region Constructors (1)
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Creates a material data object.
|
|
34
|
+
*
|
|
35
|
+
* @param _attributes the attributes of the material
|
|
36
|
+
* @param id the id
|
|
37
|
+
*/
|
|
38
|
+
constructor(
|
|
39
|
+
properties?: IMaterialGemDataProperties,
|
|
40
|
+
id?: string
|
|
41
|
+
) {
|
|
42
|
+
super(properties, id);
|
|
43
|
+
if (!properties) return;
|
|
44
|
+
|
|
45
|
+
if (properties.refractionIndex !== undefined) this.refractionIndex = properties.refractionIndex;
|
|
46
|
+
if (properties.impurityMap !== undefined) this.impurityMap = properties.impurityMap;
|
|
47
|
+
if (properties.impurityScale !== undefined) this.impurityScale = properties.impurityScale;
|
|
48
|
+
if (properties.colorTransferBegin !== undefined) this.colorTransferBegin = properties.colorTransferBegin;
|
|
49
|
+
if (properties.colorTransferEnd !== undefined) this.colorTransferEnd = properties.colorTransferEnd;
|
|
50
|
+
if (properties.center !== undefined) this.center = properties.center;
|
|
51
|
+
if (properties.tracingDepth !== undefined) this.tracingDepth = properties.tracingDepth;
|
|
52
|
+
if (properties.radius !== undefined) this.radius = properties.radius;
|
|
53
|
+
if (properties.sphericalNormalMap !== undefined) this.sphericalNormalMap = properties.sphericalNormalMap;
|
|
54
|
+
if (properties.gamma !== undefined) this.gamma = properties.gamma;
|
|
55
|
+
if (properties.contrast !== undefined) this.contrast = properties.contrast;
|
|
56
|
+
if (properties.brightness !== undefined) this.brightness = properties.brightness;
|
|
57
|
+
if (properties.dispersion !== undefined) this.dispersion = properties.dispersion;
|
|
58
|
+
if (properties.tracingOpacity !== undefined) this.tracingOpacity = properties.tracingOpacity;
|
|
59
|
+
if (properties.inverseModelMatrix !== undefined) this.inverseModelMatrix = properties.inverseModelMatrix;
|
|
60
|
+
if (properties.inverseTransposeModelMatrix !== undefined) this.inverseTransposeModelMatrix = properties.inverseTransposeModelMatrix;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
// #endregion Constructors (1)
|
|
64
|
+
|
|
65
|
+
// #region Public Accessors (10)
|
|
66
|
+
|
|
67
|
+
public get refractionIndex(): number {
|
|
68
|
+
return this.#refractionIndex;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
public set refractionIndex(value: number) {
|
|
72
|
+
this.#refractionIndex = value;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
public get impurityMap(): IMapData | undefined {
|
|
76
|
+
return this.#impurityMap;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
public set impurityMap(value: IMapData | undefined) {
|
|
80
|
+
this.#impurityMap = value;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
public get impurityScale(): number {
|
|
84
|
+
return this.#impurityScale;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
public set impurityScale(value: number) {
|
|
88
|
+
this.#impurityScale = value;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
public get colorTransferBegin(): string {
|
|
92
|
+
return this.#colorTransferBegin;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
public set colorTransferBegin(value: string) {
|
|
96
|
+
this.#colorTransferBegin = value;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
public get colorTransferEnd(): string {
|
|
100
|
+
return this.#colorTransferEnd;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
public set colorTransferEnd(value: string) {
|
|
104
|
+
this.#colorTransferEnd = value;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
public get center(): vec3 {
|
|
108
|
+
return this.#center;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
public set center(value: vec3) {
|
|
112
|
+
this.#center = value;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
public get tracingDepth(): number {
|
|
116
|
+
return this.#tracingDepth;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
public set tracingDepth(value: number) {
|
|
120
|
+
this.#tracingDepth = value;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
public get radius(): number {
|
|
124
|
+
return this.#radius;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
public set radius(value: number) {
|
|
128
|
+
this.#radius = value;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
public get sphericalNormalMap(): IMapData | undefined {
|
|
132
|
+
return this.#sphericalNormalMap;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
public set sphericalNormalMap(value: IMapData | undefined) {
|
|
136
|
+
this.#sphericalNormalMap = value;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
public get gamma(): number {
|
|
140
|
+
return this.#gamma;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
public set gamma(value: number) {
|
|
144
|
+
this.#gamma = value;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
public get contrast(): number {
|
|
148
|
+
return this.#contrast;
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
public set contrast(value: number) {
|
|
152
|
+
this.#contrast = value;
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
public get brightness(): number {
|
|
156
|
+
return this.#brightness;
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
public set brightness(value: number) {
|
|
160
|
+
this.#brightness = value;
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
public get dispersion(): number {
|
|
164
|
+
return this.#dispersion;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
public set dispersion(value: number) {
|
|
168
|
+
this.#dispersion = value;
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
public get tracingOpacity(): number {
|
|
172
|
+
return this.#tracingOpacity;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
public set tracingOpacity(value: number) {
|
|
176
|
+
this.#tracingOpacity = value;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
public get inverseModelMatrix(): mat4 {
|
|
180
|
+
return this.#inverseModelMatrix;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
public set inverseModelMatrix(value: mat4) {
|
|
184
|
+
this.#inverseModelMatrix = value;
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
public get inverseTransposeModelMatrix(): mat3 {
|
|
188
|
+
return this.#inverseTransposeModelMatrix;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
public set inverseTransposeModelMatrix(value: mat3) {
|
|
192
|
+
this.#inverseTransposeModelMatrix = value;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
// #endregion Public Accessors (10)
|
|
196
|
+
|
|
197
|
+
// #region Public Methods (3)
|
|
198
|
+
|
|
199
|
+
public clone(): IMaterialGemData {
|
|
200
|
+
return new MaterialGemData({
|
|
201
|
+
alphaMap: this.alphaMap,
|
|
202
|
+
alphaCutoff: this.alphaCutoff,
|
|
203
|
+
alphaMode: this.alphaMode,
|
|
204
|
+
aoMap: this.aoMap,
|
|
205
|
+
aoMapIntensity: this.aoMapIntensity,
|
|
206
|
+
bumpMap: this.bumpMap,
|
|
207
|
+
bumpScale: this.bumpScale,
|
|
208
|
+
color: this.color,
|
|
209
|
+
emissiveMap: this.emissiveMap,
|
|
210
|
+
emissiveness: this.emissiveness,
|
|
211
|
+
shading: this.shading,
|
|
212
|
+
map: this.map,
|
|
213
|
+
name: this.name,
|
|
214
|
+
normalMap: this.normalMap,
|
|
215
|
+
normalScale: this.normalScale,
|
|
216
|
+
opacity: this.opacity,
|
|
217
|
+
side: this.side,
|
|
218
|
+
refractionIndex: this.refractionIndex,
|
|
219
|
+
impurityMap: this.impurityMap,
|
|
220
|
+
impurityScale: this.impurityScale,
|
|
221
|
+
colorTransferBegin: this.colorTransferBegin,
|
|
222
|
+
colorTransferEnd: this.colorTransferEnd,
|
|
223
|
+
center: this.center,
|
|
224
|
+
tracingDepth: this.tracingDepth,
|
|
225
|
+
radius: this.radius,
|
|
226
|
+
sphericalNormalMap: this.sphericalNormalMap,
|
|
227
|
+
gamma: this.gamma,
|
|
228
|
+
contrast: this.contrast,
|
|
229
|
+
brightness: this.brightness,
|
|
230
|
+
dispersion: this.dispersion,
|
|
231
|
+
tracingOpacity: this.tracingOpacity,
|
|
232
|
+
inverseModelMatrix: this.inverseModelMatrix,
|
|
233
|
+
inverseTransposeModelMatrix: this.inverseTransposeModelMatrix,
|
|
234
|
+
}, this.id);
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
public copy(source: MaterialGemData): void {
|
|
238
|
+
this.alphaCutoff = source.alphaCutoff;
|
|
239
|
+
this.alphaMap = source.alphaMap;
|
|
240
|
+
this.alphaMode = source.alphaMode;
|
|
241
|
+
this.aoMap = source.aoMap;
|
|
242
|
+
this.aoMapIntensity = source.aoMapIntensity;
|
|
243
|
+
this.bumpMap = source.bumpMap;
|
|
244
|
+
this.bumpScale = source.bumpScale;
|
|
245
|
+
this.color = source.color;
|
|
246
|
+
this.emissiveMap = source.emissiveMap;
|
|
247
|
+
this.emissiveness = source.emissiveness;
|
|
248
|
+
this.materialOutput = source.materialOutput;
|
|
249
|
+
this.map = source.map;
|
|
250
|
+
this.normalMap = source.normalMap;
|
|
251
|
+
this.normalScale = source.normalScale;
|
|
252
|
+
this.opacity = source.opacity;
|
|
253
|
+
this.shading = source.shading;
|
|
254
|
+
this.side = source.side;
|
|
255
|
+
|
|
256
|
+
this.refractionIndex = this.refractionIndex;
|
|
257
|
+
this.impurityMap = this.impurityMap;
|
|
258
|
+
this.impurityScale = this.impurityScale;
|
|
259
|
+
this.colorTransferBegin = this.colorTransferBegin;
|
|
260
|
+
this.colorTransferEnd = this.colorTransferEnd;
|
|
261
|
+
this.center = this.center;
|
|
262
|
+
this.tracingDepth = this.tracingDepth;
|
|
263
|
+
this.radius = this.radius;
|
|
264
|
+
this.sphericalNormalMap = this.sphericalNormalMap;
|
|
265
|
+
this.gamma = this.gamma;
|
|
266
|
+
this.contrast = this.contrast;
|
|
267
|
+
this.brightness = this.brightness;
|
|
268
|
+
this.dispersion = this.dispersion;
|
|
269
|
+
this.tracingOpacity = this.tracingOpacity;
|
|
270
|
+
this.inverseModelMatrix = this.inverseModelMatrix;
|
|
271
|
+
this.inverseTransposeModelMatrix = this.inverseTransposeModelMatrix;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
public reset(): void {
|
|
275
|
+
this.alphaCutoff = 0;
|
|
276
|
+
this.alphaMap = undefined;
|
|
277
|
+
this.alphaMode = MATERIAL_ALPHA.OPAQUE;
|
|
278
|
+
this.aoMap = undefined;
|
|
279
|
+
this.aoMapIntensity = 1.0;
|
|
280
|
+
this.bumpMap = undefined;
|
|
281
|
+
this.bumpScale = 1.0;
|
|
282
|
+
this.color = '#ffffff';
|
|
283
|
+
this.emissiveMap = undefined;
|
|
284
|
+
this.emissiveness = '#000000';
|
|
285
|
+
this.materialOutput = false;
|
|
286
|
+
this.map = undefined;
|
|
287
|
+
this.normalMap = undefined;
|
|
288
|
+
this.normalScale = 1.0;
|
|
289
|
+
this.opacity = 1.0;
|
|
290
|
+
this.shading = MATERIAL_SHADING.SMOOTH;
|
|
291
|
+
this.side = MATERIAL_SIDE.DOUBLE;
|
|
292
|
+
|
|
293
|
+
this.refractionIndex = 2.4;
|
|
294
|
+
this.impurityMap = undefined;
|
|
295
|
+
this.impurityScale = 1.0;
|
|
296
|
+
this.colorTransferBegin = '#ffffff';
|
|
297
|
+
this.colorTransferEnd = '#ffffff';
|
|
298
|
+
this.center = vec3.create();
|
|
299
|
+
this.radius = 1;
|
|
300
|
+
this.sphericalNormalMap = undefined;
|
|
301
|
+
this.gamma = 1;
|
|
302
|
+
this.contrast = 1;
|
|
303
|
+
this.brightness = 0;
|
|
304
|
+
this.dispersion = 0;
|
|
305
|
+
this.tracingDepth = 5;
|
|
306
|
+
this.tracingOpacity = 0;
|
|
307
|
+
this.inverseModelMatrix = mat4.create();
|
|
308
|
+
this.inverseTransposeModelMatrix = mat3.create();
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
// #endregion Public Methods (3)
|
|
312
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { IMaterialShadowData, IMaterialShadowDataProperties } from "../../interfaces/data/material/IMaterialShadowData";
|
|
2
|
+
import { AbstractMaterialData } from "./AbstractMaterialData";
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
export class MaterialShadowData extends AbstractMaterialData implements IMaterialShadowData {
|
|
6
|
+
// #region Constructors (1)
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Creates a material data object.
|
|
10
|
+
*
|
|
11
|
+
* @param _attributes the attributes of the material
|
|
12
|
+
* @param id the id
|
|
13
|
+
*/
|
|
14
|
+
constructor(
|
|
15
|
+
properties?: IMaterialShadowDataProperties,
|
|
16
|
+
id?: string
|
|
17
|
+
) {
|
|
18
|
+
super(properties, id);
|
|
19
|
+
if (!properties) return;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
// #endregion Constructors (1)
|
|
23
|
+
|
|
24
|
+
// #region Public Methods (1)
|
|
25
|
+
|
|
26
|
+
public reset(): void {
|
|
27
|
+
this.color = '#000000';
|
|
28
|
+
this.opacity = 1.0;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
public clone(): IMaterialShadowData {
|
|
32
|
+
return new MaterialShadowData({
|
|
33
|
+
color: this.color,
|
|
34
|
+
opacity: this.opacity,
|
|
35
|
+
}, this.id);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
public copy(source: MaterialShadowData): void {
|
|
39
|
+
this.color = source.color;
|
|
40
|
+
this.opacity = source.opacity;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// #endregion Public Methods (1)
|
|
44
|
+
}
|
package/src/index.ts
CHANGED
|
@@ -37,12 +37,18 @@ import { IBoneData } from './interfaces/data/IBoneData'
|
|
|
37
37
|
import { BoneData } from './implementation/data/BoneData'
|
|
38
38
|
import { SdtfTypeHintName } from '@shapediver/sdk.sdtf-v1'
|
|
39
39
|
import { SdtfPrimitiveTypeGuard } from '@shapediver/sdk.sdtf-primitives'
|
|
40
|
+
import { MaterialGemData } from './implementation/material/MaterialGemData'
|
|
41
|
+
import { IMaterialGemData, IMaterialGemDataProperties } from './interfaces/data/material/IMaterialGemDataProperties'
|
|
42
|
+
import { MaterialShadowData } from './implementation/material/MaterialShadowData'
|
|
43
|
+
import { IMaterialShadowData, IMaterialShadowDataProperties } from './interfaces/data/material/IMaterialShadowData'
|
|
40
44
|
|
|
41
45
|
export {
|
|
42
46
|
IMaterialStandardData, MaterialStandardData, IMaterialStandardDataProperties,
|
|
43
47
|
IMaterialAbstractData, IMaterialAbstractDataProperties, AbstractMaterialData,
|
|
44
48
|
IMaterialUnlitData, MaterialUnlitData, IMaterialUnlitDataProperties,
|
|
49
|
+
IMaterialShadowData, MaterialShadowData, IMaterialShadowDataProperties,
|
|
45
50
|
IMaterialSpecularGlossinessData, MaterialSpecularGlossinessData, IMaterialSpecularGlossinessDataProperties,
|
|
51
|
+
IMaterialGemData, MaterialGemData, IMaterialGemDataProperties,
|
|
46
52
|
IMapData, MapData, MATERIAL_SIDE, MATERIAL_ALPHA, MATERIAL_SHADING, TEXTURE_WRAPPING, TEXTURE_FILTERING
|
|
47
53
|
}
|
|
48
54
|
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { mat3, mat4, vec3 } from "gl-matrix";
|
|
2
|
+
import { IMapData } from "./IMapData";
|
|
3
|
+
import { IMaterialAbstractData, IMaterialAbstractDataProperties } from "./IMaterialAbstractData";
|
|
4
|
+
|
|
5
|
+
export interface IMaterialGemDataProperties extends IMaterialAbstractDataProperties {
|
|
6
|
+
// #region Properties (5)
|
|
7
|
+
|
|
8
|
+
refractionIndex?: number;
|
|
9
|
+
impurityMap?: IMapData;
|
|
10
|
+
impurityScale?: number;
|
|
11
|
+
colorTransferBegin?: string;
|
|
12
|
+
colorTransferEnd?: string;
|
|
13
|
+
center?: vec3;
|
|
14
|
+
radius?: number;
|
|
15
|
+
sphericalNormalMap?: IMapData;
|
|
16
|
+
gamma?: number;
|
|
17
|
+
contrast?: number;
|
|
18
|
+
brightness?: number;
|
|
19
|
+
dispersion?: number;
|
|
20
|
+
tracingDepth?: number;
|
|
21
|
+
tracingOpacity?: number;
|
|
22
|
+
inverseModelMatrix?: mat4;
|
|
23
|
+
inverseTransposeModelMatrix?: mat3;
|
|
24
|
+
|
|
25
|
+
// #endregion Properties (5)
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
export interface IMaterialGemData extends IMaterialAbstractData {
|
|
29
|
+
// #region Public Methods (2)
|
|
30
|
+
|
|
31
|
+
refractionIndex?: number;
|
|
32
|
+
impurityMap?: IMapData;
|
|
33
|
+
impurityScale?: number;
|
|
34
|
+
colorTransferBegin?: string;
|
|
35
|
+
colorTransferEnd?: string;
|
|
36
|
+
center?: vec3;
|
|
37
|
+
radius?: number;
|
|
38
|
+
sphericalNormalMap?: IMapData;
|
|
39
|
+
gamma?: number;
|
|
40
|
+
contrast?: number;
|
|
41
|
+
brightness?: number;
|
|
42
|
+
dispersion?: number;
|
|
43
|
+
tracingDepth?: number;
|
|
44
|
+
tracingOpacity?: number;
|
|
45
|
+
inverseModelMatrix?: mat4;
|
|
46
|
+
inverseTransposeModelMatrix?: mat3;
|
|
47
|
+
|
|
48
|
+
clone(): IMaterialGemData;
|
|
49
|
+
copy(source: IMaterialGemData): void;
|
|
50
|
+
|
|
51
|
+
// #endregion Public Methods (2)
|
|
52
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { IMapData } from "./IMapData";
|
|
2
|
+
import { IMaterialAbstractData, IMaterialAbstractDataProperties } from "./IMaterialAbstractData";
|
|
3
|
+
|
|
4
|
+
export interface IMaterialShadowDataProperties extends IMaterialAbstractDataProperties {};
|
|
5
|
+
|
|
6
|
+
export interface IMaterialShadowData extends IMaterialAbstractData {
|
|
7
|
+
// #region Public Methods (2)
|
|
8
|
+
|
|
9
|
+
clone(): IMaterialShadowData;
|
|
10
|
+
copy(source: IMaterialShadowData): void;
|
|
11
|
+
|
|
12
|
+
// #endregion Public Methods (2)
|
|
13
|
+
}
|