@xtctwins/tctwins-core 1.1.19 → 1.1.20

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 (151) hide show
  1. package/README.md +4 -4
  2. package/dist/tctwins-core.es5.js +27517 -27493
  3. package/dist/tctwins-core.min.es5.js +4 -4
  4. package/package.json +84 -84
  5. package/types/extras/ContextMenu/ContextMenu.d.ts +127 -127
  6. package/types/extras/ContextMenu/index.d.ts +1 -1
  7. package/types/extras/PointerCircle/PointerCircle.d.ts +51 -51
  8. package/types/extras/PointerCircle/index.d.ts +1 -1
  9. package/types/extras/PointerLens/PointerLens.d.ts +146 -146
  10. package/types/extras/index.d.ts +3 -3
  11. package/types/index.d.ts +3 -3
  12. package/types/plugins/AngleMeasurementsPlugin/AngleMeasurement.d.ts +204 -204
  13. package/types/plugins/AngleMeasurementsPlugin/AngleMeasurementsControl.d.ts +91 -91
  14. package/types/plugins/AngleMeasurementsPlugin/AngleMeasurementsMouseControl.d.ts +125 -125
  15. package/types/plugins/AngleMeasurementsPlugin/AngleMeasurementsPlugin.d.ts +151 -151
  16. package/types/plugins/AngleMeasurementsPlugin/AngleMeasurementsSimulateMouseControl.d.ts +86 -86
  17. package/types/plugins/AngleMeasurementsPlugin/AngleMeasurementsTouchControl.d.ts +124 -124
  18. package/types/plugins/AngleMeasurementsPlugin/index.d.ts +5 -5
  19. package/types/plugins/AnnotationsPlugin/Annotation.d.ts +135 -135
  20. package/types/plugins/AnnotationsPlugin/AnnotationsPlugin.d.ts +172 -172
  21. package/types/plugins/AnnotationsPlugin/index.d.ts +2 -2
  22. package/types/plugins/BCFViewpointsPlugin/BCFViewpointsPlugin.d.ts +148 -148
  23. package/types/plugins/BCFViewpointsPlugin/index.d.ts +1 -1
  24. package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurement.d.ts +253 -253
  25. package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsControl.d.ts +96 -96
  26. package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsMouseControl.d.ts +102 -102
  27. package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsPlugin.d.ts +192 -192
  28. package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsSimulateMouseControl.d.ts +83 -83
  29. package/types/plugins/DistanceMeasurementsPlugin/DistanceMeasurementsTouchControl.d.ts +103 -103
  30. package/types/plugins/DistanceMeasurementsPlugin/index.d.ts +5 -5
  31. package/types/plugins/FastNavPlugin/FastNavPlugin.d.ts +223 -223
  32. package/types/plugins/FastNavPlugin/index.d.ts +1 -1
  33. package/types/plugins/GLTFLoaderPlugin/GLTFLoaderPlugin.d.ts +142 -142
  34. package/types/plugins/GLTFLoaderPlugin/index.d.ts +1 -1
  35. package/types/plugins/LASLoaderPlugin/LASLoaderPlugin.d.ts +240 -240
  36. package/types/plugins/LASLoaderPlugin/index.d.ts +1 -1
  37. package/types/plugins/NavCubePlugin/NavCubePlugin.d.ts +177 -177
  38. package/types/plugins/NavCubePlugin/index.d.ts +1 -1
  39. package/types/plugins/ObjectEditPlugin/ObjectEditPlugin.d.ts +242 -242
  40. package/types/plugins/ObjectEditPlugin/index.d.ts +1 -1
  41. package/types/plugins/SectionPlanesPlugin/SectionBoxControl.d.ts +36 -36
  42. package/types/plugins/SectionPlanesPlugin/SectionPlanesPlugin.d.ts +186 -186
  43. package/types/plugins/SectionPlanesPlugin/index.d.ts +2 -2
  44. package/types/plugins/SkyboxesPlugin/SkyboxesPlugin.d.ts +66 -66
  45. package/types/plugins/SkyboxesPlugin/index.d.ts +1 -1
  46. package/types/plugins/StoreyViewsPlugin/Storey.d.ts +69 -69
  47. package/types/plugins/StoreyViewsPlugin/StoreyMap.d.ts +41 -41
  48. package/types/plugins/StoreyViewsPlugin/StoreyViewsPlugin.d.ts +180 -180
  49. package/types/plugins/StoreyViewsPlugin/index.d.ts +1 -1
  50. package/types/plugins/TreeViewPlugin/ModelTreeView.d.ts +24 -24
  51. package/types/plugins/TreeViewPlugin/TreeViewNode.d.ts +71 -71
  52. package/types/plugins/TreeViewPlugin/TreeViewPlugin.d.ts +267 -267
  53. package/types/plugins/TreeViewPlugin/index.d.ts +1 -1
  54. package/types/plugins/TreeViewPlugin/renderService.d.ts +128 -128
  55. package/types/plugins/ViewCullPlugin/ViewCullPlugin.d.ts +34 -34
  56. package/types/plugins/ViewCullPlugin/index.d.ts +1 -1
  57. package/types/plugins/WebIFCLoaderPlugin/WebIFCLoaderPlugin.d.ts +236 -236
  58. package/types/plugins/WebIFCLoaderPlugin/index.d.ts +1 -1
  59. package/types/plugins/XTCLoaderPlugin/XTCLoaderPlugin.d.ts +288 -288
  60. package/types/plugins/XTCLoaderPlugin/index.d.ts +1 -1
  61. package/types/plugins/index.d.ts +30 -30
  62. package/types/viewer/Configs.d.ts +46 -46
  63. package/types/viewer/Plugin.d.ts +69 -69
  64. package/types/viewer/Viewer.d.ts +282 -282
  65. package/types/viewer/index.d.ts +6 -6
  66. package/types/viewer/localization/LocaleService.d.ts +183 -183
  67. package/types/viewer/metadata/IFCObjectDefaults.d.ts +9 -9
  68. package/types/viewer/metadata/MetaModel.d.ts +94 -102
  69. package/types/viewer/metadata/MetaObject.d.ts +74 -74
  70. package/types/viewer/metadata/MetaScene.d.ts +135 -135
  71. package/types/viewer/metadata/Property.d.ts +29 -29
  72. package/types/viewer/metadata/PropertySet.d.ts +31 -31
  73. package/types/viewer/metadata/index.d.ts +6 -6
  74. package/types/viewer/scene/Bitmap/Bitmap.d.ts +255 -255
  75. package/types/viewer/scene/CameraControl/CameraControl.d.ts +777 -777
  76. package/types/viewer/scene/Component.d.ts +155 -155
  77. package/types/viewer/scene/Entity.d.ts +401 -401
  78. package/types/viewer/scene/LineSet/LineSet.d.ts +111 -111
  79. package/types/viewer/scene/camera/Camera.d.ts +364 -364
  80. package/types/viewer/scene/camera/CameraFlightAnimation.d.ts +167 -167
  81. package/types/viewer/scene/camera/CameraPath.d.ts +28 -28
  82. package/types/viewer/scene/camera/CameraPathAnimation.d.ts +95 -95
  83. package/types/viewer/scene/camera/CustomProjection.d.ts +57 -57
  84. package/types/viewer/scene/camera/Frustum.d.ts +166 -166
  85. package/types/viewer/scene/camera/Ortho.d.ts +115 -115
  86. package/types/viewer/scene/camera/Perspective.d.ts +136 -136
  87. package/types/viewer/scene/camera/index.d.ts +4 -4
  88. package/types/viewer/scene/geometry/Geometry.d.ts +7 -7
  89. package/types/viewer/scene/geometry/ReadableGeometry.d.ts +95 -95
  90. package/types/viewer/scene/geometry/VBOGeometry.d.ts +62 -62
  91. package/types/viewer/scene/geometry/builders/buildBoxGeometry.d.ts +21 -21
  92. package/types/viewer/scene/geometry/builders/buildBoxLinesGeometry.d.ts +21 -21
  93. package/types/viewer/scene/geometry/builders/buildCylinderGeometry.d.ts +27 -27
  94. package/types/viewer/scene/geometry/builders/buildGridGeometry.d.ts +17 -17
  95. package/types/viewer/scene/geometry/builders/buildPlaneGeometry.d.ts +21 -21
  96. package/types/viewer/scene/geometry/builders/buildSphereGeometry.d.ts +21 -21
  97. package/types/viewer/scene/geometry/builders/buildTorusGeometry.d.ts +25 -25
  98. package/types/viewer/scene/geometry/builders/buildVectorTextGeometry.d.ts +21 -21
  99. package/types/viewer/scene/geometry/builders/index.d.ts +8 -8
  100. package/types/viewer/scene/geometry/index.d.ts +2 -2
  101. package/types/viewer/scene/index.d.ts +23 -23
  102. package/types/viewer/scene/input/input.d.ts +69 -69
  103. package/types/viewer/scene/lights/AmbientLight.d.ts +19 -19
  104. package/types/viewer/scene/lights/DirLight.d.ts +25 -25
  105. package/types/viewer/scene/lights/Light.d.ts +3 -3
  106. package/types/viewer/scene/lights/PointLight.d.ts +30 -30
  107. package/types/viewer/scene/lights/index.d.ts +2 -2
  108. package/types/viewer/scene/marker/Marker.d.ts +136 -136
  109. package/types/viewer/scene/marker/SpriteMarker.d.ts +185 -185
  110. package/types/viewer/scene/marker/index.d.ts +2 -2
  111. package/types/viewer/scene/materials/EdgeMaterial.d.ts +83 -83
  112. package/types/viewer/scene/materials/EmphasisMaterial.d.ts +241 -241
  113. package/types/viewer/scene/materials/Fresnel.d.ts +148 -148
  114. package/types/viewer/scene/materials/LinesMaterial.d.ts +71 -71
  115. package/types/viewer/scene/materials/Material.d.ts +3 -3
  116. package/types/viewer/scene/materials/PhongMaterial.d.ts +468 -468
  117. package/types/viewer/scene/materials/PointsMaterial.d.ts +206 -206
  118. package/types/viewer/scene/materials/Texture.d.ts +260 -260
  119. package/types/viewer/scene/materials/index.d.ts +6 -6
  120. package/types/viewer/scene/math/Frustum.d.ts +41 -41
  121. package/types/viewer/scene/math/index.d.ts +1 -1
  122. package/types/viewer/scene/math/math.d.ts +104 -104
  123. package/types/viewer/scene/mementos/CameraMemento.d.ts +28 -28
  124. package/types/viewer/scene/mementos/ModelMemento.d.ts +44 -44
  125. package/types/viewer/scene/mementos/ObjectsMemento.d.ts +39 -39
  126. package/types/viewer/scene/mementos/index.d.ts +3 -3
  127. package/types/viewer/scene/mesh/Mesh.d.ts +793 -793
  128. package/types/viewer/scene/mesh/index.d.ts +1 -1
  129. package/types/viewer/scene/models/PerformanceModel/PerformanceModel.d.ts +9 -9
  130. package/types/viewer/scene/models/PerformanceModel/index.d.ts +1 -1
  131. package/types/viewer/scene/models/SceneModel.d.ts +757 -762
  132. package/types/viewer/scene/models/SceneModelEntity.d.ts +417 -417
  133. package/types/viewer/scene/models/SceneModelMesh.d.ts +68 -68
  134. package/types/viewer/scene/models/SceneModelTexture.d.ts +16 -16
  135. package/types/viewer/scene/models/SceneModelTextureSet.d.ts +51 -51
  136. package/types/viewer/scene/models/SceneModelTransform.d.ts +197 -197
  137. package/types/viewer/scene/models/VBOSceneModel/VBOSceneModel.d.ts +7 -7
  138. package/types/viewer/scene/models/index.d.ts +7 -7
  139. package/types/viewer/scene/nodes/Node.d.ts +664 -664
  140. package/types/viewer/scene/nodes/index.d.ts +1 -1
  141. package/types/viewer/scene/postfx/CrossSections.d.ts +42 -42
  142. package/types/viewer/scene/postfx/SAO.d.ts +209 -209
  143. package/types/viewer/scene/scene/Scene.d.ts +1068 -1068
  144. package/types/viewer/scene/sectionPlane/SectionPlane.d.ts +110 -110
  145. package/types/viewer/scene/sectionPlane/index.d.ts +1 -1
  146. package/types/viewer/scene/stats.d.ts +40 -40
  147. package/types/viewer/scene/viewport/Viewport.d.ts +23 -23
  148. package/types/viewer/scene/viewport/index.d.ts +1 -1
  149. package/types/viewer/scene/webgl/PickResult.d.ts +115 -115
  150. package/types/viewer/scene/webgl/index.d.ts +1 -1
  151. package/dist/tctwins-core.umd.js +0 -37
@@ -1,468 +1,468 @@
1
- import { Material } from "./Material";
2
- import { Component } from "../Component";
3
- import { Texture } from "./Texture";
4
- import { Fresnel } from "./Fresnel";
5
-
6
- export declare type PhongMaterialConfiguration = {
7
- /** Optional ID, unique among all components in the parent {@link Scene}, generated automatically when omitted. */
8
- id?: string;
9
- /** PhongMaterial ambient color. */
10
- ambient?: number[];
11
- /** PhongMaterial diffuse color. */
12
- diffuse?: number[];
13
- /** PhongMaterial specular color. */
14
- specular?: number[];
15
- /** PhongMaterial emissive color. */
16
- emissive?: number[];
17
- /** Scalar in range 0-1 that controls alpha, where 0 is completely transparent and 1 is completely opaque. */
18
- alpha?: number;
19
- /** Scalar in range 0-128 that determines the size and sharpness of specular highlights. */
20
- shininess?: number;
21
- /** Scalar in range 0-1 that controls how much {@link ReflectionMap} is reflected. */
22
- reflectivity?: number;
23
- /** Scalar that controls the width of lines. */
24
- lineWidth?: number;
25
- /** Scalar that controls the size of points. */
26
- pointSize?: number;
27
- /** A ambient map {@link Texture}, which will multiply by the diffuse property. Must be within the same {@link Scene} as this PhongMaterial. */
28
- ambientMap?: Texture;
29
- /** A diffuse map {@link Texture}, which will override the effect of the diffuse property. Must be within the same {@link Scene} as this PhongMaterial. */
30
- diffuseMap?: Texture;
31
- /** A specular map {@link Texture}, which will override the effect of the specular property. Must be within the same {@link Scene} as this PhongMaterial. */
32
- specularMap?: Texture;
33
- /** An emissive map {@link Texture}, which will override the effect of the emissive property. Must be within the same {@link Scene} as this PhongMaterial. */
34
- emissiveMap?: Texture;
35
- /** A normal map {@link Texture}. Must be within the same {@link Scene} as this PhongMaterial. */
36
- normalMap?: Texture;
37
- /** An alpha map {@link Texture}, which will override the effect of the alpha property. Must be within the same {@link Scene} as this PhongMaterial. */
38
- alphaMap?: Texture;
39
- /** A reflectivity control map {@link Texture}, which will override the effect of the reflectivity property. Must be within the same {@link Scene} as this PhongMaterial. */
40
- reflectivityMap?: Texture;
41
- /** An occlusion map {@link Texture}. Must be within the same {@link Scene} as this PhongMaterial.*/
42
- occlusionMap?: Texture;
43
- /** A diffuse {@link Fresnel"}}Fresnel{{/crossLink}}. Must be within the same {@link Scene} as this PhongMaterial. */
44
- diffuseFresnel?: Fresnel;
45
- /** A specular {@link Fresnel"}}Fresnel{{/crossLink}}. Must be within the same {@link Scene} as this PhongMaterial. */
46
- specularFresnel?: Fresnel;
47
- /** An emissive {@link Fresnel"}}Fresnel{{/crossLink}}. Must be within the same {@link Scene} as this PhongMaterial. */
48
- emissiveFresnel?: Fresnel;
49
- /** An alpha {@link Fresnel"}}Fresnel{{/crossLink}}. Must be within the same {@link Scene} as this PhongMaterial. */
50
- alphaFresnel?: Fresnel;
51
- /** A reflectivity {@link Fresnel"}}Fresnel{{/crossLink}}. Must be within the same {@link Scene} as this PhongMaterial. */
52
- reflectivityFresnel?: Fresnel;
53
- /** The alpha blend mode - accepted values are "opaque", "blend" and "mask". See the {@link PhongMaterial.alphaMode} property for more info. */
54
- alphaMode?: "opaque"| "blend" | "mask";
55
- /** The alpha cutoff value. See the {@link PhongMaterial.alphaCutoff} property for more info. */
56
- alphaCutoff?: number;
57
- /** Whether to render geometry backfaces. */
58
- backfaces?: boolean;
59
- /** The winding order for geometry front faces - "cw" for clockwise, or "ccw" for counter-clockwise. */
60
- frontface?: "cw" | "ccw";
61
- };
62
-
63
- /**
64
- * Configures the normal rendered appearance of {@link Mesh}es using the non-physically-correct Blinn-Phong shading model.
65
- */
66
- export declare class PhongMaterial extends Material {
67
- /**
68
- * @param {Component} owner Owner component. When destroyed, the owner will destroy this component as well.
69
- * @param {PhongMaterialConfiguration} cfg The PhongMaterial configuration
70
- */
71
- constructor(owner: Component, cfg?: any);
72
-
73
- /**
74
- * Sets the PhongMaterial's ambient color.
75
- *
76
- * Default value is ````[0.3, 0.3, 0.3]````.
77
- *
78
- * @type {Number[]}
79
- */
80
- set ambient(arg: number[]);
81
-
82
- /**
83
- * Gets the PhongMaterial's ambient color.
84
- *
85
- * Default value is ````[0.3, 0.3, 0.3]````.
86
- *
87
- * @type {Number[]}
88
- */
89
- get ambient(): number[];
90
-
91
- /**
92
- * Sets the PhongMaterial's diffuse color.
93
- *
94
- * Multiplies by {@link PhongMaterial.diffuseMap}.
95
- *
96
- * Default value is ````[1.0, 1.0, 1.0]````.
97
- *
98
- * @type {Number[]}
99
- */
100
- set diffuse(arg: number[]);
101
-
102
- /**
103
- * Sets the PhongMaterial's diffuse color.
104
- *
105
- * Multiplies by {@link PhongMaterial.diffuseMap}.
106
- *
107
- * Default value is ````[1.0, 1.0, 1.0]````.
108
- *
109
- * @type {Number[]}
110
- */
111
- get diffuse(): number[];
112
-
113
- /**
114
- * Sets the PhongMaterial's specular color.
115
- *
116
- * Multiplies by {@link PhongMaterial.specularMap}.
117
- * Default value is ````[1.0, 1.0, 1.0]````.
118
- * @type {Number[]}
119
- */
120
- set specular(arg: number[]);
121
-
122
- /**
123
- * Gets the PhongMaterial's specular color.
124
- *
125
- * Multiplies by {@link PhongMaterial.specularMap}.
126
- * Default value is ````[1.0, 1.0, 1.0]````.
127
- * @type {Number[]}
128
- */
129
- get specular(): number[];
130
-
131
- /**
132
- * Sets the PhongMaterial's emissive color.
133
- *
134
- * Multiplies by {@link PhongMaterial.emissiveMap}.
135
- *
136
- * Default value is ````[0.0, 0.0, 0.0]````.
137
- * @type {Number[]}
138
- */
139
- set emissive(arg: number[]);
140
-
141
- /**
142
- * Gets the PhongMaterial's emissive color.
143
- *
144
- * Multiplies by {@link PhongMaterial.emissiveMap}.
145
- *
146
- * Default value is ````[0.0, 0.0, 0.0]````.
147
- * @type {Number[]}
148
- */
149
- get emissive(): number[];
150
-
151
- /**
152
- * Sets the PhongMaterial alpha.
153
- *
154
- * This is a factor in the range [0..1] indicating how transparent the PhongMaterial is.
155
- *
156
- * A value of 0.0 indicates fully transparent, 1.0 is fully opaque.
157
- *
158
- * Multiplies by {@link PhongMaterial.alphaMap}.
159
- *
160
- * Default value is ````1.0````.
161
- *
162
- * @type {Number}
163
- */
164
- set alpha(arg: number);
165
-
166
- /**
167
- * Gets the PhongMaterial alpha.
168
- *
169
- * This is a factor in the range [0..1] indicating how transparent the PhongMaterial is.
170
- *
171
- * A value of 0.0 indicates fully transparent, 1.0 is fully opaque.
172
- *
173
- * Multiplies by {@link PhongMaterial.alphaMap}.
174
- *
175
- * Default value is ````1.0````.
176
- *
177
- * @type {Number}
178
- */
179
- get alpha(): number;
180
-
181
- /**
182
- * Sets the PhongMaterial shininess.
183
- *
184
- * This is a factor in range [0..128] that determines the size and sharpness of the specular highlights create by this PhongMaterial.
185
- *
186
- * Larger values produce smaller, sharper highlights. A value of 0.0 gives very large highlights that are almost never
187
- * desirable. Try values close to 10 for a larger, fuzzier highlight and values of 100 or more for a small, sharp
188
- * highlight.
189
- *
190
- * Default value is ```` 80.0````.
191
- *
192
- * @type {Number}
193
- */
194
- set shininess(arg: number);
195
-
196
- /**
197
- * Gets the PhongMaterial shininess.
198
- *
199
- * This is a factor in range [0..128] that determines the size and sharpness of the specular highlights create by this PhongMaterial.
200
- *
201
- * Larger values produce smaller, sharper highlights. A value of 0.0 gives very large highlights that are almost never
202
- * desirable. Try values close to 10 for a larger, fuzzier highlight and values of 100 or more for a small, sharp
203
- * highlight.
204
- *
205
- * Default value is ```` 80.0````.
206
- *
207
- * @type {Number}
208
- */
209
- get shininess(): number;
210
-
211
- /**
212
- * Sets how much {@link ReflectionMap} is reflected by this PhongMaterial.
213
- *
214
- * This is a scalar in range ````[0-1]````. Default value is ````1.0````.
215
- *
216
- * The surface will be non-reflective when this is ````0````, and completely mirror-like when it is ````1.0````.
217
- *
218
- * Multiplies by {@link PhongMaterial.reflectivityMap}.
219
- *
220
- * @type {Number}
221
- */
222
- set reflectivity(arg: number);
223
-
224
- /**
225
- * Gets how much {@link ReflectionMap} is reflected by this PhongMaterial.
226
- *
227
- * This is a scalar in range ````[0-1]````. Default value is ````1.0````.
228
- *
229
- * The surface will be non-reflective when this is ````0````, and completely mirror-like when it is ````1.0````.
230
- *
231
- * Multiplies by {@link PhongMaterial.reflectivityMap}.
232
- *
233
- * @type {Number}
234
- */
235
- get reflectivity(): number;
236
-
237
- /**
238
- * Sets the PhongMaterial's line width.
239
- *
240
- * This is not supported by WebGL implementations based on DirectX [2019].
241
- *
242
- * Default value is ````1.0````.
243
- *
244
- * @type {Number}
245
- */
246
- set lineWidth(arg: number);
247
-
248
- /**
249
- * Gets the PhongMaterial's line width.
250
- *
251
- * This is not supported by WebGL implementations based on DirectX [2019].
252
- *
253
- * Default value is ````1.0````.
254
- *
255
- * @type {Number}
256
- */
257
- get lineWidth(): number;
258
-
259
- /**
260
- * Sets the PhongMaterial's point size.
261
- *
262
- * Default value is 1.0.
263
- *
264
- * @type {Number}
265
- */
266
- set pointSize(arg: number);
267
-
268
- /**
269
- * Gets the PhongMaterial's point size.
270
- *
271
- * Default value is 1.0.
272
- *
273
- * @type {Number}
274
- */
275
- get pointSize(): number;
276
-
277
- /**
278
- * Sets the PhongMaterial's alpha rendering mode.
279
- *
280
- * This governs how alpha is treated. Alpha is the combined result of {@link PhongMaterial.alpha} and {@link PhongMaterial.alphaMap}.
281
- *
282
- * Supported values are:
283
- *
284
- * * "opaque" - The alpha value is ignored and the rendered output is fully opaque (default).
285
- * * "mask" - The rendered output is either fully opaque or fully transparent depending on the alpha value and the specified alpha cutoff value.
286
- * * "blend" - The alpha value is used to composite the source and destination areas. The rendered output is combined with the background using the normal painting operation (i.e. the Porter and Duff over operator).
287
- *
288
- *@type {String}
289
- */
290
- set alphaMode(arg: "opaque"| "blend" | "mask");
291
-
292
- /**
293
- * Gets the PhongMaterial's alpha rendering mode.
294
- *
295
- *@type {String}
296
- */
297
- get alphaMode(): "opaque"| "blend" | "mask";
298
-
299
- /**
300
- * Sets the PhongMaterial's alpha cutoff value.
301
- *
302
- * This specifies the cutoff threshold when {@link PhongMaterial.alphaMode} equals "mask". If the alpha is greater than or equal to this value then it is rendered as fully
303
- * opaque, otherwise, it is rendered as fully transparent. A value greater than 1.0 will render the entire material as fully transparent. This value is ignored for other modes.
304
- *
305
- * Alpha is the combined result of {@link PhongMaterial.alpha} and {@link PhongMaterial.alphaMap}.
306
- *
307
- * Default value is ````0.5````.
308
- *
309
- * @type {Number}
310
- */
311
- set alphaCutoff(arg: number);
312
-
313
- /**
314
- * Gets the PhongMaterial's alpha cutoff value.
315
- *
316
- * @type {Number}
317
- */
318
- get alphaCutoff(): number;
319
-
320
- /**
321
- * Sets whether backfaces are visible on attached {@link Mesh}es.
322
- *
323
- * The backfaces will belong to {@link Geometry} compoents that are also attached to the {@link Mesh}es.
324
- *
325
- * Default is ````false````.
326
- *
327
- * @type {Boolean}
328
- */
329
- set backfaces(arg: boolean);
330
-
331
- /**
332
- * Gets whether backfaces are visible on attached {@link Mesh}es.
333
- *
334
- * Default is ````false````.
335
- *
336
- * @type {Boolean}
337
- */
338
- get backfaces(): boolean;
339
-
340
- /**
341
- * Sets the winding direction of geometry front faces.
342
- *
343
- * Default is ````"ccw"````.
344
- * @type {String}
345
- */
346
- set frontface(arg: "cw" | "ccw");
347
-
348
- /**
349
- * Gets the winding direction of front faces on attached {@link Mesh}es.
350
- *
351
- * Default is ````"ccw"````.
352
- * @type {String}
353
- */
354
- get frontface(): "cw" | "ccw";
355
-
356
- /**
357
- * Gets the PhongMaterials's normal map {@link Texture}.
358
- *
359
- * @type {Texture}
360
- */
361
- get normalMap(): Texture;
362
-
363
- /**
364
- * Gets the PhongMaterials's ambient {@link Texture}.
365
- *
366
- * Multiplies by {@link PhongMaterial.ambient}.
367
- *
368
- * @type {Texture}
369
- */
370
- get ambientMap(): Texture;
371
-
372
- /**
373
- * Gets the PhongMaterials's diffuse {@link Texture}.
374
- *
375
- * Multiplies by {@link PhongMaterial.diffuse}.
376
- *
377
- * @type {Texture}
378
- */
379
- get diffuseMap(): Texture;
380
-
381
- /**
382
- * Gets the PhongMaterials's specular {@link Texture}.
383
- *
384
- * Multiplies by {@link PhongMaterial.specular}.
385
- *
386
- * @type {Texture}
387
- */
388
- get specularMap(): Texture;
389
-
390
- /**
391
- * Gets the PhongMaterials's emissive {@link Texture}.
392
- *
393
- * Multiplies by {@link PhongMaterial.emissive}.
394
- *
395
- * @type {Texture}
396
- */
397
- get emissiveMap(): Texture;
398
-
399
- /**
400
- * Gets the PhongMaterials's alpha {@link Texture}.
401
- *
402
- * Multiplies by {@link PhongMaterial.alpha}.
403
- *
404
- * @type {Texture}
405
- */
406
- get alphaMap(): Texture;
407
-
408
- /**
409
- * Gets the PhongMaterials's reflectivity {@link Texture}.
410
- *
411
- * Multiplies by {@link PhongMaterial.reflectivity}.
412
- *
413
- * @type {Texture}
414
- */
415
- get reflectivityMap(): Texture;
416
-
417
- /**
418
- * Gets the PhongMaterials's ambient occlusion {@link Texture}.
419
- *
420
- * @type {Texture}
421
- */
422
- get occlusionMap(): Texture;
423
-
424
- /**
425
- * Gets the PhongMaterials's diffuse {@link Fresnel}.
426
- *
427
- * Applies to {@link PhongMaterial.diffuse}.
428
- *
429
- * @type {Fresnel}
430
- */
431
- get diffuseFresnel(): Fresnel;
432
-
433
- /**
434
- * Gets the PhongMaterials's specular {@link Fresnel}.
435
- *
436
- * Applies to {@link PhongMaterial.specular}.
437
- *
438
- * @type {Fresnel}
439
- */
440
- get specularFresnel(): Fresnel;
441
-
442
- /**
443
- * Gets the PhongMaterials's emissive {@link Fresnel}.
444
- *
445
- * Applies to {@link PhongMaterial.emissive}.
446
- *
447
- * @type {Fresnel}
448
- */
449
- get emissiveFresnel(): Fresnel;
450
-
451
- /**
452
- * Gets the PhongMaterials's alpha {@link Fresnel}.
453
- *
454
- * Applies to {@link PhongMaterial.alpha}.
455
- *
456
- * @type {Fresnel}
457
- */
458
- get alphaFresnel(): Fresnel;
459
-
460
- /**
461
- * Gets the PhongMaterials's reflectivity {@link Fresnel}.
462
- *
463
- * Applies to {@link PhongMaterial.reflectivity}.
464
- *
465
- * @type {Fresnel}
466
- */
467
- get reflectivityFresnel(): Fresnel;
468
- }
1
+ import { Material } from "./Material";
2
+ import { Component } from "../Component";
3
+ import { Texture } from "./Texture";
4
+ import { Fresnel } from "./Fresnel";
5
+
6
+ export declare type PhongMaterialConfiguration = {
7
+ /** Optional ID, unique among all components in the parent {@link Scene}, generated automatically when omitted. */
8
+ id?: string;
9
+ /** PhongMaterial ambient color. */
10
+ ambient?: number[];
11
+ /** PhongMaterial diffuse color. */
12
+ diffuse?: number[];
13
+ /** PhongMaterial specular color. */
14
+ specular?: number[];
15
+ /** PhongMaterial emissive color. */
16
+ emissive?: number[];
17
+ /** Scalar in range 0-1 that controls alpha, where 0 is completely transparent and 1 is completely opaque. */
18
+ alpha?: number;
19
+ /** Scalar in range 0-128 that determines the size and sharpness of specular highlights. */
20
+ shininess?: number;
21
+ /** Scalar in range 0-1 that controls how much {@link ReflectionMap} is reflected. */
22
+ reflectivity?: number;
23
+ /** Scalar that controls the width of lines. */
24
+ lineWidth?: number;
25
+ /** Scalar that controls the size of points. */
26
+ pointSize?: number;
27
+ /** A ambient map {@link Texture}, which will multiply by the diffuse property. Must be within the same {@link Scene} as this PhongMaterial. */
28
+ ambientMap?: Texture;
29
+ /** A diffuse map {@link Texture}, which will override the effect of the diffuse property. Must be within the same {@link Scene} as this PhongMaterial. */
30
+ diffuseMap?: Texture;
31
+ /** A specular map {@link Texture}, which will override the effect of the specular property. Must be within the same {@link Scene} as this PhongMaterial. */
32
+ specularMap?: Texture;
33
+ /** An emissive map {@link Texture}, which will override the effect of the emissive property. Must be within the same {@link Scene} as this PhongMaterial. */
34
+ emissiveMap?: Texture;
35
+ /** A normal map {@link Texture}. Must be within the same {@link Scene} as this PhongMaterial. */
36
+ normalMap?: Texture;
37
+ /** An alpha map {@link Texture}, which will override the effect of the alpha property. Must be within the same {@link Scene} as this PhongMaterial. */
38
+ alphaMap?: Texture;
39
+ /** A reflectivity control map {@link Texture}, which will override the effect of the reflectivity property. Must be within the same {@link Scene} as this PhongMaterial. */
40
+ reflectivityMap?: Texture;
41
+ /** An occlusion map {@link Texture}. Must be within the same {@link Scene} as this PhongMaterial.*/
42
+ occlusionMap?: Texture;
43
+ /** A diffuse {@link Fresnel"}}Fresnel{{/crossLink}}. Must be within the same {@link Scene} as this PhongMaterial. */
44
+ diffuseFresnel?: Fresnel;
45
+ /** A specular {@link Fresnel"}}Fresnel{{/crossLink}}. Must be within the same {@link Scene} as this PhongMaterial. */
46
+ specularFresnel?: Fresnel;
47
+ /** An emissive {@link Fresnel"}}Fresnel{{/crossLink}}. Must be within the same {@link Scene} as this PhongMaterial. */
48
+ emissiveFresnel?: Fresnel;
49
+ /** An alpha {@link Fresnel"}}Fresnel{{/crossLink}}. Must be within the same {@link Scene} as this PhongMaterial. */
50
+ alphaFresnel?: Fresnel;
51
+ /** A reflectivity {@link Fresnel"}}Fresnel{{/crossLink}}. Must be within the same {@link Scene} as this PhongMaterial. */
52
+ reflectivityFresnel?: Fresnel;
53
+ /** The alpha blend mode - accepted values are "opaque", "blend" and "mask". See the {@link PhongMaterial.alphaMode} property for more info. */
54
+ alphaMode?: "opaque"| "blend" | "mask";
55
+ /** The alpha cutoff value. See the {@link PhongMaterial.alphaCutoff} property for more info. */
56
+ alphaCutoff?: number;
57
+ /** Whether to render geometry backfaces. */
58
+ backfaces?: boolean;
59
+ /** The winding order for geometry front faces - "cw" for clockwise, or "ccw" for counter-clockwise. */
60
+ frontface?: "cw" | "ccw";
61
+ };
62
+
63
+ /**
64
+ * Configures the normal rendered appearance of {@link Mesh}es using the non-physically-correct Blinn-Phong shading model.
65
+ */
66
+ export declare class PhongMaterial extends Material {
67
+ /**
68
+ * @param {Component} owner Owner component. When destroyed, the owner will destroy this component as well.
69
+ * @param {PhongMaterialConfiguration} cfg The PhongMaterial configuration
70
+ */
71
+ constructor(owner: Component, cfg?: any);
72
+
73
+ /**
74
+ * Sets the PhongMaterial's ambient color.
75
+ *
76
+ * Default value is ````[0.3, 0.3, 0.3]````.
77
+ *
78
+ * @type {Number[]}
79
+ */
80
+ set ambient(arg: number[]);
81
+
82
+ /**
83
+ * Gets the PhongMaterial's ambient color.
84
+ *
85
+ * Default value is ````[0.3, 0.3, 0.3]````.
86
+ *
87
+ * @type {Number[]}
88
+ */
89
+ get ambient(): number[];
90
+
91
+ /**
92
+ * Sets the PhongMaterial's diffuse color.
93
+ *
94
+ * Multiplies by {@link PhongMaterial.diffuseMap}.
95
+ *
96
+ * Default value is ````[1.0, 1.0, 1.0]````.
97
+ *
98
+ * @type {Number[]}
99
+ */
100
+ set diffuse(arg: number[]);
101
+
102
+ /**
103
+ * Sets the PhongMaterial's diffuse color.
104
+ *
105
+ * Multiplies by {@link PhongMaterial.diffuseMap}.
106
+ *
107
+ * Default value is ````[1.0, 1.0, 1.0]````.
108
+ *
109
+ * @type {Number[]}
110
+ */
111
+ get diffuse(): number[];
112
+
113
+ /**
114
+ * Sets the PhongMaterial's specular color.
115
+ *
116
+ * Multiplies by {@link PhongMaterial.specularMap}.
117
+ * Default value is ````[1.0, 1.0, 1.0]````.
118
+ * @type {Number[]}
119
+ */
120
+ set specular(arg: number[]);
121
+
122
+ /**
123
+ * Gets the PhongMaterial's specular color.
124
+ *
125
+ * Multiplies by {@link PhongMaterial.specularMap}.
126
+ * Default value is ````[1.0, 1.0, 1.0]````.
127
+ * @type {Number[]}
128
+ */
129
+ get specular(): number[];
130
+
131
+ /**
132
+ * Sets the PhongMaterial's emissive color.
133
+ *
134
+ * Multiplies by {@link PhongMaterial.emissiveMap}.
135
+ *
136
+ * Default value is ````[0.0, 0.0, 0.0]````.
137
+ * @type {Number[]}
138
+ */
139
+ set emissive(arg: number[]);
140
+
141
+ /**
142
+ * Gets the PhongMaterial's emissive color.
143
+ *
144
+ * Multiplies by {@link PhongMaterial.emissiveMap}.
145
+ *
146
+ * Default value is ````[0.0, 0.0, 0.0]````.
147
+ * @type {Number[]}
148
+ */
149
+ get emissive(): number[];
150
+
151
+ /**
152
+ * Sets the PhongMaterial alpha.
153
+ *
154
+ * This is a factor in the range [0..1] indicating how transparent the PhongMaterial is.
155
+ *
156
+ * A value of 0.0 indicates fully transparent, 1.0 is fully opaque.
157
+ *
158
+ * Multiplies by {@link PhongMaterial.alphaMap}.
159
+ *
160
+ * Default value is ````1.0````.
161
+ *
162
+ * @type {Number}
163
+ */
164
+ set alpha(arg: number);
165
+
166
+ /**
167
+ * Gets the PhongMaterial alpha.
168
+ *
169
+ * This is a factor in the range [0..1] indicating how transparent the PhongMaterial is.
170
+ *
171
+ * A value of 0.0 indicates fully transparent, 1.0 is fully opaque.
172
+ *
173
+ * Multiplies by {@link PhongMaterial.alphaMap}.
174
+ *
175
+ * Default value is ````1.0````.
176
+ *
177
+ * @type {Number}
178
+ */
179
+ get alpha(): number;
180
+
181
+ /**
182
+ * Sets the PhongMaterial shininess.
183
+ *
184
+ * This is a factor in range [0..128] that determines the size and sharpness of the specular highlights create by this PhongMaterial.
185
+ *
186
+ * Larger values produce smaller, sharper highlights. A value of 0.0 gives very large highlights that are almost never
187
+ * desirable. Try values close to 10 for a larger, fuzzier highlight and values of 100 or more for a small, sharp
188
+ * highlight.
189
+ *
190
+ * Default value is ```` 80.0````.
191
+ *
192
+ * @type {Number}
193
+ */
194
+ set shininess(arg: number);
195
+
196
+ /**
197
+ * Gets the PhongMaterial shininess.
198
+ *
199
+ * This is a factor in range [0..128] that determines the size and sharpness of the specular highlights create by this PhongMaterial.
200
+ *
201
+ * Larger values produce smaller, sharper highlights. A value of 0.0 gives very large highlights that are almost never
202
+ * desirable. Try values close to 10 for a larger, fuzzier highlight and values of 100 or more for a small, sharp
203
+ * highlight.
204
+ *
205
+ * Default value is ```` 80.0````.
206
+ *
207
+ * @type {Number}
208
+ */
209
+ get shininess(): number;
210
+
211
+ /**
212
+ * Sets how much {@link ReflectionMap} is reflected by this PhongMaterial.
213
+ *
214
+ * This is a scalar in range ````[0-1]````. Default value is ````1.0````.
215
+ *
216
+ * The surface will be non-reflective when this is ````0````, and completely mirror-like when it is ````1.0````.
217
+ *
218
+ * Multiplies by {@link PhongMaterial.reflectivityMap}.
219
+ *
220
+ * @type {Number}
221
+ */
222
+ set reflectivity(arg: number);
223
+
224
+ /**
225
+ * Gets how much {@link ReflectionMap} is reflected by this PhongMaterial.
226
+ *
227
+ * This is a scalar in range ````[0-1]````. Default value is ````1.0````.
228
+ *
229
+ * The surface will be non-reflective when this is ````0````, and completely mirror-like when it is ````1.0````.
230
+ *
231
+ * Multiplies by {@link PhongMaterial.reflectivityMap}.
232
+ *
233
+ * @type {Number}
234
+ */
235
+ get reflectivity(): number;
236
+
237
+ /**
238
+ * Sets the PhongMaterial's line width.
239
+ *
240
+ * This is not supported by WebGL implementations based on DirectX [2019].
241
+ *
242
+ * Default value is ````1.0````.
243
+ *
244
+ * @type {Number}
245
+ */
246
+ set lineWidth(arg: number);
247
+
248
+ /**
249
+ * Gets the PhongMaterial's line width.
250
+ *
251
+ * This is not supported by WebGL implementations based on DirectX [2019].
252
+ *
253
+ * Default value is ````1.0````.
254
+ *
255
+ * @type {Number}
256
+ */
257
+ get lineWidth(): number;
258
+
259
+ /**
260
+ * Sets the PhongMaterial's point size.
261
+ *
262
+ * Default value is 1.0.
263
+ *
264
+ * @type {Number}
265
+ */
266
+ set pointSize(arg: number);
267
+
268
+ /**
269
+ * Gets the PhongMaterial's point size.
270
+ *
271
+ * Default value is 1.0.
272
+ *
273
+ * @type {Number}
274
+ */
275
+ get pointSize(): number;
276
+
277
+ /**
278
+ * Sets the PhongMaterial's alpha rendering mode.
279
+ *
280
+ * This governs how alpha is treated. Alpha is the combined result of {@link PhongMaterial.alpha} and {@link PhongMaterial.alphaMap}.
281
+ *
282
+ * Supported values are:
283
+ *
284
+ * * "opaque" - The alpha value is ignored and the rendered output is fully opaque (default).
285
+ * * "mask" - The rendered output is either fully opaque or fully transparent depending on the alpha value and the specified alpha cutoff value.
286
+ * * "blend" - The alpha value is used to composite the source and destination areas. The rendered output is combined with the background using the normal painting operation (i.e. the Porter and Duff over operator).
287
+ *
288
+ *@type {String}
289
+ */
290
+ set alphaMode(arg: "opaque"| "blend" | "mask");
291
+
292
+ /**
293
+ * Gets the PhongMaterial's alpha rendering mode.
294
+ *
295
+ *@type {String}
296
+ */
297
+ get alphaMode(): "opaque"| "blend" | "mask";
298
+
299
+ /**
300
+ * Sets the PhongMaterial's alpha cutoff value.
301
+ *
302
+ * This specifies the cutoff threshold when {@link PhongMaterial.alphaMode} equals "mask". If the alpha is greater than or equal to this value then it is rendered as fully
303
+ * opaque, otherwise, it is rendered as fully transparent. A value greater than 1.0 will render the entire material as fully transparent. This value is ignored for other modes.
304
+ *
305
+ * Alpha is the combined result of {@link PhongMaterial.alpha} and {@link PhongMaterial.alphaMap}.
306
+ *
307
+ * Default value is ````0.5````.
308
+ *
309
+ * @type {Number}
310
+ */
311
+ set alphaCutoff(arg: number);
312
+
313
+ /**
314
+ * Gets the PhongMaterial's alpha cutoff value.
315
+ *
316
+ * @type {Number}
317
+ */
318
+ get alphaCutoff(): number;
319
+
320
+ /**
321
+ * Sets whether backfaces are visible on attached {@link Mesh}es.
322
+ *
323
+ * The backfaces will belong to {@link Geometry} compoents that are also attached to the {@link Mesh}es.
324
+ *
325
+ * Default is ````false````.
326
+ *
327
+ * @type {Boolean}
328
+ */
329
+ set backfaces(arg: boolean);
330
+
331
+ /**
332
+ * Gets whether backfaces are visible on attached {@link Mesh}es.
333
+ *
334
+ * Default is ````false````.
335
+ *
336
+ * @type {Boolean}
337
+ */
338
+ get backfaces(): boolean;
339
+
340
+ /**
341
+ * Sets the winding direction of geometry front faces.
342
+ *
343
+ * Default is ````"ccw"````.
344
+ * @type {String}
345
+ */
346
+ set frontface(arg: "cw" | "ccw");
347
+
348
+ /**
349
+ * Gets the winding direction of front faces on attached {@link Mesh}es.
350
+ *
351
+ * Default is ````"ccw"````.
352
+ * @type {String}
353
+ */
354
+ get frontface(): "cw" | "ccw";
355
+
356
+ /**
357
+ * Gets the PhongMaterials's normal map {@link Texture}.
358
+ *
359
+ * @type {Texture}
360
+ */
361
+ get normalMap(): Texture;
362
+
363
+ /**
364
+ * Gets the PhongMaterials's ambient {@link Texture}.
365
+ *
366
+ * Multiplies by {@link PhongMaterial.ambient}.
367
+ *
368
+ * @type {Texture}
369
+ */
370
+ get ambientMap(): Texture;
371
+
372
+ /**
373
+ * Gets the PhongMaterials's diffuse {@link Texture}.
374
+ *
375
+ * Multiplies by {@link PhongMaterial.diffuse}.
376
+ *
377
+ * @type {Texture}
378
+ */
379
+ get diffuseMap(): Texture;
380
+
381
+ /**
382
+ * Gets the PhongMaterials's specular {@link Texture}.
383
+ *
384
+ * Multiplies by {@link PhongMaterial.specular}.
385
+ *
386
+ * @type {Texture}
387
+ */
388
+ get specularMap(): Texture;
389
+
390
+ /**
391
+ * Gets the PhongMaterials's emissive {@link Texture}.
392
+ *
393
+ * Multiplies by {@link PhongMaterial.emissive}.
394
+ *
395
+ * @type {Texture}
396
+ */
397
+ get emissiveMap(): Texture;
398
+
399
+ /**
400
+ * Gets the PhongMaterials's alpha {@link Texture}.
401
+ *
402
+ * Multiplies by {@link PhongMaterial.alpha}.
403
+ *
404
+ * @type {Texture}
405
+ */
406
+ get alphaMap(): Texture;
407
+
408
+ /**
409
+ * Gets the PhongMaterials's reflectivity {@link Texture}.
410
+ *
411
+ * Multiplies by {@link PhongMaterial.reflectivity}.
412
+ *
413
+ * @type {Texture}
414
+ */
415
+ get reflectivityMap(): Texture;
416
+
417
+ /**
418
+ * Gets the PhongMaterials's ambient occlusion {@link Texture}.
419
+ *
420
+ * @type {Texture}
421
+ */
422
+ get occlusionMap(): Texture;
423
+
424
+ /**
425
+ * Gets the PhongMaterials's diffuse {@link Fresnel}.
426
+ *
427
+ * Applies to {@link PhongMaterial.diffuse}.
428
+ *
429
+ * @type {Fresnel}
430
+ */
431
+ get diffuseFresnel(): Fresnel;
432
+
433
+ /**
434
+ * Gets the PhongMaterials's specular {@link Fresnel}.
435
+ *
436
+ * Applies to {@link PhongMaterial.specular}.
437
+ *
438
+ * @type {Fresnel}
439
+ */
440
+ get specularFresnel(): Fresnel;
441
+
442
+ /**
443
+ * Gets the PhongMaterials's emissive {@link Fresnel}.
444
+ *
445
+ * Applies to {@link PhongMaterial.emissive}.
446
+ *
447
+ * @type {Fresnel}
448
+ */
449
+ get emissiveFresnel(): Fresnel;
450
+
451
+ /**
452
+ * Gets the PhongMaterials's alpha {@link Fresnel}.
453
+ *
454
+ * Applies to {@link PhongMaterial.alpha}.
455
+ *
456
+ * @type {Fresnel}
457
+ */
458
+ get alphaFresnel(): Fresnel;
459
+
460
+ /**
461
+ * Gets the PhongMaterials's reflectivity {@link Fresnel}.
462
+ *
463
+ * Applies to {@link PhongMaterial.reflectivity}.
464
+ *
465
+ * @type {Fresnel}
466
+ */
467
+ get reflectivityFresnel(): Fresnel;
468
+ }