@shapediver/viewer.shared.types 2.12.7 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/implementation/data/GeometryData.d.ts +24 -30
- package/dist/implementation/data/GeometryData.d.ts.map +1 -1
- package/dist/implementation/data/GeometryData.js +100 -106
- package/dist/implementation/data/GeometryData.js.map +1 -1
- package/dist/implementation/data/HTMLElementAnchorData.d.ts.map +1 -1
- package/dist/implementation/data/HTMLElementAnchorData.js +3 -14
- package/dist/implementation/data/HTMLElementAnchorData.js.map +1 -1
- package/dist/implementation/material/AbstractMaterialData.d.ts +11 -8
- package/dist/implementation/material/AbstractMaterialData.d.ts.map +1 -1
- package/dist/implementation/material/AbstractMaterialData.js +32 -9
- package/dist/implementation/material/AbstractMaterialData.js.map +1 -1
- package/dist/implementation/material/MapData.d.ts +9 -3
- package/dist/implementation/material/MapData.d.ts.map +1 -1
- package/dist/implementation/material/MapData.js +24 -6
- package/dist/implementation/material/MapData.js.map +1 -1
- package/dist/implementation/material/MaterialBasicLineData.d.ts +15 -0
- package/dist/implementation/material/MaterialBasicLineData.d.ts.map +1 -0
- package/dist/implementation/material/MaterialBasicLineData.js +91 -0
- package/dist/implementation/material/MaterialBasicLineData.js.map +1 -0
- package/dist/implementation/material/MaterialGemData.d.ts.map +1 -1
- package/dist/implementation/material/MaterialGemData.js +23 -14
- package/dist/implementation/material/MaterialGemData.js.map +1 -1
- package/dist/implementation/material/MaterialMultiPointData.d.ts +102 -0
- package/dist/implementation/material/MaterialMultiPointData.d.ts.map +1 -0
- package/dist/implementation/material/MaterialMultiPointData.js +603 -0
- package/dist/implementation/material/MaterialMultiPointData.js.map +1 -0
- package/dist/implementation/material/MaterialPointData.d.ts +20 -0
- package/dist/implementation/material/MaterialPointData.d.ts.map +1 -0
- package/dist/implementation/material/MaterialPointData.js +132 -0
- package/dist/implementation/material/MaterialPointData.js.map +1 -0
- package/dist/implementation/material/MaterialSpecularGlossinessData.d.ts.map +1 -1
- package/dist/implementation/material/MaterialSpecularGlossinessData.js +9 -0
- package/dist/implementation/material/MaterialSpecularGlossinessData.js.map +1 -1
- package/dist/implementation/material/MaterialStandardData.d.ts.map +1 -1
- package/dist/implementation/material/MaterialStandardData.js +9 -0
- package/dist/implementation/material/MaterialStandardData.js.map +1 -1
- package/dist/implementation/material/MaterialUnlitData.d.ts.map +1 -1
- package/dist/implementation/material/MaterialUnlitData.js +9 -0
- package/dist/implementation/material/MaterialUnlitData.js.map +1 -1
- package/dist/index.d.ts +42 -34
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +40 -31
- package/dist/index.js.map +1 -1
- package/dist/interfaces/data/material/IMapData.d.ts +3 -1
- package/dist/interfaces/data/material/IMapData.d.ts.map +1 -1
- package/dist/interfaces/data/material/IMaterialAbstractData.d.ts +47 -44
- package/dist/interfaces/data/material/IMaterialAbstractData.d.ts.map +1 -1
- package/dist/interfaces/data/material/IMaterialAbstractData.js +10 -7
- package/dist/interfaces/data/material/IMaterialAbstractData.js.map +1 -1
- package/dist/interfaces/data/material/IMaterialBasicLineData.d.ts +7 -0
- package/dist/interfaces/data/material/IMaterialBasicLineData.d.ts.map +1 -0
- package/dist/interfaces/data/material/IMaterialBasicLineData.js +4 -0
- package/dist/interfaces/data/material/IMaterialBasicLineData.js.map +1 -0
- package/dist/interfaces/data/material/IMaterialMultiPointData.d.ts +94 -0
- package/dist/interfaces/data/material/IMaterialMultiPointData.d.ts.map +1 -0
- package/dist/interfaces/data/material/IMaterialMultiPointData.js +4 -0
- package/dist/interfaces/data/material/IMaterialMultiPointData.js.map +1 -0
- package/dist/interfaces/data/material/IMaterialPointData.d.ts +12 -0
- package/dist/interfaces/data/material/IMaterialPointData.d.ts.map +1 -0
- package/dist/interfaces/data/material/IMaterialPointData.js +3 -0
- package/dist/interfaces/data/material/IMaterialPointData.js.map +1 -0
- package/dist/interfaces/events/EventResponseMapping.d.ts +20 -8
- package/dist/interfaces/events/EventResponseMapping.d.ts.map +1 -1
- package/dist/interfaces/events/EventResponseMapping.js.map +1 -1
- package/dist/interfaces/events/ICameraEvent.d.ts +8 -1
- package/dist/interfaces/events/ICameraEvent.d.ts.map +1 -1
- package/dist/interfaces/events/IOutputEvent.d.ts +20 -4
- package/dist/interfaces/events/IOutputEvent.d.ts.map +1 -1
- package/dist/interfaces/events/IParameterEvent.d.ts +16 -0
- package/dist/interfaces/events/IParameterEvent.d.ts.map +1 -0
- package/dist/interfaces/events/IParameterEvent.js +3 -0
- package/dist/interfaces/events/IParameterEvent.js.map +1 -0
- package/dist/interfaces/events/IRenderingEvent.d.ts +7 -0
- package/dist/interfaces/events/IRenderingEvent.d.ts.map +1 -0
- package/dist/interfaces/events/IRenderingEvent.js +3 -0
- package/dist/interfaces/events/IRenderingEvent.js.map +1 -0
- package/dist/interfaces/events/ISceneEvent.d.ts +9 -2
- package/dist/interfaces/events/ISceneEvent.d.ts.map +1 -1
- package/dist/interfaces/events/ISessionEvent.d.ts +8 -1
- package/dist/interfaces/events/ISessionEvent.d.ts.map +1 -1
- package/dist/interfaces/events/ITaskEvent.d.ts +31 -8
- package/dist/interfaces/events/ITaskEvent.d.ts.map +1 -1
- package/dist/interfaces/events/ITaskEvent.js +7 -0
- package/dist/interfaces/events/ITaskEvent.js.map +1 -1
- package/dist/interfaces/events/IViewportEvent.d.ts +5 -1
- package/dist/interfaces/events/IViewportEvent.d.ts.map +1 -1
- package/dist/types.d.ts +46 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +4 -0
- package/dist/types.js.map +1 -1
- package/package.json +6 -5
- package/src/implementation/data/GeometryData.ts +139 -140
- package/src/implementation/data/HTMLElementAnchorData.ts +3 -14
- package/src/implementation/material/AbstractMaterialData.ts +48 -20
- package/src/implementation/material/MapData.ts +32 -8
- package/src/implementation/material/MaterialBasicLineData.ts +99 -0
- package/src/implementation/material/MaterialGemData.ts +23 -14
- package/src/implementation/material/MaterialMultiPointData.ts +659 -0
- package/src/implementation/material/MaterialPointData.ts +136 -0
- package/src/implementation/material/MaterialSpecularGlossinessData.ts +9 -0
- package/src/implementation/material/MaterialStandardData.ts +9 -0
- package/src/implementation/material/MaterialUnlitData.ts +9 -0
- package/src/index.ts +92 -57
- package/src/interfaces/data/material/IMapData.ts +3 -1
- package/src/interfaces/data/material/IMaterialAbstractData.ts +64 -51
- package/src/interfaces/data/material/IMaterialBasicLineData.ts +20 -0
- package/src/interfaces/data/material/IMaterialMultiPointData.ts +112 -0
- package/src/interfaces/data/material/IMaterialPointData.ts +26 -0
- package/src/interfaces/events/EventResponseMapping.ts +29 -8
- package/src/interfaces/events/ICameraEvent.ts +12 -1
- package/src/interfaces/events/IOutputEvent.ts +24 -4
- package/src/interfaces/events/IParameterEvent.ts +21 -0
- package/src/interfaces/events/IRenderingEvent.ts +7 -0
- package/src/interfaces/events/ISceneEvent.ts +13 -2
- package/src/interfaces/events/ISessionEvent.ts +13 -2
- package/src/interfaces/events/ITaskEvent.ts +43 -8
- package/src/interfaces/events/IViewportEvent.ts +9 -1
- package/src/types.ts +67 -2
|
@@ -1,11 +1,16 @@
|
|
|
1
|
-
import { AbstractTreeNodeData
|
|
2
|
-
import { IMapData } from '../../interfaces/data/material/IMapData';
|
|
3
|
-
import { IMaterialAbstractData, IMaterialAbstractDataProperties, MATERIAL_ALPHA, MATERIAL_SHADING, MATERIAL_SIDE } from '../../interfaces/data/material/IMaterialAbstractData';
|
|
1
|
+
import { AbstractTreeNodeData } from '@shapediver/viewer.shared.node-tree';
|
|
4
2
|
import { Color } from '../../types';
|
|
5
|
-
|
|
3
|
+
import { IMapData } from '../../interfaces/data/material/IMapData';
|
|
4
|
+
import {
|
|
5
|
+
IMaterialAbstractData,
|
|
6
|
+
IMaterialAbstractDataProperties,
|
|
7
|
+
MATERIAL_ALPHA,
|
|
8
|
+
MATERIAL_SHADING,
|
|
9
|
+
MATERIAL_SIDE
|
|
10
|
+
} from '../../interfaces/data/material/IMaterialAbstractData';
|
|
6
11
|
|
|
7
12
|
export abstract class AbstractMaterialData extends AbstractTreeNodeData implements IMaterialAbstractData {
|
|
8
|
-
// #region Properties (
|
|
13
|
+
// #region Properties (21)
|
|
9
14
|
|
|
10
15
|
#alphaCutoff: number = 0;
|
|
11
16
|
#alphaMap?: IMapData;
|
|
@@ -15,19 +20,21 @@ export abstract class AbstractMaterialData extends AbstractTreeNodeData implemen
|
|
|
15
20
|
#bumpMap?: IMapData;
|
|
16
21
|
#bumpScale: number = 1.0;
|
|
17
22
|
#color: Color = '#ffffff';
|
|
23
|
+
#depthTest?: boolean;
|
|
24
|
+
#depthWrite?: boolean;
|
|
18
25
|
#emissiveMap?: IMapData;
|
|
19
26
|
#emissiveness: Color = '#000000';
|
|
20
|
-
#materialOutput: boolean = false;
|
|
21
27
|
#map?: IMapData;
|
|
28
|
+
#materialOutput: boolean = false;
|
|
22
29
|
#name?: string;
|
|
23
30
|
#normalMap?: IMapData;
|
|
24
31
|
#normalScale: number = 1.0;
|
|
25
32
|
#opacity = 1.0;
|
|
26
33
|
#shading: MATERIAL_SHADING = MATERIAL_SHADING.SMOOTH;
|
|
27
34
|
#side: MATERIAL_SIDE = MATERIAL_SIDE.DOUBLE;
|
|
28
|
-
#
|
|
35
|
+
#transparent?: boolean;
|
|
29
36
|
|
|
30
|
-
// #endregion Properties (
|
|
37
|
+
// #endregion Properties (21)
|
|
31
38
|
|
|
32
39
|
// #region Constructors (1)
|
|
33
40
|
|
|
@@ -52,6 +59,8 @@ export abstract class AbstractMaterialData extends AbstractTreeNodeData implemen
|
|
|
52
59
|
if (properties.bumpMap !== undefined) this.bumpMap = properties.bumpMap;
|
|
53
60
|
if (properties.bumpScale !== undefined) this.bumpScale = properties.bumpScale;
|
|
54
61
|
if (properties.color !== undefined) this.color = properties.color;
|
|
62
|
+
if (properties.depthTest !== undefined) this.depthTest = properties.depthTest;
|
|
63
|
+
if (properties.depthWrite !== undefined) this.depthWrite = properties.depthWrite;
|
|
55
64
|
if (properties.emissiveMap !== undefined) this.emissiveMap = properties.emissiveMap;
|
|
56
65
|
if (properties.emissiveness !== undefined) this.emissiveness = properties.emissiveness;
|
|
57
66
|
if (properties.shading !== undefined) this.shading = properties.shading;
|
|
@@ -61,11 +70,12 @@ export abstract class AbstractMaterialData extends AbstractTreeNodeData implemen
|
|
|
61
70
|
if (properties.normalScale !== undefined) this.normalScale = properties.normalScale;
|
|
62
71
|
if (properties.opacity !== undefined) this.opacity = properties.opacity;
|
|
63
72
|
if (properties.side !== undefined) this.side = properties.side;
|
|
73
|
+
if (properties.transparent !== undefined) this.transparent = properties.transparent;
|
|
64
74
|
}
|
|
65
75
|
|
|
66
76
|
// #endregion Constructors (1)
|
|
67
77
|
|
|
68
|
-
// #region Public
|
|
78
|
+
// #region Public Getters And Setters (42)
|
|
69
79
|
|
|
70
80
|
public get alphaCutoff(): number {
|
|
71
81
|
return this.#alphaCutoff;
|
|
@@ -131,6 +141,22 @@ export abstract class AbstractMaterialData extends AbstractTreeNodeData implemen
|
|
|
131
141
|
this.#color = value;
|
|
132
142
|
}
|
|
133
143
|
|
|
144
|
+
public get depthTest(): boolean | undefined {
|
|
145
|
+
return this.#depthTest;
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
public set depthTest(value: boolean | undefined) {
|
|
149
|
+
this.#depthTest = value;
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
public get depthWrite(): boolean | undefined {
|
|
153
|
+
return this.#depthWrite;
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
public set depthWrite(value: boolean | undefined) {
|
|
157
|
+
this.#depthWrite = value;
|
|
158
|
+
}
|
|
159
|
+
|
|
134
160
|
public get emissiveMap(): IMapData | undefined {
|
|
135
161
|
return this.#emissiveMap;
|
|
136
162
|
}
|
|
@@ -210,31 +236,33 @@ export abstract class AbstractMaterialData extends AbstractTreeNodeData implemen
|
|
|
210
236
|
public set side(value: MATERIAL_SIDE) {
|
|
211
237
|
this.#side = value;
|
|
212
238
|
}
|
|
213
|
-
|
|
214
|
-
public get
|
|
215
|
-
return this.#
|
|
239
|
+
|
|
240
|
+
public get transparent(): boolean | undefined {
|
|
241
|
+
return this.#transparent;
|
|
216
242
|
}
|
|
217
243
|
|
|
218
|
-
|
|
244
|
+
public set transparent(value: boolean | undefined) {
|
|
245
|
+
this.#transparent = value;
|
|
246
|
+
}
|
|
219
247
|
|
|
220
|
-
// #
|
|
248
|
+
// #endregion Public Getters And Setters (42)
|
|
221
249
|
|
|
222
|
-
|
|
223
|
-
* Reset the material data.
|
|
224
|
-
*/
|
|
225
|
-
public abstract reset(): void;
|
|
250
|
+
// #region Public Abstract Methods (3)
|
|
226
251
|
|
|
227
252
|
/**
|
|
228
253
|
* Clones the scene graph data.
|
|
229
254
|
*/
|
|
230
255
|
public abstract clone(): IMaterialAbstractData;
|
|
231
|
-
|
|
232
256
|
/**
|
|
233
257
|
* Copy all properties of another material data object.
|
|
234
258
|
*
|
|
235
259
|
* @param source
|
|
236
260
|
*/
|
|
237
261
|
public abstract copy(source: IMaterialAbstractData): void;
|
|
262
|
+
/**
|
|
263
|
+
* Reset the material data.
|
|
264
|
+
*/
|
|
265
|
+
public abstract reset(): void;
|
|
238
266
|
|
|
239
|
-
// #endregion Public Abstract Methods (
|
|
267
|
+
// #endregion Public Abstract Methods (3)
|
|
240
268
|
}
|
|
@@ -4,13 +4,15 @@ import { IMapData, TEXTURE_FILTERING, TEXTURE_WRAPPING } from '../../interfaces/
|
|
|
4
4
|
import { Color } from '../../types';
|
|
5
5
|
|
|
6
6
|
export class MapData extends AbstractTreeNodeData implements IMapData {
|
|
7
|
-
// #region Properties (
|
|
7
|
+
// #region Properties (15)
|
|
8
8
|
|
|
9
|
+
#asData: boolean = false;
|
|
9
10
|
#blob?: Blob;
|
|
10
11
|
#center: vec2 = vec2.fromValues(0, 0);
|
|
11
12
|
#color?: Color;
|
|
13
|
+
#data?: number[];
|
|
12
14
|
#flipY: boolean = true;
|
|
13
|
-
#image: HTMLImageElement;
|
|
15
|
+
#image: HTMLImageElement | ArrayBuffer;
|
|
14
16
|
#magFilter: TEXTURE_FILTERING = TEXTURE_FILTERING.NONE;
|
|
15
17
|
#minFilter: TEXTURE_FILTERING = TEXTURE_FILTERING.NONE;
|
|
16
18
|
#offset: vec2 = vec2.fromValues(0, 0);
|
|
@@ -20,13 +22,15 @@ export class MapData extends AbstractTreeNodeData implements IMapData {
|
|
|
20
22
|
#wrapS: TEXTURE_WRAPPING = TEXTURE_WRAPPING.REPEAT;
|
|
21
23
|
#wrapT: TEXTURE_WRAPPING = TEXTURE_WRAPPING.REPEAT;
|
|
22
24
|
|
|
23
|
-
// #endregion Properties (
|
|
25
|
+
// #endregion Properties (15)
|
|
24
26
|
|
|
25
27
|
// #region Constructors (1)
|
|
26
28
|
|
|
27
29
|
constructor(
|
|
28
|
-
image: HTMLImageElement,
|
|
30
|
+
image: HTMLImageElement | ArrayBuffer,
|
|
29
31
|
properties?: {
|
|
32
|
+
asData?: boolean,
|
|
33
|
+
data?: number[],
|
|
30
34
|
blob?: Blob,
|
|
31
35
|
wrapS?: TEXTURE_WRAPPING,
|
|
32
36
|
wrapT?: TEXTURE_WRAPPING,
|
|
@@ -45,6 +49,8 @@ export class MapData extends AbstractTreeNodeData implements IMapData {
|
|
|
45
49
|
) {
|
|
46
50
|
super(id, version);
|
|
47
51
|
this.#image = image;
|
|
52
|
+
this.#asData = properties && properties.asData !== undefined ? properties.asData : false;
|
|
53
|
+
this.#data = properties ? properties.data : undefined;
|
|
48
54
|
this.#blob = properties ? properties.blob : undefined;
|
|
49
55
|
this.#wrapS = properties && properties.wrapS !== undefined ? properties.wrapS : TEXTURE_WRAPPING.REPEAT;
|
|
50
56
|
this.#wrapT = properties && properties.wrapT !== undefined ? properties.wrapT : TEXTURE_WRAPPING.REPEAT;
|
|
@@ -61,7 +67,15 @@ export class MapData extends AbstractTreeNodeData implements IMapData {
|
|
|
61
67
|
|
|
62
68
|
// #endregion Constructors (1)
|
|
63
69
|
|
|
64
|
-
// #region Public
|
|
70
|
+
// #region Public Getters And Setters (30)
|
|
71
|
+
|
|
72
|
+
public get asData(): boolean {
|
|
73
|
+
return this.#asData;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
public set asData(value: boolean) {
|
|
77
|
+
this.#asData = value;
|
|
78
|
+
}
|
|
65
79
|
|
|
66
80
|
public get blob(): Blob | undefined {
|
|
67
81
|
return this.#blob;
|
|
@@ -87,6 +101,14 @@ export class MapData extends AbstractTreeNodeData implements IMapData {
|
|
|
87
101
|
this.#color = value;
|
|
88
102
|
}
|
|
89
103
|
|
|
104
|
+
public get data(): number[] | undefined {
|
|
105
|
+
return this.#data;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
public set data(value: number[] | undefined) {
|
|
109
|
+
this.#data = value;
|
|
110
|
+
}
|
|
111
|
+
|
|
90
112
|
public get flipY(): boolean {
|
|
91
113
|
return this.#flipY;
|
|
92
114
|
}
|
|
@@ -95,11 +117,11 @@ export class MapData extends AbstractTreeNodeData implements IMapData {
|
|
|
95
117
|
this.#flipY = value;
|
|
96
118
|
}
|
|
97
119
|
|
|
98
|
-
public get image(): HTMLImageElement {
|
|
120
|
+
public get image(): HTMLImageElement | ArrayBuffer {
|
|
99
121
|
return this.#image;
|
|
100
122
|
}
|
|
101
123
|
|
|
102
|
-
public set image(value: HTMLImageElement) {
|
|
124
|
+
public set image(value: HTMLImageElement | ArrayBuffer) {
|
|
103
125
|
this.#image = value;
|
|
104
126
|
}
|
|
105
127
|
|
|
@@ -167,7 +189,7 @@ export class MapData extends AbstractTreeNodeData implements IMapData {
|
|
|
167
189
|
this.#wrapT = value;
|
|
168
190
|
}
|
|
169
191
|
|
|
170
|
-
// #endregion Public
|
|
192
|
+
// #endregion Public Getters And Setters (30)
|
|
171
193
|
|
|
172
194
|
// #region Public Methods (1)
|
|
173
195
|
|
|
@@ -175,6 +197,8 @@ export class MapData extends AbstractTreeNodeData implements IMapData {
|
|
|
175
197
|
return new MapData(
|
|
176
198
|
<HTMLImageElement>this.image,
|
|
177
199
|
{
|
|
200
|
+
asData: this.asData,
|
|
201
|
+
data: this.data,
|
|
178
202
|
blob: this.blob,
|
|
179
203
|
wrapS: this.wrapS,
|
|
180
204
|
wrapT: this.wrapT,
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { AbstractMaterialData } from './AbstractMaterialData';
|
|
2
|
+
import { IMaterialBasicLineData, IMaterialBasicLineDataProperties } from '../../interfaces/data/material/IMaterialBasicLineData';
|
|
3
|
+
import { MATERIAL_ALPHA, MATERIAL_SHADING, MATERIAL_SIDE } from '../../interfaces/data/material/IMaterialAbstractData';
|
|
4
|
+
|
|
5
|
+
export class MaterialBasicLineData extends AbstractMaterialData implements IMaterialBasicLineData {
|
|
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?: IMaterialBasicLineDataProperties,
|
|
16
|
+
id?: string,
|
|
17
|
+
version?: string
|
|
18
|
+
) {
|
|
19
|
+
super(properties, id, version);
|
|
20
|
+
if (!properties) return;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
// #endregion Constructors (1)
|
|
24
|
+
|
|
25
|
+
// #region Public Methods (3)
|
|
26
|
+
|
|
27
|
+
public clone(): IMaterialBasicLineData {
|
|
28
|
+
return new MaterialBasicLineData({
|
|
29
|
+
alphaMap: this.alphaMap,
|
|
30
|
+
alphaCutoff: this.alphaCutoff,
|
|
31
|
+
alphaMode: this.alphaMode,
|
|
32
|
+
aoMap: this.aoMap,
|
|
33
|
+
aoMapIntensity: this.aoMapIntensity,
|
|
34
|
+
bumpMap: this.bumpMap,
|
|
35
|
+
bumpScale: this.bumpScale,
|
|
36
|
+
color: this.color,
|
|
37
|
+
depthTest: this.depthTest,
|
|
38
|
+
depthWrite: this.depthWrite,
|
|
39
|
+
emissiveMap: this.emissiveMap,
|
|
40
|
+
emissiveness: this.emissiveness,
|
|
41
|
+
shading: this.shading,
|
|
42
|
+
map: this.map,
|
|
43
|
+
name: this.name,
|
|
44
|
+
normalMap: this.normalMap,
|
|
45
|
+
normalScale: this.normalScale,
|
|
46
|
+
opacity: this.opacity,
|
|
47
|
+
side: this.side,
|
|
48
|
+
transparent: this.transparent
|
|
49
|
+
}, this.id, this.version);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
public copy(source: MaterialBasicLineData): void {
|
|
53
|
+
this.alphaCutoff = source.alphaCutoff;
|
|
54
|
+
this.alphaMap = source.alphaMap;
|
|
55
|
+
this.alphaMode = source.alphaMode;
|
|
56
|
+
this.aoMap = source.aoMap;
|
|
57
|
+
this.aoMapIntensity = source.aoMapIntensity;
|
|
58
|
+
this.bumpMap = source.bumpMap;
|
|
59
|
+
this.bumpScale = source.bumpScale;
|
|
60
|
+
this.color = source.color;
|
|
61
|
+
this.depthTest = source.depthTest;
|
|
62
|
+
this.depthWrite = source.depthWrite;
|
|
63
|
+
this.emissiveMap = source.emissiveMap;
|
|
64
|
+
this.emissiveness = source.emissiveness;
|
|
65
|
+
this.materialOutput = source.materialOutput;
|
|
66
|
+
this.map = source.map;
|
|
67
|
+
this.normalMap = source.normalMap;
|
|
68
|
+
this.normalScale = source.normalScale;
|
|
69
|
+
this.opacity = source.opacity;
|
|
70
|
+
this.shading = source.shading;
|
|
71
|
+
this.side = source.side;
|
|
72
|
+
this.transparent = source.transparent;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
public reset(): void {
|
|
76
|
+
this.alphaCutoff = 0;
|
|
77
|
+
this.alphaMap = undefined;
|
|
78
|
+
this.alphaMode = MATERIAL_ALPHA.OPAQUE;
|
|
79
|
+
this.aoMap = undefined;
|
|
80
|
+
this.aoMapIntensity = 1.0;
|
|
81
|
+
this.bumpMap = undefined;
|
|
82
|
+
this.bumpScale = 1.0;
|
|
83
|
+
this.color = '#ffffff';
|
|
84
|
+
this.depthTest = undefined;
|
|
85
|
+
this.depthWrite = undefined;
|
|
86
|
+
this.emissiveMap = undefined;
|
|
87
|
+
this.emissiveness = '#000000';
|
|
88
|
+
this.materialOutput = false;
|
|
89
|
+
this.map = undefined;
|
|
90
|
+
this.normalMap = undefined;
|
|
91
|
+
this.normalScale = 1.0;
|
|
92
|
+
this.opacity = 1.0;
|
|
93
|
+
this.shading = MATERIAL_SHADING.SMOOTH;
|
|
94
|
+
this.side = MATERIAL_SIDE.DOUBLE;
|
|
95
|
+
this.transparent = undefined;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
// #endregion Public Methods (3)
|
|
99
|
+
}
|
|
@@ -198,6 +198,8 @@ export class MaterialGemData extends AbstractMaterialData implements IMaterialGe
|
|
|
198
198
|
bumpMap: this.bumpMap,
|
|
199
199
|
bumpScale: this.bumpScale,
|
|
200
200
|
color: this.color,
|
|
201
|
+
depthTest: this.depthTest,
|
|
202
|
+
depthWrite: this.depthWrite,
|
|
201
203
|
emissiveMap: this.emissiveMap,
|
|
202
204
|
emissiveness: this.emissiveness,
|
|
203
205
|
shading: this.shading,
|
|
@@ -207,6 +209,7 @@ export class MaterialGemData extends AbstractMaterialData implements IMaterialGe
|
|
|
207
209
|
normalScale: this.normalScale,
|
|
208
210
|
opacity: this.opacity,
|
|
209
211
|
side: this.side,
|
|
212
|
+
transparent: this.transparent,
|
|
210
213
|
refractionIndex: this.refractionIndex,
|
|
211
214
|
impurityMap: this.impurityMap,
|
|
212
215
|
impurityScale: this.impurityScale,
|
|
@@ -234,6 +237,8 @@ export class MaterialGemData extends AbstractMaterialData implements IMaterialGe
|
|
|
234
237
|
this.bumpMap = source.bumpMap;
|
|
235
238
|
this.bumpScale = source.bumpScale;
|
|
236
239
|
this.color = source.color;
|
|
240
|
+
this.depthTest = source.depthTest;
|
|
241
|
+
this.depthWrite = source.depthWrite;
|
|
237
242
|
this.emissiveMap = source.emissiveMap;
|
|
238
243
|
this.emissiveness = source.emissiveness;
|
|
239
244
|
this.materialOutput = source.materialOutput;
|
|
@@ -243,21 +248,22 @@ export class MaterialGemData extends AbstractMaterialData implements IMaterialGe
|
|
|
243
248
|
this.opacity = source.opacity;
|
|
244
249
|
this.shading = source.shading;
|
|
245
250
|
this.side = source.side;
|
|
251
|
+
this.transparent = source.transparent;
|
|
246
252
|
|
|
247
|
-
this.refractionIndex =
|
|
248
|
-
this.impurityMap =
|
|
249
|
-
this.impurityScale =
|
|
250
|
-
this.colorTransferBegin =
|
|
251
|
-
this.colorTransferEnd =
|
|
252
|
-
this.center =
|
|
253
|
-
this.tracingDepth =
|
|
254
|
-
this.radius =
|
|
255
|
-
this.sphericalNormalMap =
|
|
256
|
-
this.gamma =
|
|
257
|
-
this.contrast =
|
|
258
|
-
this.brightness =
|
|
259
|
-
this.dispersion =
|
|
260
|
-
this.tracingOpacity =
|
|
253
|
+
this.refractionIndex = source.refractionIndex;
|
|
254
|
+
this.impurityMap = source.impurityMap;
|
|
255
|
+
this.impurityScale = source.impurityScale;
|
|
256
|
+
this.colorTransferBegin = source.colorTransferBegin;
|
|
257
|
+
this.colorTransferEnd = source.colorTransferEnd;
|
|
258
|
+
this.center = source.center;
|
|
259
|
+
this.tracingDepth = source.tracingDepth;
|
|
260
|
+
this.radius = source.radius;
|
|
261
|
+
this.sphericalNormalMap = source.sphericalNormalMap;
|
|
262
|
+
this.gamma = source.gamma;
|
|
263
|
+
this.contrast = source.contrast;
|
|
264
|
+
this.brightness = source.brightness;
|
|
265
|
+
this.dispersion = source.dispersion;
|
|
266
|
+
this.tracingOpacity = source.tracingOpacity;
|
|
261
267
|
this.envMap = source.envMap;
|
|
262
268
|
}
|
|
263
269
|
|
|
@@ -270,6 +276,8 @@ export class MaterialGemData extends AbstractMaterialData implements IMaterialGe
|
|
|
270
276
|
this.bumpMap = undefined;
|
|
271
277
|
this.bumpScale = 1.0;
|
|
272
278
|
this.color = '#ffffff';
|
|
279
|
+
this.depthTest = undefined;
|
|
280
|
+
this.depthWrite = undefined;
|
|
273
281
|
this.emissiveMap = undefined;
|
|
274
282
|
this.emissiveness = '#000000';
|
|
275
283
|
this.materialOutput = false;
|
|
@@ -279,6 +287,7 @@ export class MaterialGemData extends AbstractMaterialData implements IMaterialGe
|
|
|
279
287
|
this.opacity = 1.0;
|
|
280
288
|
this.shading = MATERIAL_SHADING.SMOOTH;
|
|
281
289
|
this.side = MATERIAL_SIDE.DOUBLE;
|
|
290
|
+
this.transparent = undefined;
|
|
282
291
|
|
|
283
292
|
this.refractionIndex = 2.4;
|
|
284
293
|
this.impurityMap = undefined;
|