@shapediver/viewer.shared.types 3.2.1 → 3.2.2

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.
Files changed (55) hide show
  1. package/dist/index.d.ts +12 -12
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +2 -2
  4. package/dist/index.js.map +1 -1
  5. package/dist/interfaces/data/material/IMapData.d.ts +23 -18
  6. package/dist/interfaces/data/material/IMapData.d.ts.map +1 -1
  7. package/dist/interfaces/data/material/IMapData.js +10 -7
  8. package/dist/interfaces/data/material/IMapData.js.map +1 -1
  9. package/dist/interfaces/data/material/IMaterialAbstractData.d.ts +20 -38
  10. package/dist/interfaces/data/material/IMaterialAbstractData.d.ts.map +1 -1
  11. package/dist/interfaces/data/material/IMaterialAbstractData.js +4 -4
  12. package/dist/interfaces/data/material/IMaterialAbstractData.js.map +1 -1
  13. package/dist/interfaces/data/material/IMaterialBasicLineData.d.ts +2 -1
  14. package/dist/interfaces/data/material/IMaterialBasicLineData.d.ts.map +1 -1
  15. package/dist/interfaces/data/material/IMaterialBasicLineData.js.map +1 -1
  16. package/dist/interfaces/data/material/IMaterialGemDataProperties.d.ts +13 -25
  17. package/dist/interfaces/data/material/IMaterialGemDataProperties.d.ts.map +1 -1
  18. package/dist/interfaces/data/material/IMaterialGemDataProperties.js +1 -1
  19. package/dist/interfaces/data/material/IMaterialGemDataProperties.js.map +1 -1
  20. package/dist/interfaces/data/material/IMaterialMultiPointData.d.ts +24 -63
  21. package/dist/interfaces/data/material/IMaterialMultiPointData.d.ts.map +1 -1
  22. package/dist/interfaces/data/material/IMaterialMultiPointData.js.map +1 -1
  23. package/dist/interfaces/data/material/IMaterialPointData.d.ts +9 -7
  24. package/dist/interfaces/data/material/IMaterialPointData.d.ts.map +1 -1
  25. package/dist/interfaces/data/material/IMaterialPointData.js +1 -0
  26. package/dist/interfaces/data/material/IMaterialPointData.js.map +1 -1
  27. package/dist/interfaces/data/material/IMaterialShadowData.d.ts +3 -3
  28. package/dist/interfaces/data/material/IMaterialShadowData.d.ts.map +1 -1
  29. package/dist/interfaces/data/material/IMaterialShadowData.js +1 -1
  30. package/dist/interfaces/data/material/IMaterialShadowData.js.map +1 -1
  31. package/dist/interfaces/data/material/IMaterialSpecularGlossinessDataProperties.d.ts +14 -17
  32. package/dist/interfaces/data/material/IMaterialSpecularGlossinessDataProperties.d.ts.map +1 -1
  33. package/dist/interfaces/data/material/IMaterialSpecularGlossinessDataProperties.js +1 -1
  34. package/dist/interfaces/data/material/IMaterialSpecularGlossinessDataProperties.js.map +1 -1
  35. package/dist/interfaces/data/material/IMaterialStandardData.d.ts +23 -50
  36. package/dist/interfaces/data/material/IMaterialStandardData.d.ts.map +1 -1
  37. package/dist/interfaces/data/material/IMaterialStandardData.js +1 -1
  38. package/dist/interfaces/data/material/IMaterialStandardData.js.map +1 -1
  39. package/dist/interfaces/data/material/IMaterialUnlitData.d.ts +9 -6
  40. package/dist/interfaces/data/material/IMaterialUnlitData.d.ts.map +1 -1
  41. package/dist/interfaces/data/material/IMaterialUnlitData.js +1 -1
  42. package/dist/interfaces/data/material/IMaterialUnlitData.js.map +1 -1
  43. package/dist/interfaces/parameter/IInteractionParameterSettings.d.ts +36 -36
  44. package/package.json +5 -5
  45. package/src/index.ts +38 -21
  46. package/src/interfaces/data/material/IMapData.ts +40 -23
  47. package/src/interfaces/data/material/IMaterialAbstractData.ts +32 -45
  48. package/src/interfaces/data/material/IMaterialBasicLineData.ts +4 -3
  49. package/src/interfaces/data/material/IMaterialGemDataProperties.ts +26 -35
  50. package/src/interfaces/data/material/IMaterialMultiPointData.ts +28 -68
  51. package/src/interfaces/data/material/IMaterialPointData.ts +19 -14
  52. package/src/interfaces/data/material/IMaterialShadowData.ts +12 -4
  53. package/src/interfaces/data/material/IMaterialSpecularGlossinessDataProperties.ts +25 -25
  54. package/src/interfaces/data/material/IMaterialStandardData.ts +34 -58
  55. package/src/interfaces/data/material/IMaterialUnlitData.ts +19 -13
@@ -1,33 +1,34 @@
1
+ import { Color } from '../../../types';
1
2
  import { ITreeNodeData } from '@shapediver/viewer.shared.node-tree';
2
3
  import { vec2 } from 'gl-matrix';
3
- import { Color } from '../../../types';
4
4
 
5
- export enum TEXTURE_WRAPPING {
6
- REPEAT = 10497,
7
- CLAMP_TO_EDGE = 33071,
8
- MIRRORED_REPEAT = 33648
9
- }
5
+ // #region Type aliases (2)
10
6
 
11
- export enum TEXTURE_FILTERING {
12
- NONE = 0,
13
- NEAREST = 9728,
14
- LINEAR = 9729,
15
- NEAREST_MIPMAP_NEAREST = 9984,
16
- LINEAR_MIPMAP_NEAREST = 9985,
17
- NEAREST_MIPMAP_LINEAR = 9986,
18
- LINEAR_MIPMAP_LINEAR = 9987,
7
+ export type IMapDataProperties = IMapDataPropertiesGeneric<HTMLImageElement | ArrayBuffer>;
8
+ export type IMapDataPropertiesDefinition = Partial<IMapDataPropertiesGeneric<HTMLImageElement | ArrayBuffer | string>>;
9
+
10
+ // #endregion Type aliases (2)
11
+
12
+ // #region Interfaces (2)
13
+
14
+ export interface IMapData extends ITreeNodeData, IMapDataProperties {
15
+ // #region Public Methods (1)
16
+
17
+ clone(): IMapData;
18
+
19
+ // #endregion Public Methods (1)
19
20
  }
20
21
 
21
- export interface IMapData extends ITreeNodeData {
22
- // #region Properties (11)
22
+ interface IMapDataPropertiesGeneric<T> {
23
+ // #region Properties (15)
23
24
 
24
25
  asData?: boolean;
25
- data?: number[];
26
26
  blob?: Blob;
27
27
  center: vec2;
28
28
  color?: Color;
29
+ data?: number[];
29
30
  flipY: boolean;
30
- image: HTMLImageElement | ArrayBuffer;
31
+ image: T;
31
32
  magFilter: TEXTURE_FILTERING;
32
33
  minFilter: TEXTURE_FILTERING;
33
34
  offset: vec2;
@@ -37,11 +38,27 @@ export interface IMapData extends ITreeNodeData {
37
38
  wrapS: TEXTURE_WRAPPING;
38
39
  wrapT: TEXTURE_WRAPPING;
39
40
 
40
- // #endregion Properties (11)
41
+ // #endregion Properties (15)
42
+ }
41
43
 
42
- // #region Public Methods (1)
44
+ // #endregion Interfaces (2)
43
45
 
44
- clone(): IMapData;
46
+ // #region Enums (2)
45
47
 
46
- // #endregion Public Methods (1)
47
- }
48
+ export enum TEXTURE_FILTERING {
49
+ NONE = 0,
50
+ NEAREST = 9728,
51
+ LINEAR = 9729,
52
+ NEAREST_MIPMAP_NEAREST = 9984,
53
+ LINEAR_MIPMAP_NEAREST = 9985,
54
+ NEAREST_MIPMAP_LINEAR = 9986,
55
+ LINEAR_MIPMAP_LINEAR = 9987,
56
+ }
57
+
58
+ export enum TEXTURE_WRAPPING {
59
+ REPEAT = 10497,
60
+ CLAMP_TO_EDGE = 33071,
61
+ MIRRORED_REPEAT = 33648
62
+ }
63
+
64
+ // #endregion Enums (2)
@@ -1,35 +1,22 @@
1
1
  import { Color } from '../../../types';
2
- import { IMapData } from './IMapData';
2
+ import { IMapData, IMapDataPropertiesDefinition } from './IMapData';
3
3
  import { ITreeNodeData } from '@shapediver/viewer.shared.node-tree';
4
4
 
5
+ // #region Type aliases (2)
6
+
7
+ export type IMaterialAbstractDataProperties = Partial<IMaterialAbstractDataPropertiesGeneric<IMapData>>;
8
+ export type IMaterialAbstractDataPropertiesDefinition = Partial<IMaterialAbstractDataPropertiesGeneric<IMapDataPropertiesDefinition>>;
9
+
10
+ // #endregion Type aliases (2)
11
+
5
12
  // #region Interfaces (2)
6
13
 
7
- export interface IMaterialAbstractData extends ITreeNodeData {
8
- // #region Properties (21)
14
+ export interface IMaterialAbstractData extends ITreeNodeData, IMaterialAbstractDataPropertiesGeneric<IMapData> {
15
+ // #region Properties (1)
9
16
 
10
- alphaCutoff: number,
11
- alphaMap?: IMapData,
12
- alphaMode: MATERIAL_ALPHA,
13
- aoMap?: IMapData,
14
- aoMapIntensity: number,
15
- bumpMap?: IMapData,
16
- bumpScale: number,
17
- color: Color,
18
- depthTest?: boolean,
19
- depthWrite?: boolean,
20
- emissiveMap?: IMapData,
21
- emissiveness: Color,
22
- map?: IMapData,
23
17
  materialOutput: boolean;
24
- name?: string,
25
- normalMap?: IMapData,
26
- normalScale: number,
27
- opacity: number,
28
- shading: MATERIAL_SHADING,
29
- side: MATERIAL_SIDE,
30
- transparent?: boolean,
31
18
 
32
- // #endregion Properties (21)
19
+ // #endregion Properties (1)
33
20
 
34
21
  // #region Public Methods (3)
35
22
 
@@ -40,28 +27,28 @@ export interface IMaterialAbstractData extends ITreeNodeData {
40
27
  // #endregion Public Methods (3)
41
28
  }
42
29
 
43
- export interface IMaterialAbstractDataProperties {
30
+ export interface IMaterialAbstractDataPropertiesGeneric<T> {
44
31
  // #region Properties (21)
45
32
 
46
- alphaCutoff?: number,
47
- alphaMap?: IMapData,
48
- alphaMode?: MATERIAL_ALPHA,
49
- aoMap?: IMapData,
50
- aoMapIntensity?: number,
51
- bumpMap?: IMapData,
52
- bumpScale?: number,
53
- color?: Color,
33
+ alphaCutoff: number,
34
+ alphaMap?: T,
35
+ alphaMode: MATERIAL_ALPHA,
36
+ aoMap?: T,
37
+ aoMapIntensity: number,
38
+ bumpMap?: T,
39
+ bumpScale: number,
40
+ color: Color,
54
41
  depthTest?: boolean,
55
42
  depthWrite?: boolean,
56
- emissiveMap?: IMapData,
57
- emissiveness?: Color,
58
- map?: IMapData,
43
+ emissiveMap?: T,
44
+ emissiveness: Color,
45
+ map?: T,
59
46
  name?: string,
60
- normalMap?: IMapData,
61
- normalScale?: number,
62
- opacity?: number,
63
- shading?: MATERIAL_SHADING,
64
- side?: MATERIAL_SIDE,
47
+ normalMap?: T,
48
+ normalScale: number,
49
+ opacity: number,
50
+ shading: MATERIAL_SHADING,
51
+ side: MATERIAL_SIDE,
65
52
  transparent?: boolean,
66
53
  type?: MATERIAL_TYPE
67
54
 
@@ -90,10 +77,10 @@ export enum MATERIAL_SIDE {
90
77
  }
91
78
 
92
79
  export enum MATERIAL_TYPE {
93
- STANDARD = 'Standard',
94
- SPECULAR_GLOSSINESS = 'SpecularGlossiness',
95
- UNLIT = 'Unlit',
96
- GEM = 'Gem'
80
+ STANDARD = 'standard',
81
+ SPECULAR_GLOSSINESS = 'specular_glossiness',
82
+ UNLIT = 'unlit',
83
+ GEM = 'gem'
97
84
  }
98
85
 
99
86
  // #endregion Enums (4)
@@ -1,10 +1,11 @@
1
- import { IMaterialAbstractData, IMaterialAbstractDataProperties } from './IMaterialAbstractData';
1
+ import { IMaterialAbstractData, IMaterialAbstractDataProperties, IMaterialAbstractDataPropertiesDefinition } from './IMaterialAbstractData';
2
2
 
3
- // #region Type aliases (1)
3
+ // #region Type aliases (2)
4
4
 
5
5
  export type IMaterialBasicLineDataProperties = IMaterialAbstractDataProperties;
6
+ export type IMaterialBasicLineDataPropertiesDefinition = IMaterialAbstractDataPropertiesDefinition;
6
7
 
7
- // #endregion Type aliases (1)
8
+ // #endregion Type aliases (2)
8
9
 
9
10
  // #region Interfaces (1)
10
11
 
@@ -1,32 +1,28 @@
1
- import { mat3, mat4, vec3 } from "gl-matrix";
2
- import { Color } from "../../../types";
3
- import { IMapData } from "./IMapData";
4
- import { IMaterialAbstractData, IMaterialAbstractDataProperties } from "./IMaterialAbstractData";
1
+ import { Color } from '../../../types';
2
+ import { IMapData, IMapDataPropertiesDefinition } from './IMapData';
3
+ import { IMaterialAbstractData, IMaterialAbstractDataPropertiesGeneric } from './IMaterialAbstractData';
4
+ import { vec3 } from 'gl-matrix';
5
5
 
6
- export interface IMaterialGemDataProperties extends IMaterialAbstractDataProperties {
7
- // #region Properties (17)
6
+ // #region Type aliases (2)
8
7
 
9
- brightness?: number;
10
- center?: vec3;
11
- colorTransferBegin?: Color;
12
- colorTransferEnd?: Color;
13
- contrast?: number;
14
- dispersion?: number;
15
- envMap?: string | string[];
16
- gamma?: number;
17
- impurityMap?: IMapData;
18
- impurityScale?: number;
19
- radius?: number;
20
- refractionIndex?: number;
21
- sphericalNormalMap?: IMapData;
22
- tracingDepth?: number;
23
- tracingOpacity?: number;
8
+ export type IMaterialGemDataProperties = Partial<IMaterialGemDataPropertiesGeneric<IMapData>>;
9
+ export type IMaterialGemDataPropertiesDefinition = Partial<IMaterialGemDataPropertiesGeneric<IMapDataPropertiesDefinition>>;
24
10
 
25
- // #endregion Properties (17)
26
- };
11
+ // #endregion Type aliases (2)
27
12
 
28
- export interface IMaterialGemData extends IMaterialAbstractData {
29
- // #region Properties (17)
13
+ // #region Interfaces (2)
14
+
15
+ export interface IMaterialGemData extends IMaterialAbstractData, IMaterialGemDataPropertiesGeneric<IMapData> {
16
+ // #region Public Methods (2)
17
+
18
+ clone(): IMaterialGemData;
19
+ copy(source: IMaterialGemData): void;
20
+
21
+ // #endregion Public Methods (2)
22
+ }
23
+
24
+ interface IMaterialGemDataPropertiesGeneric<T> extends IMaterialAbstractDataPropertiesGeneric<T> {
25
+ // #region Properties (15)
30
26
 
31
27
  brightness?: number;
32
28
  center?: vec3;
@@ -36,20 +32,15 @@ export interface IMaterialGemData extends IMaterialAbstractData {
36
32
  dispersion?: number;
37
33
  envMap?: string | string[];
38
34
  gamma?: number;
39
- impurityMap?: IMapData;
35
+ impurityMap?: T;
40
36
  impurityScale?: number;
41
37
  radius?: number;
42
38
  refractionIndex?: number;
43
- sphericalNormalMap?: IMapData;
39
+ sphericalNormalMap?: T;
44
40
  tracingDepth?: number;
45
41
  tracingOpacity?: number;
46
42
 
47
- // #endregion Properties (17)
43
+ // #endregion Properties (15)
44
+ }
48
45
 
49
- // #region Public Methods (2)
50
-
51
- clone(): IMaterialGemData;
52
- copy(source: IMaterialGemData): void;
53
-
54
- // #endregion Public Methods (2)
55
- }
46
+ // #endregion Interfaces (2)
@@ -1,57 +1,17 @@
1
1
  import { Color } from '../../../types';
2
- import { IMapData } from './IMapData';
3
- import { IMaterialAbstractData, IMaterialAbstractDataProperties } from './IMaterialAbstractData';
2
+ import { IMapData, IMapDataPropertiesDefinition } from './IMapData';
3
+ import { IMaterialAbstractData, IMaterialAbstractDataPropertiesGeneric } from './IMaterialAbstractData';
4
4
 
5
- // #region Interfaces (2)
5
+ // #region Type aliases (2)
6
6
 
7
- export interface IMaterialMultiPointData extends IMaterialAbstractData {
8
- // #region Properties (20)
7
+ export type IMaterialMultiPointDataProperties = Partial<IMaterialMultiPointDataPropertiesGeneric<IMapData>>;
8
+ export type IMaterialMultiPointDataPropertiesDefinition = Partial<IMaterialMultiPointDataPropertiesGeneric<IMapDataPropertiesDefinition>>;
9
9
 
10
- alphaMap_0?: IMapData;
11
- alphaMap_1?: IMapData;
12
- alphaMap_2?: IMapData;
13
- alphaMap_3?: IMapData;
14
- alphaMap_4?: IMapData;
15
- alphaMap_5?: IMapData;
16
- alphaMap_6?: IMapData;
17
- alphaMap_7?: IMapData;
18
- color_0?: Color;
19
- color_1?: Color;
20
- color_2?: Color;
21
- color_3?: Color;
22
- color_4?: Color;
23
- color_5?: Color;
24
- color_6?: Color;
25
- color_7?: Color;
26
- map_0?: IMapData;
27
- map_1?: IMapData;
28
- map_2?: IMapData;
29
- map_3?: IMapData;
30
- map_4?: IMapData;
31
- map_5?: IMapData;
32
- map_6?: IMapData;
33
- map_7?: IMapData;
34
- materialIndexDataMap?: IMapData;
35
- materialIndexDataMapSize?: number;
36
- sizeAttenuation_0?: boolean;
37
- sizeAttenuation_1?: boolean;
38
- sizeAttenuation_2?: boolean;
39
- sizeAttenuation_3?: boolean;
40
- sizeAttenuation_4?: boolean;
41
- sizeAttenuation_5?: boolean;
42
- sizeAttenuation_6?: boolean;
43
- sizeAttenuation_7?: boolean;
44
- size_0?: number;
45
- size_1?: number;
46
- size_2?: number;
47
- size_3?: number;
48
- size_4?: number;
49
- size_5?: number;
50
- size_6?: number;
51
- size_7?: number;
10
+ // #endregion Type aliases (2)
52
11
 
53
- // #endregion Properties (20)
12
+ // #region Interfaces (2)
54
13
 
14
+ export interface IMaterialMultiPointData extends IMaterialAbstractData, IMaterialMultiPointDataPropertiesGeneric<IMapData> {
55
15
  // #region Public Methods (2)
56
16
 
57
17
  clone(): IMaterialMultiPointData;
@@ -60,17 +20,17 @@ export interface IMaterialMultiPointData extends IMaterialAbstractData {
60
20
  // #endregion Public Methods (2)
61
21
  }
62
22
 
63
- export interface IMaterialMultiPointDataProperties extends IMaterialAbstractDataProperties {
64
- // #region Properties (20)
23
+ interface IMaterialMultiPointDataPropertiesGeneric<T> extends IMaterialAbstractDataPropertiesGeneric<T> {
24
+ // #region Properties (42)
65
25
 
66
- alphaMap_0?: IMapData;
67
- alphaMap_1?: IMapData;
68
- alphaMap_2?: IMapData;
69
- alphaMap_3?: IMapData;
70
- alphaMap_4?: IMapData;
71
- alphaMap_5?: IMapData;
72
- alphaMap_6?: IMapData;
73
- alphaMap_7?: IMapData;
26
+ alphaMap_0?: T;
27
+ alphaMap_1?: T;
28
+ alphaMap_2?: T;
29
+ alphaMap_3?: T;
30
+ alphaMap_4?: T;
31
+ alphaMap_5?: T;
32
+ alphaMap_6?: T;
33
+ alphaMap_7?: T;
74
34
  color_0?: Color;
75
35
  color_1?: Color;
76
36
  color_2?: Color;
@@ -79,15 +39,15 @@ export interface IMaterialMultiPointDataProperties extends IMaterialAbstractData
79
39
  color_5?: Color;
80
40
  color_6?: Color;
81
41
  color_7?: Color;
82
- map_0?: IMapData;
83
- map_1?: IMapData;
84
- map_2?: IMapData;
85
- map_3?: IMapData;
86
- map_4?: IMapData;
87
- map_5?: IMapData;
88
- map_6?: IMapData;
89
- map_7?: IMapData;
90
- materialIndexDataMap?: IMapData;
42
+ map_0?: T;
43
+ map_1?: T;
44
+ map_2?: T;
45
+ map_3?: T;
46
+ map_4?: T;
47
+ map_5?: T;
48
+ map_6?: T;
49
+ map_7?: T;
50
+ materialIndexDataMap?: T;
91
51
  materialIndexDataMapSize?: number;
92
52
  sizeAttenuation_0?: boolean;
93
53
  sizeAttenuation_1?: boolean;
@@ -106,7 +66,7 @@ export interface IMaterialMultiPointDataProperties extends IMaterialAbstractData
106
66
  size_6?: number;
107
67
  size_7?: number;
108
68
 
109
- // #endregion Properties (20)
69
+ // #endregion Properties (42)
110
70
  }
111
71
 
112
72
  // #endregion Interfaces (2)
@@ -1,26 +1,31 @@
1
- import { IMaterialAbstractData, IMaterialAbstractDataProperties } from './IMaterialAbstractData';
1
+ import { IMapData, IMapDataPropertiesDefinition } from './IMapData';
2
+ import { IMaterialAbstractData, IMaterialAbstractDataPropertiesGeneric } from './IMaterialAbstractData';
2
3
 
3
- export interface IMaterialPointDataProperties extends IMaterialAbstractDataProperties {
4
- // #region Properties (2)
4
+ // #region Type aliases (2)
5
5
 
6
- size?: number,
7
- sizeAttenuation?: boolean
6
+ export type IMaterialPointDataProperties = Partial<IMaterialPointDataPropertiesGeneric<IMapData>>;
7
+ export type IMaterialPointDataPropertiesDefinition = Partial<IMaterialPointDataPropertiesGeneric<IMapDataPropertiesDefinition>>;
8
8
 
9
- // #endregion Properties (2)
9
+ // #endregion Type aliases (2)
10
+
11
+ // #region Interfaces (2)
12
+
13
+ export interface IMaterialPointData extends IMaterialPointDataPropertiesGeneric<IMapData>, IMaterialAbstractData {
14
+ // #region Public Methods (2)
15
+
16
+ clone(): IMaterialPointData;
17
+ copy(source: IMaterialPointData): void;
18
+
19
+ // #endregion Public Methods (2)
10
20
  }
11
21
 
12
- export interface IMaterialPointData extends IMaterialAbstractData {
22
+ interface IMaterialPointDataPropertiesGeneric<T> extends IMaterialAbstractDataPropertiesGeneric<T> {
13
23
  // #region Properties (2)
14
24
 
15
25
  size?: number,
16
26
  sizeAttenuation?: boolean
17
27
 
18
28
  // #endregion Properties (2)
29
+ }
19
30
 
20
- // #region Public Methods (2)
21
-
22
- clone(): IMaterialPointData;
23
- copy(source: IMaterialPointData): void;
24
-
25
- // #endregion Public Methods (2)
26
- }
31
+ // #endregion Interfaces (2)
@@ -1,7 +1,13 @@
1
- import { IMapData } from "./IMapData";
2
- import { IMaterialAbstractData, IMaterialAbstractDataProperties } from "./IMaterialAbstractData";
1
+ import { IMaterialAbstractData, IMaterialAbstractDataProperties, IMaterialAbstractDataPropertiesDefinition } from './IMaterialAbstractData';
3
2
 
4
- export interface IMaterialShadowDataProperties extends IMaterialAbstractDataProperties {};
3
+ // #region Type aliases (2)
4
+
5
+ export type IMaterialShadowDataProperties = IMaterialAbstractDataProperties;
6
+ export type IMaterialShadowDataPropertiesDefinition = IMaterialAbstractDataPropertiesDefinition;
7
+
8
+ // #endregion Type aliases (2)
9
+
10
+ // #region Interfaces (1)
5
11
 
6
12
  export interface IMaterialShadowData extends IMaterialAbstractData {
7
13
  // #region Public Methods (2)
@@ -10,4 +16,6 @@ export interface IMaterialShadowData extends IMaterialAbstractData {
10
16
  copy(source: IMaterialShadowData): void;
11
17
 
12
18
  // #endregion Public Methods (2)
13
- }
19
+ }
20
+
21
+ // #endregion Interfaces (1)
@@ -1,36 +1,36 @@
1
- import { Color } from "../../../types";
2
- import { IMapData } from "./IMapData";
3
- import { IMaterialAbstractData, IMaterialAbstractDataProperties } from "./IMaterialAbstractData";
1
+ import { Color } from '../../../types';
2
+ import { IMapData, IMapDataPropertiesDefinition } from './IMapData';
3
+ import { IMaterialAbstractData, IMaterialAbstractDataPropertiesGeneric } from './IMaterialAbstractData';
4
4
 
5
- export interface IMaterialSpecularGlossinessDataProperties extends IMaterialAbstractDataProperties {
6
- // #region Properties (6)
7
-
8
- envMap?: string | string[];
9
- glossiness?: number,
10
- glossinessMap?: IMapData,
11
- specular?: Color,
12
- specularGlossinessMap?: IMapData,
13
- specularMap?: IMapData,
5
+ // #region Type aliases (2)
14
6
 
15
- // #endregion Properties (6)
16
- };
7
+ export type IMaterialSpecularGlossinessDataProperties = Partial<IMaterialSpecularGlossinessDataPropertiesGeneric<IMapData>>;
8
+ export type IMaterialSpecularGlossinessDataPropertiesDefinition = Partial<IMaterialSpecularGlossinessDataPropertiesGeneric<IMapDataPropertiesDefinition>>;
17
9
 
18
- export interface IMaterialSpecularGlossinessData extends IMaterialAbstractData {
19
- // #region Properties (6)
10
+ // #endregion Type aliases (2)
20
11
 
21
- envMap?: string | string[];
22
- glossiness: number,
23
- glossinessMap?: IMapData,
24
- specular: Color,
25
- specularGlossinessMap?: IMapData,
26
- specularMap?: IMapData,
27
-
28
- // #endregion Properties (6)
12
+ // #region Interfaces (2)
29
13
 
14
+ export interface IMaterialSpecularGlossinessData extends IMaterialSpecularGlossinessDataPropertiesGeneric<IMapData>, IMaterialAbstractData {
30
15
  // #region Public Methods (2)
31
16
 
32
17
  clone(): IMaterialSpecularGlossinessData;
33
18
  copy(source: IMaterialSpecularGlossinessData): void;
34
19
 
35
20
  // #endregion Public Methods (2)
36
- }
21
+ }
22
+
23
+ interface IMaterialSpecularGlossinessDataPropertiesGeneric<T> extends IMaterialAbstractDataPropertiesGeneric<T> {
24
+ // #region Properties (6)
25
+
26
+ envMap?: string | string[];
27
+ glossiness?: number,
28
+ glossinessMap?: T,
29
+ specular?: Color,
30
+ specularGlossinessMap?: T,
31
+ specularMap?: T
32
+
33
+ // #endregion Properties (6)
34
+ }
35
+
36
+ // #endregion Interfaces (2)
@@ -1,84 +1,60 @@
1
- import { Color } from "../../../types";
2
- import { IMapData } from "./IMapData";
3
- import { IMaterialAbstractData, IMaterialAbstractDataProperties } from "./IMaterialAbstractData";
1
+ import { Color } from '../../../types';
2
+ import { IMapData, IMapDataPropertiesDefinition } from './IMapData';
3
+ import { IMaterialAbstractData, IMaterialAbstractDataPropertiesGeneric } from './IMaterialAbstractData';
4
4
 
5
- export interface IMaterialStandardDataProperties extends IMaterialAbstractDataProperties {
6
- // #region Properties (30)
5
+ // #region Type aliases (2)
7
6
 
8
- attenuationColor?: Color,
9
- attenuationDistance?: number;
10
- clearcoat?: number;
11
- clearcoatMap?: IMapData;
12
- clearcoatNormalMap?: IMapData;
13
- clearcoatRoughness?: number;
14
- clearcoatRoughnessMap?: IMapData;
15
- displacementBias?: number;
16
- displacementMap?: IMapData;
17
- displacementScale?: number;
18
- envMap?: string | string[];
19
- ior?: number;
20
- metalness?: number,
21
- metalnessMap?: IMapData,
22
- metalnessRoughnessMap?: IMapData,
23
- roughness?: number,
24
- roughnessMap?: IMapData,
25
- sheen?: number,
26
- sheenColor?: Color,
27
- sheenColorMap?: IMapData,
28
- sheenRoughness?: number,
29
- sheenRoughnessMap?: IMapData,
30
- specularColor?: Color,
31
- specularColorMap?: IMapData,
32
- specularIntensity?: number,
33
- specularIntensityMap?: IMapData,
34
- thickness?: number;
35
- thicknessMap?: IMapData;
36
- transmission?: number;
37
- transmissionMap?: IMapData;
7
+ export type IMaterialStandardDataProperties = Partial<IMaterialStandardDataPropertiesGeneric<IMapData>>;
8
+ export type IMaterialStandardDataPropertiesDefinition = Partial<IMaterialStandardDataPropertiesGeneric<IMapDataPropertiesDefinition>>;
38
9
 
39
- // #endregion Properties (30)
40
- };
10
+ // #endregion Type aliases (2)
11
+
12
+ // #region Interfaces (2)
13
+
14
+ export interface IMaterialStandardData extends IMaterialStandardDataPropertiesGeneric<IMapData>, IMaterialAbstractData {
15
+ // #region Public Methods (2)
16
+
17
+ clone(): IMaterialStandardData;
18
+ copy(source: IMaterialStandardData): void;
41
19
 
42
- export interface IMaterialStandardData extends IMaterialAbstractData {
20
+ // #endregion Public Methods (2)
21
+ }
22
+
23
+ interface IMaterialStandardDataPropertiesGeneric<T> extends IMaterialAbstractDataPropertiesGeneric<T> {
43
24
  // #region Properties (30)
44
25
 
45
26
  attenuationColor: Color,
46
27
  attenuationDistance: number;
47
28
  clearcoat: number;
48
- clearcoatMap?: IMapData;
49
- clearcoatNormalMap?: IMapData;
29
+ clearcoatMap?: T;
30
+ clearcoatNormalMap?: T;
50
31
  clearcoatRoughness: number;
51
- clearcoatRoughnessMap?: IMapData;
32
+ clearcoatRoughnessMap?: T;
52
33
  displacementBias: number;
53
- displacementMap?: IMapData;
34
+ displacementMap?: T;
54
35
  displacementScale: number;
55
36
  envMap?: string | string[];
56
37
  ior: number;
57
38
  metalness: number,
58
- metalnessMap?: IMapData,
59
- metalnessRoughnessMap?: IMapData,
39
+ metalnessMap?: T,
40
+ metalnessRoughnessMap?: T,
60
41
  roughness: number,
61
- roughnessMap?: IMapData,
42
+ roughnessMap?: T,
62
43
  sheen: number,
63
44
  sheenColor: Color,
64
- sheenColorMap?: IMapData,
45
+ sheenColorMap?: T,
65
46
  sheenRoughness: number,
66
- sheenRoughnessMap?: IMapData,
47
+ sheenRoughnessMap?: T,
67
48
  specularColor: Color,
68
- specularColorMap?: IMapData,
49
+ specularColorMap?: T,
69
50
  specularIntensity: number,
70
- specularIntensityMap?: IMapData,
51
+ specularIntensityMap?: T,
71
52
  thickness: number;
72
- thicknessMap?: IMapData;
53
+ thicknessMap?: T;
73
54
  transmission: number;
74
- transmissionMap?: IMapData;
55
+ transmissionMap?: T;
75
56
 
76
57
  // #endregion Properties (30)
58
+ }
77
59
 
78
- // #region Public Methods (2)
79
-
80
- clone(): IMaterialStandardData;
81
- copy(source: IMaterialStandardData): void;
82
-
83
- // #endregion Public Methods (2)
84
- }
60
+ // #endregion Interfaces (2)