@cesium/engine 10.0.0 → 10.1.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/Build/Workers/chunk-2GEAGYUY.js +1477 -0
- package/Build/Workers/chunk-4RMIRG6T.js +1800 -0
- package/Build/Workers/chunk-4VFBBNQ3.js +55 -0
- package/Build/Workers/{chunk-GRAT5GE7.js → chunk-5BLJ5ZM6.js} +1 -1
- package/Build/Workers/{chunk-AVI4IUWC.js → chunk-5KWHSZYL.js} +4 -4
- package/Build/Workers/chunk-5O6JWQ4E.js +398 -0
- package/Build/Workers/chunk-65MZOUNU.js +390 -0
- package/Build/Workers/chunk-6D66DPRV.js +353 -0
- package/Build/Workers/{chunk-XD445VDH.js → chunk-6OFDHMHR.js} +1 -1
- package/Build/Workers/chunk-76BYYG7N.js +945 -0
- package/Build/Workers/chunk-A5CODJ4M.js +171 -0
- package/Build/Workers/chunk-ACRTCBN5.js +684 -0
- package/Build/Workers/{chunk-7XGC6YB2.js → chunk-B75IEX2S.js} +3 -3
- package/Build/Workers/chunk-BAVI3ZS2.js +39 -0
- package/Build/Workers/{chunk-SYCPRK3D.js → chunk-BBDZYSZB.js} +4 -4
- package/Build/Workers/chunk-BGE4QVG7.js +368 -0
- package/Build/Workers/chunk-BY3E4ONI.js +456 -0
- package/Build/Workers/{chunk-LCLJJ2MZ.js → chunk-C3Z23UUJ.js} +6 -6
- package/Build/Workers/{chunk-MDHQR3ZS.js → chunk-C45MU4GZ.js} +2 -2
- package/Build/Workers/{chunk-PCP4YQST.js → chunk-CF7P7K7E.js} +2 -2
- package/Build/Workers/chunk-D2U4RI64.js +476 -0
- package/Build/Workers/chunk-D4K27X2M.js +305 -0
- package/Build/Workers/chunk-EB7PNZTK.js +138 -0
- package/Build/Workers/chunk-ELI4BUOT.js +963 -0
- package/Build/Workers/{chunk-DOXCPOG4.js → chunk-F3NDOSTZ.js} +1 -1
- package/Build/Workers/{chunk-BCL4PHHT.js → chunk-FDCLACT5.js} +3 -3
- package/Build/Workers/chunk-FEVVHITK.js +122 -0
- package/Build/Workers/{chunk-GR3CDLCP.js → chunk-FOZWUH4T.js} +1 -1
- package/Build/Workers/chunk-FQPSOOPH.js +258 -0
- package/Build/Workers/chunk-G5V4GPZE.js +691 -0
- package/Build/Workers/chunk-GNHZH7HP.js +37 -0
- package/Build/Workers/{chunk-AD5HBJ2F.js → chunk-GPJR7MPQ.js} +2 -2
- package/Build/Workers/{chunk-4BAE4PWO.js → chunk-GWT64LKY.js} +1 -1
- package/Build/Workers/{chunk-STBBMQGG.js → chunk-HGEEOMSC.js} +1 -1
- package/Build/Workers/chunk-IUROUBPA.js +300 -0
- package/Build/Workers/chunk-J7MQUQJY.js +430 -0
- package/Build/Workers/{chunk-BJF5LOWE.js → chunk-JNLWLSTP.js} +3 -3
- package/Build/Workers/chunk-JYQNWIQQ.js +44 -0
- package/Build/Workers/{chunk-G3YR53LY.js → chunk-KV4EQHK4.js} +4 -4
- package/Build/Workers/chunk-LSSWVB2X.js +138 -0
- package/Build/Workers/chunk-LXQ5QAEJ.js +196 -0
- package/Build/Workers/{chunk-RJYML24O.js → chunk-MBZH7YZ7.js} +414 -439
- package/Build/Workers/{chunk-BDFNKFOE.js → chunk-MKXWJTFQ.js} +4 -4
- package/Build/Workers/chunk-MMV6TO3P.js +101 -0
- package/Build/Workers/chunk-N4QEHO3U.js +75 -0
- package/Build/Workers/chunk-NVOABL76.js +100 -0
- package/Build/Workers/chunk-OAPA2RTG.js +239 -0
- package/Build/Workers/chunk-OE4MCOC7.js +421 -0
- package/Build/Workers/chunk-OJF4RTJG.js +634 -0
- package/Build/Workers/{chunk-C2CGMAIU.js → chunk-OOMCT7OL.js} +2 -2
- package/Build/Workers/{chunk-VO3ACQB2.js → chunk-OWGTMVDB.js} +6 -6
- package/Build/Workers/chunk-OXALEQPI.js +10364 -0
- package/Build/Workers/chunk-OXSI7N4C.js +768 -0
- package/Build/Workers/chunk-PNFHVBSF.js +2716 -0
- package/Build/Workers/chunk-POSRARY7.js +834 -0
- package/Build/Workers/chunk-QYQIVZBU.js +117 -0
- package/Build/Workers/chunk-R3TKLC6E.js +1075 -0
- package/Build/Workers/chunk-R4OIEIPE.js +500 -0
- package/Build/Workers/{chunk-LEABCTLP.js → chunk-R4ZEWO4I.js} +1 -1
- package/Build/Workers/{chunk-FXIHSF7O.js → chunk-RCK55EDX.js} +3 -3
- package/Build/Workers/chunk-RHBWXX7C.js +629 -0
- package/Build/Workers/{chunk-NTXTUNEF.js → chunk-RZLZWKFN.js} +1 -1
- package/Build/Workers/chunk-SAPFXU5X.js +102 -0
- package/Build/Workers/chunk-T6LPN7RI.js +2857 -0
- package/Build/Workers/{chunk-5S7OLEPK.js → chunk-TBBFDFCS.js} +2 -2
- package/Build/Workers/chunk-TF776XCO.js +1258 -0
- package/Build/Workers/chunk-TGY6H6N6.js +163 -0
- package/Build/Workers/{chunk-L6RTJ3RE.js → chunk-UCIPJSZX.js} +2 -2
- package/Build/Workers/chunk-UOEUCKKU.js +59 -0
- package/Build/Workers/chunk-VRZ46QZ5.js +781 -0
- package/Build/Workers/chunk-VYWUFRRR.js +1052 -0
- package/Build/Workers/{chunk-JYAHOGGL.js → chunk-WVSELU6O.js} +6 -6
- package/Build/Workers/chunk-X2ZQ7RJR.js +287 -0
- package/Build/Workers/{chunk-O3JCMSS3.js → chunk-X43SJLQL.js} +44 -0
- package/Build/Workers/chunk-XLTOBCDI.js +220 -0
- package/Build/Workers/{chunk-COYFZ5VA.js → chunk-XQI7XZHX.js} +1 -1
- package/Build/Workers/chunk-XUOJCLOH.js +511 -0
- package/Build/Workers/chunk-XZZNKIEV.js +157 -0
- package/Build/Workers/chunk-YLYBLJ3Y.js +73 -0
- package/Build/Workers/{chunk-OORVMGDU.js → chunk-ZEE2EIFD.js} +1 -1
- package/Build/Workers/chunk-ZIKGV7EL.js +58 -0
- package/Build/Workers/{chunk-DGS5QNIO.js → chunk-ZU334IDQ.js} +3 -3
- package/Build/Workers/combineGeometry.js +22 -22
- package/Build/Workers/createBoxGeometry.js +16 -16
- package/Build/Workers/createBoxOutlineGeometry.js +14 -14
- package/Build/Workers/createCircleGeometry.js +24 -24
- package/Build/Workers/createCircleOutlineGeometry.js +17 -17
- package/Build/Workers/createCoplanarPolygonGeometry.js +31 -31
- package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +29 -29
- package/Build/Workers/createCorridorGeometry.js +27 -27
- package/Build/Workers/createCorridorOutlineGeometry.js +26 -26
- package/Build/Workers/createCylinderGeometry.js +18 -18
- package/Build/Workers/createCylinderOutlineGeometry.js +16 -16
- package/Build/Workers/createEllipseGeometry.js +24 -24
- package/Build/Workers/createEllipseOutlineGeometry.js +17 -17
- package/Build/Workers/createEllipsoidGeometry.js +17 -17
- package/Build/Workers/createEllipsoidOutlineGeometry.js +16 -16
- package/Build/Workers/createFrustumGeometry.js +16 -16
- package/Build/Workers/createFrustumOutlineGeometry.js +16 -16
- package/Build/Workers/createGeometry.js +22 -22
- package/Build/Workers/createGroundPolylineGeometry.js +20 -20
- package/Build/Workers/createPlaneGeometry.js +14 -14
- package/Build/Workers/createPlaneOutlineGeometry.js +13 -13
- package/Build/Workers/createPolygonGeometry.js +30 -30
- package/Build/Workers/createPolygonOutlineGeometry.js +28 -28
- package/Build/Workers/createPolylineGeometry.js +23 -23
- package/Build/Workers/createPolylineVolumeGeometry.js +29 -29
- package/Build/Workers/createPolylineVolumeOutlineGeometry.js +25 -25
- package/Build/Workers/createRectangleGeometry.js +25 -25
- package/Build/Workers/createRectangleOutlineGeometry.js +18 -18
- package/Build/Workers/createSimplePolylineGeometry.js +21 -21
- package/Build/Workers/createSphereGeometry.js +17 -17
- package/Build/Workers/createSphereOutlineGeometry.js +16 -16
- package/Build/Workers/createTaskProcessorWorker.js +3 -3
- package/Build/Workers/createVectorTileClampedPolylines.js +13 -13
- package/Build/Workers/createVectorTileGeometries.js +22 -22
- package/Build/Workers/createVectorTilePoints.js +12 -12
- package/Build/Workers/createVectorTilePolygons.js +20 -20
- package/Build/Workers/createVectorTilePolylines.js +13 -13
- package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +20 -20
- package/Build/Workers/createVerticesFromHeightmap.js +20 -20
- package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +17 -17
- package/Build/Workers/createWallGeometry.js +22 -22
- package/Build/Workers/createWallOutlineGeometry.js +21 -21
- package/Build/Workers/decodeDraco.js +11 -11
- package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +5 -5
- package/Build/Workers/decodeI3S.js +10 -10
- package/Build/Workers/transcodeKTX2.js +8 -11
- package/Build/Workers/transferTypedArrayTest.js +1 -1
- package/Build/Workers/upsampleQuantizedTerrainMesh.js +20 -20
- package/Source/Core/Ion.js +1 -1
- package/Source/Core/Simon1994PlanetaryPositions.js +2 -1
- package/Source/Core/Transforms.js +137 -2
- package/Source/DataSources/BillboardGraphics.js +16 -0
- package/Source/DataSources/BillboardVisualizer.js +7 -0
- package/Source/DataSources/PathVisualizer.js +4 -4
- package/Source/DataSources/PointGraphics.js +17 -0
- package/Source/DataSources/PointVisualizer.js +12 -0
- package/Source/DataSources/PositionProperty.js +4 -7
- package/Source/Renderer/AutomaticUniforms.js +1 -1
- package/Source/Renderer/UniformState.js +5 -11
- package/Source/Scene/ArcGisMapService.js +1 -1
- package/Source/Scene/Billboard.js +29 -2
- package/Source/Scene/BillboardCollection.js +49 -0
- package/Source/Scene/BingMapsImageryProvider.js +10 -1
- package/Source/Scene/ImageBasedLighting.js +2 -2
- package/Source/Scene/Model/Model.js +1 -1
- package/Source/Scene/OctahedralProjectedCubeMap.js +5 -6
- package/Source/Scene/PointPrimitive.js +28 -2
- package/Source/Scene/PointPrimitiveCollection.js +22 -9
- package/Source/Shaders/BillboardCollectionFS.glsl +4 -0
- package/Source/Shaders/BillboardCollectionFS.js +4 -0
- package/Source/Shaders/BillboardCollectionVS.glsl +3 -1
- package/Source/Shaders/BillboardCollectionVS.js +3 -1
- package/Source/Shaders/BrdfLutGeneratorFS.glsl +30 -13
- package/Source/Shaders/BrdfLutGeneratorFS.js +30 -13
- package/Source/Shaders/Builtin/Functions/pbrLighting.glsl +40 -39
- package/Source/Shaders/Builtin/Functions/pbrLighting.js +40 -39
- package/Source/Shaders/Builtin/Functions/sampleOctahedralProjection.glsl +1 -1
- package/Source/Shaders/Builtin/Functions/sampleOctahedralProjection.js +1 -1
- package/Source/Shaders/Model/ImageBasedLightingStageFS.glsl +23 -23
- package/Source/Shaders/Model/ImageBasedLightingStageFS.js +23 -23
- package/Source/Shaders/Model/LightingStageFS.glsl +6 -5
- package/Source/Shaders/Model/LightingStageFS.js +6 -5
- package/Source/Shaders/Model/MaterialStageFS.glsl +10 -14
- package/Source/Shaders/Model/MaterialStageFS.js +10 -14
- package/Source/Shaders/PointPrimitiveCollectionFS.glsl +4 -0
- package/Source/Shaders/PointPrimitiveCollectionFS.js +4 -0
- package/Source/Shaders/PointPrimitiveCollectionVS.glsl +9 -7
- package/Source/Shaders/PointPrimitiveCollectionVS.js +9 -7
- package/index.d.ts +74 -5
- package/index.js +207 -207
- package/package.json +3 -3
|
@@ -17,10 +17,10 @@ vec3 getProceduralSkyMetrics(vec3 positionWC, vec3 reflectionWC)\n\
|
|
|
17
17
|
}\n\
|
|
18
18
|
\n\
|
|
19
19
|
/**\n\
|
|
20
|
-
* Compute the diffuse irradiance for a procedural sky lighting model
|
|
20
|
+
* Compute the diffuse irradiance for a procedural sky lighting model.\n\
|
|
21
21
|
*\n\
|
|
22
22
|
* @param {vec3} skyMetrics The dot products of the horizon and reflection directions with the nadir, and an atmosphere boundary distance.\n\
|
|
23
|
-
* @return {vec3} The computed diffuse irradiance
|
|
23
|
+
* @return {vec3} The computed diffuse irradiance.\n\
|
|
24
24
|
*/\n\
|
|
25
25
|
vec3 getProceduralDiffuseIrradiance(vec3 skyMetrics)\n\
|
|
26
26
|
{\n\
|
|
@@ -31,10 +31,12 @@ vec3 getProceduralDiffuseIrradiance(vec3 skyMetrics)\n\
|
|
|
31
31
|
}\n\
|
|
32
32
|
\n\
|
|
33
33
|
/**\n\
|
|
34
|
-
* Compute the specular irradiance for a procedural sky lighting model
|
|
34
|
+
* Compute the specular irradiance for a procedural sky lighting model.\n\
|
|
35
35
|
*\n\
|
|
36
|
+
* @param {vec3} reflectionWC The reflection vector in world coordinates.\n\
|
|
36
37
|
* @param {vec3} skyMetrics The dot products of the horizon and reflection directions with the nadir, and an atmosphere boundary distance.\n\
|
|
37
|
-
* @
|
|
38
|
+
* @param {float} roughness The roughness of the material.\n\
|
|
39
|
+
* @return {vec3} The computed specular irradiance.\n\
|
|
38
40
|
*/\n\
|
|
39
41
|
vec3 getProceduralSpecularIrradiance(vec3 reflectionWC, vec3 skyMetrics, float roughness)\n\
|
|
40
42
|
{\n\
|
|
@@ -43,7 +45,7 @@ vec3 getProceduralSpecularIrradiance(vec3 reflectionWC, vec3 skyMetrics, float r
|
|
|
43
45
|
reflectionWC = -normalize(czm_temeToPseudoFixed * reflectionWC);\n\
|
|
44
46
|
reflectionWC.x = -reflectionWC.x;\n\
|
|
45
47
|
\n\
|
|
46
|
-
float inverseRoughness = 1.
|
|
48
|
+
float inverseRoughness = 1.0 - roughness;\n\
|
|
47
49
|
inverseRoughness *= inverseRoughness;\n\
|
|
48
50
|
vec3 sceneSkyBox = czm_textureCube(czm_environmentMap, reflectionWC).rgb * inverseRoughness;\n\
|
|
49
51
|
\n\
|
|
@@ -122,7 +124,7 @@ float getSunLuminance(vec3 positionWC, vec3 normalEC, vec3 lightDirectionEC)\n\
|
|
|
122
124
|
) {\n\
|
|
123
125
|
vec3 viewDirectionEC = -normalize(positionEC);\n\
|
|
124
126
|
vec3 positionWC = vec3(czm_inverseView * vec4(positionEC, 1.0));\n\
|
|
125
|
-
vec3 reflectionWC = normalize(czm_inverseViewRotation *
|
|
127
|
+
vec3 reflectionWC = normalize(czm_inverseViewRotation * reflect(viewDirectionEC, normalEC));\n\
|
|
126
128
|
vec3 skyMetrics = getProceduralSkyMetrics(positionWC, reflectionWC);\n\
|
|
127
129
|
\n\
|
|
128
130
|
float roughness = material.roughness;\n\
|
|
@@ -174,11 +176,12 @@ vec3 sampleSpecularEnvironment(vec3 cubeDir, float roughness)\n\
|
|
|
174
176
|
return czm_sampleOctahedralProjection(czm_specularEnvironmentMaps, czm_specularEnvironmentMapSize, cubeDir, lod, maxLod);\n\
|
|
175
177
|
#endif\n\
|
|
176
178
|
}\n\
|
|
177
|
-
vec3 computeSpecularIBL(vec3 cubeDir, float NdotV,
|
|
179
|
+
vec3 computeSpecularIBL(vec3 cubeDir, float NdotV, vec3 f0, float roughness)\n\
|
|
178
180
|
{\n\
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
vec3
|
|
181
|
+
// see https://bruop.github.io/ibl/ at Single Scattering Results\n\
|
|
182
|
+
// Roughness dependent fresnel, from Fdez-Aguera\n\
|
|
183
|
+
vec3 f90 = max(vec3(1.0 - roughness), f0);\n\
|
|
184
|
+
vec3 F = fresnelSchlick2(f0, f90, NdotV);\n\
|
|
182
185
|
\n\
|
|
183
186
|
vec2 brdfLut = texture(czm_brdfLut, vec2(NdotV, roughness)).rg;\n\
|
|
184
187
|
vec3 specularSample = sampleSpecularEnvironment(cubeDir, roughness);\n\
|
|
@@ -203,34 +206,31 @@ vec3 textureIBL(\n\
|
|
|
203
206
|
vec3 lightDirectionEC,\n\
|
|
204
207
|
czm_modelMaterial material\n\
|
|
205
208
|
) {\n\
|
|
206
|
-
// Find the direction in which to sample the environment map\n\
|
|
207
|
-
vec3 cubeDir = normalize(model_iblReferenceFrameMatrix * normalize(reflect(-viewDirectionEC, normalEC)));\n\
|
|
208
|
-
\n\
|
|
209
209
|
#ifdef DIFFUSE_IBL\n\
|
|
210
|
-
vec3
|
|
210
|
+
vec3 normalMC = normalize(model_iblReferenceFrameMatrix * normalEC);\n\
|
|
211
|
+
vec3 diffuseContribution = computeDiffuseIBL(normalMC) * material.diffuse;\n\
|
|
211
212
|
#else\n\
|
|
212
213
|
vec3 diffuseContribution = vec3(0.0); \n\
|
|
213
214
|
#endif\n\
|
|
214
|
-
\n\
|
|
215
|
-
float roughness = material.roughness;\n\
|
|
216
215
|
\n\
|
|
217
216
|
#ifdef USE_ANISOTROPY\n\
|
|
218
|
-
//
|
|
217
|
+
// Bend normal to account for anisotropic distortion of specular reflection\n\
|
|
219
218
|
vec3 anisotropyDirection = material.anisotropicB;\n\
|
|
220
219
|
vec3 anisotropicTangent = cross(anisotropyDirection, viewDirectionEC);\n\
|
|
221
220
|
vec3 anisotropicNormal = cross(anisotropicTangent, anisotropyDirection);\n\
|
|
222
|
-
float bendFactor = 1.0 - material.anisotropyStrength * (1.0 - roughness);\n\
|
|
221
|
+
float bendFactor = 1.0 - material.anisotropyStrength * (1.0 - material.roughness);\n\
|
|
223
222
|
float bendFactorPow4 = bendFactor * bendFactor * bendFactor * bendFactor;\n\
|
|
224
223
|
vec3 bentNormal = normalize(mix(anisotropicNormal, normalEC, bendFactorPow4));\n\
|
|
225
|
-
|
|
224
|
+
vec3 reflectEC = reflect(-viewDirectionEC, bentNormal);\n\
|
|
225
|
+
#else\n\
|
|
226
|
+
vec3 reflectEC = reflect(-viewDirectionEC, normalEC);\n\
|
|
226
227
|
#endif\n\
|
|
227
228
|
\n\
|
|
228
229
|
#ifdef SPECULAR_IBL\n\
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
float VdotH = clamp(dot(viewDirectionEC, halfwayDirectionEC), 0.0, 1.0);\n\
|
|
230
|
+
vec3 reflectMC = normalize(model_iblReferenceFrameMatrix * reflectEC);\n\
|
|
231
|
+
float NdotV = clamp(dot(normalEC, viewDirectionEC), 0.0, 1.0);\n\
|
|
232
232
|
vec3 f0 = material.specular;\n\
|
|
233
|
-
vec3 specularContribution = computeSpecularIBL(
|
|
233
|
+
vec3 specularContribution = computeSpecularIBL(reflectMC, NdotV, f0, material.roughness);\n\
|
|
234
234
|
#else\n\
|
|
235
235
|
vec3 specularContribution = vec3(0.0); \n\
|
|
236
236
|
#endif\n\
|
|
@@ -34,18 +34,19 @@ vec3 addClearcoatReflection(vec3 baseLayerColor, vec3 position, vec3 lightDirect
|
|
|
34
34
|
|
|
35
35
|
// compute specular reflection from direct lighting
|
|
36
36
|
float roughness = material.clearcoatRoughness;
|
|
37
|
-
float
|
|
37
|
+
float alphaRoughness = roughness * roughness;
|
|
38
|
+
float directStrength = computeDirectSpecularStrength(normal, lightDirection, viewDirection, halfwayDirection, alphaRoughness);
|
|
38
39
|
vec3 directReflection = F * directStrength * NdotL;
|
|
39
40
|
vec3 color = lightColorHdr * directReflection;
|
|
40
41
|
|
|
41
42
|
#ifdef SPECULAR_IBL
|
|
42
43
|
// Find the direction in which to sample the environment map
|
|
43
|
-
vec3
|
|
44
|
-
vec3 iblColor = computeSpecularIBL(
|
|
44
|
+
vec3 reflectMC = normalize(model_iblReferenceFrameMatrix * reflect(-viewDirection, normal));
|
|
45
|
+
vec3 iblColor = computeSpecularIBL(reflectMC, NdotV, f0, roughness);
|
|
45
46
|
color += iblColor * material.occlusion;
|
|
46
47
|
#elif defined(USE_IBL_LIGHTING)
|
|
47
48
|
vec3 positionWC = vec3(czm_inverseView * vec4(position, 1.0));
|
|
48
|
-
vec3 reflectionWC = normalize(czm_inverseViewRotation *
|
|
49
|
+
vec3 reflectionWC = normalize(czm_inverseViewRotation * reflect(viewDirection, normal));
|
|
49
50
|
vec3 skyMetrics = getProceduralSkyMetrics(positionWC, reflectionWC);
|
|
50
51
|
|
|
51
52
|
vec3 specularIrradiance = getProceduralSpecularIrradiance(reflectionWC, skyMetrics, roughness);
|
|
@@ -57,7 +58,7 @@ vec3 addClearcoatReflection(vec3 baseLayerColor, vec3 position, vec3 lightDirect
|
|
|
57
58
|
#endif
|
|
58
59
|
float maximumComponent = czm_maximumComponent(lightColorHdr);
|
|
59
60
|
vec3 clampedLightColor = lightColorHdr / max(maximumComponent, 1.0);
|
|
60
|
-
color += clampedLightColor* iblColor * material.occlusion;
|
|
61
|
+
color += clampedLightColor * iblColor * material.occlusion;
|
|
61
62
|
#endif
|
|
62
63
|
|
|
63
64
|
float clearcoatFactor = material.clearcoatFactor;
|
|
@@ -35,18 +35,19 @@ vec3 addClearcoatReflection(vec3 baseLayerColor, vec3 position, vec3 lightDirect
|
|
|
35
35
|
\n\
|
|
36
36
|
// compute specular reflection from direct lighting\n\
|
|
37
37
|
float roughness = material.clearcoatRoughness;\n\
|
|
38
|
-
float
|
|
38
|
+
float alphaRoughness = roughness * roughness;\n\
|
|
39
|
+
float directStrength = computeDirectSpecularStrength(normal, lightDirection, viewDirection, halfwayDirection, alphaRoughness);\n\
|
|
39
40
|
vec3 directReflection = F * directStrength * NdotL;\n\
|
|
40
41
|
vec3 color = lightColorHdr * directReflection;\n\
|
|
41
42
|
\n\
|
|
42
43
|
#ifdef SPECULAR_IBL\n\
|
|
43
44
|
// Find the direction in which to sample the environment map\n\
|
|
44
|
-
vec3
|
|
45
|
-
vec3 iblColor = computeSpecularIBL(
|
|
45
|
+
vec3 reflectMC = normalize(model_iblReferenceFrameMatrix * reflect(-viewDirection, normal));\n\
|
|
46
|
+
vec3 iblColor = computeSpecularIBL(reflectMC, NdotV, f0, roughness);\n\
|
|
46
47
|
color += iblColor * material.occlusion;\n\
|
|
47
48
|
#elif defined(USE_IBL_LIGHTING)\n\
|
|
48
49
|
vec3 positionWC = vec3(czm_inverseView * vec4(position, 1.0));\n\
|
|
49
|
-
vec3 reflectionWC = normalize(czm_inverseViewRotation *
|
|
50
|
+
vec3 reflectionWC = normalize(czm_inverseViewRotation * reflect(viewDirection, normal));\n\
|
|
50
51
|
vec3 skyMetrics = getProceduralSkyMetrics(positionWC, reflectionWC);\n\
|
|
51
52
|
\n\
|
|
52
53
|
vec3 specularIrradiance = getProceduralSpecularIrradiance(reflectionWC, skyMetrics, roughness);\n\
|
|
@@ -58,7 +59,7 @@ vec3 addClearcoatReflection(vec3 baseLayerColor, vec3 position, vec3 lightDirect
|
|
|
58
59
|
#endif\n\
|
|
59
60
|
float maximumComponent = czm_maximumComponent(lightColorHdr);\n\
|
|
60
61
|
vec3 clampedLightColor = lightColorHdr / max(maximumComponent, 1.0);\n\
|
|
61
|
-
color += clampedLightColor* iblColor * material.occlusion;\n\
|
|
62
|
+
color += clampedLightColor * iblColor * material.occlusion;\n\
|
|
62
63
|
#endif\n\
|
|
63
64
|
\n\
|
|
64
65
|
float clearcoatFactor = material.clearcoatFactor;\n\
|
|
@@ -258,8 +258,7 @@ void setSpecularGlossiness(inout czm_modelMaterial material)
|
|
|
258
258
|
material.specular = specular;
|
|
259
259
|
|
|
260
260
|
// glossiness is the opposite of roughness, but easier for artists to use.
|
|
261
|
-
|
|
262
|
-
material.roughness = roughness * roughness;
|
|
261
|
+
material.roughness = 1.0 - glossiness;
|
|
263
262
|
}
|
|
264
263
|
#elif defined(LIGHTING_PBR)
|
|
265
264
|
float setMetallicRoughness(inout czm_modelMaterial material)
|
|
@@ -272,7 +271,7 @@ float setMetallicRoughness(inout czm_modelMaterial material)
|
|
|
272
271
|
|
|
273
272
|
vec3 metallicRoughness = texture(u_metallicRoughnessTexture, metallicRoughnessTexCoords).rgb;
|
|
274
273
|
float metalness = clamp(metallicRoughness.b, 0.0, 1.0);
|
|
275
|
-
float roughness = clamp(metallicRoughness.g, 0.
|
|
274
|
+
float roughness = clamp(metallicRoughness.g, 0.0, 1.0);
|
|
276
275
|
#ifdef HAS_METALLIC_FACTOR
|
|
277
276
|
metalness = clamp(metalness * u_metallicFactor, 0.0, 1.0);
|
|
278
277
|
#endif
|
|
@@ -288,7 +287,7 @@ float setMetallicRoughness(inout czm_modelMaterial material)
|
|
|
288
287
|
#endif
|
|
289
288
|
|
|
290
289
|
#ifdef HAS_ROUGHNESS_FACTOR
|
|
291
|
-
float roughness = clamp(u_roughnessFactor, 0.
|
|
290
|
+
float roughness = clamp(u_roughnessFactor, 0.0, 1.0);
|
|
292
291
|
#else
|
|
293
292
|
float roughness = 1.0;
|
|
294
293
|
#endif
|
|
@@ -303,9 +302,8 @@ float setMetallicRoughness(inout czm_modelMaterial material)
|
|
|
303
302
|
// diffuse only applies to dielectrics.
|
|
304
303
|
material.diffuse = mix(material.baseColor.rgb, vec3(0.0), metalness);
|
|
305
304
|
|
|
306
|
-
// roughness is
|
|
307
|
-
|
|
308
|
-
material.roughness = roughness * roughness;
|
|
305
|
+
// This is perceptual roughness. The square of this value is used for direct lighting
|
|
306
|
+
material.roughness = roughness;
|
|
309
307
|
|
|
310
308
|
return metalness;
|
|
311
309
|
}
|
|
@@ -418,9 +416,8 @@ void setClearcoat(inout czm_modelMaterial material, in ProcessedAttributes attri
|
|
|
418
416
|
#endif
|
|
419
417
|
|
|
420
418
|
material.clearcoatFactor = clearcoatFactor;
|
|
421
|
-
// roughness is
|
|
422
|
-
|
|
423
|
-
material.clearcoatRoughness = clearcoatRoughness * clearcoatRoughness;
|
|
419
|
+
// This is perceptual roughness. The square of this value is used for direct lighting
|
|
420
|
+
material.clearcoatRoughness = clearcoatRoughness;
|
|
424
421
|
#ifdef HAS_CLEARCOAT_NORMAL_TEXTURE
|
|
425
422
|
material.clearcoatNormal = getClearcoatNormalFromTexture(attributes, attributes.normalEC);
|
|
426
423
|
#else
|
|
@@ -458,14 +455,13 @@ void materialStage(inout czm_modelMaterial material, ProcessedAttributes attribu
|
|
|
458
455
|
baseColorWithAlpha *= color;
|
|
459
456
|
#endif
|
|
460
457
|
|
|
458
|
+
#ifdef USE_CPU_STYLING
|
|
459
|
+
baseColorWithAlpha.rgb = blend(baseColorWithAlpha.rgb, feature.color.rgb, model_colorBlend);
|
|
460
|
+
#endif
|
|
461
461
|
material.baseColor = baseColorWithAlpha;
|
|
462
462
|
material.diffuse = baseColorWithAlpha.rgb;
|
|
463
463
|
material.alpha = baseColorWithAlpha.a;
|
|
464
464
|
|
|
465
|
-
#ifdef USE_CPU_STYLING
|
|
466
|
-
material.diffuse = blend(material.diffuse, feature.color.rgb, model_colorBlend);
|
|
467
|
-
#endif
|
|
468
|
-
|
|
469
465
|
#ifdef HAS_OCCLUSION_TEXTURE
|
|
470
466
|
vec2 occlusionTexCoords = TEXCOORD_OCCLUSION;
|
|
471
467
|
#ifdef HAS_OCCLUSION_TEXTURE_TRANSFORM
|
|
@@ -259,8 +259,7 @@ void setSpecularGlossiness(inout czm_modelMaterial material)\n\
|
|
|
259
259
|
material.specular = specular;\n\
|
|
260
260
|
\n\
|
|
261
261
|
// glossiness is the opposite of roughness, but easier for artists to use.\n\
|
|
262
|
-
|
|
263
|
-
material.roughness = roughness * roughness;\n\
|
|
262
|
+
material.roughness = 1.0 - glossiness;\n\
|
|
264
263
|
}\n\
|
|
265
264
|
#elif defined(LIGHTING_PBR)\n\
|
|
266
265
|
float setMetallicRoughness(inout czm_modelMaterial material)\n\
|
|
@@ -273,7 +272,7 @@ float setMetallicRoughness(inout czm_modelMaterial material)\n\
|
|
|
273
272
|
\n\
|
|
274
273
|
vec3 metallicRoughness = texture(u_metallicRoughnessTexture, metallicRoughnessTexCoords).rgb;\n\
|
|
275
274
|
float metalness = clamp(metallicRoughness.b, 0.0, 1.0);\n\
|
|
276
|
-
float roughness = clamp(metallicRoughness.g, 0.
|
|
275
|
+
float roughness = clamp(metallicRoughness.g, 0.0, 1.0);\n\
|
|
277
276
|
#ifdef HAS_METALLIC_FACTOR\n\
|
|
278
277
|
metalness = clamp(metalness * u_metallicFactor, 0.0, 1.0);\n\
|
|
279
278
|
#endif\n\
|
|
@@ -289,7 +288,7 @@ float setMetallicRoughness(inout czm_modelMaterial material)\n\
|
|
|
289
288
|
#endif\n\
|
|
290
289
|
\n\
|
|
291
290
|
#ifdef HAS_ROUGHNESS_FACTOR\n\
|
|
292
|
-
float roughness = clamp(u_roughnessFactor, 0.
|
|
291
|
+
float roughness = clamp(u_roughnessFactor, 0.0, 1.0);\n\
|
|
293
292
|
#else\n\
|
|
294
293
|
float roughness = 1.0;\n\
|
|
295
294
|
#endif\n\
|
|
@@ -304,9 +303,8 @@ float setMetallicRoughness(inout czm_modelMaterial material)\n\
|
|
|
304
303
|
// diffuse only applies to dielectrics.\n\
|
|
305
304
|
material.diffuse = mix(material.baseColor.rgb, vec3(0.0), metalness);\n\
|
|
306
305
|
\n\
|
|
307
|
-
// roughness is
|
|
308
|
-
|
|
309
|
-
material.roughness = roughness * roughness;\n\
|
|
306
|
+
// This is perceptual roughness. The square of this value is used for direct lighting\n\
|
|
307
|
+
material.roughness = roughness;\n\
|
|
310
308
|
\n\
|
|
311
309
|
return metalness;\n\
|
|
312
310
|
}\n\
|
|
@@ -419,9 +417,8 @@ void setClearcoat(inout czm_modelMaterial material, in ProcessedAttributes attri
|
|
|
419
417
|
#endif\n\
|
|
420
418
|
\n\
|
|
421
419
|
material.clearcoatFactor = clearcoatFactor;\n\
|
|
422
|
-
// roughness is
|
|
423
|
-
|
|
424
|
-
material.clearcoatRoughness = clearcoatRoughness * clearcoatRoughness;\n\
|
|
420
|
+
// This is perceptual roughness. The square of this value is used for direct lighting\n\
|
|
421
|
+
material.clearcoatRoughness = clearcoatRoughness;\n\
|
|
425
422
|
#ifdef HAS_CLEARCOAT_NORMAL_TEXTURE\n\
|
|
426
423
|
material.clearcoatNormal = getClearcoatNormalFromTexture(attributes, attributes.normalEC);\n\
|
|
427
424
|
#else\n\
|
|
@@ -459,13 +456,12 @@ void materialStage(inout czm_modelMaterial material, ProcessedAttributes attribu
|
|
|
459
456
|
baseColorWithAlpha *= color;\n\
|
|
460
457
|
#endif\n\
|
|
461
458
|
\n\
|
|
459
|
+
#ifdef USE_CPU_STYLING\n\
|
|
460
|
+
baseColorWithAlpha.rgb = blend(baseColorWithAlpha.rgb, feature.color.rgb, model_colorBlend);\n\
|
|
461
|
+
#endif\n\
|
|
462
462
|
material.baseColor = baseColorWithAlpha;\n\
|
|
463
463
|
material.diffuse = baseColorWithAlpha.rgb;\n\
|
|
464
464
|
material.alpha = baseColorWithAlpha.a;\n\
|
|
465
|
-
\n\
|
|
466
|
-
#ifdef USE_CPU_STYLING\n\
|
|
467
|
-
material.diffuse = blend(material.diffuse, feature.color.rgb, model_colorBlend);\n\
|
|
468
|
-
#endif\n\
|
|
469
465
|
\n\
|
|
470
466
|
#ifdef HAS_OCCLUSION_TEXTURE\n\
|
|
471
467
|
vec2 occlusionTexCoords = TEXCOORD_OCCLUSION;\n\
|
|
@@ -3,9 +3,13 @@ in vec4 v_outlineColor;
|
|
|
3
3
|
in float v_innerPercent;
|
|
4
4
|
in float v_pixelDistance;
|
|
5
5
|
in vec4 v_pickColor;
|
|
6
|
+
in float v_splitDirection;
|
|
6
7
|
|
|
7
8
|
void main()
|
|
8
9
|
{
|
|
10
|
+
if (v_splitDirection < 0.0 && gl_FragCoord.x > czm_splitPosition) discard;
|
|
11
|
+
if (v_splitDirection > 0.0 && gl_FragCoord.x < czm_splitPosition) discard;
|
|
12
|
+
|
|
9
13
|
// The distance in UV space from this fragment to the center of the point, at most 0.5.
|
|
10
14
|
float distanceToCenter = length(gl_PointCoord - vec2(0.5));
|
|
11
15
|
// The max distance stops one pixel shy of the edge to leave space for anti-aliasing.
|
|
@@ -4,9 +4,13 @@ in vec4 v_outlineColor;\n\
|
|
|
4
4
|
in float v_innerPercent;\n\
|
|
5
5
|
in float v_pixelDistance;\n\
|
|
6
6
|
in vec4 v_pickColor;\n\
|
|
7
|
+
in float v_splitDirection;\n\
|
|
7
8
|
\n\
|
|
8
9
|
void main()\n\
|
|
9
10
|
{\n\
|
|
11
|
+
if (v_splitDirection < 0.0 && gl_FragCoord.x > czm_splitPosition) discard;\n\
|
|
12
|
+
if (v_splitDirection > 0.0 && gl_FragCoord.x < czm_splitPosition) discard;\n\
|
|
13
|
+
\n\
|
|
10
14
|
// The distance in UV space from this fragment to the center of the point, at most 0.5.\n\
|
|
11
15
|
float distanceToCenter = length(gl_PointCoord - vec2(0.5));\n\
|
|
12
16
|
// The max distance stops one pixel shy of the edge to leave space for anti-aliasing.\n\
|
|
@@ -2,16 +2,17 @@ uniform float u_maxTotalPointSize;
|
|
|
2
2
|
|
|
3
3
|
in vec4 positionHighAndSize;
|
|
4
4
|
in vec4 positionLowAndOutline;
|
|
5
|
-
in vec4 compressedAttribute0;
|
|
6
|
-
in vec4 compressedAttribute1;
|
|
7
|
-
in vec4 scaleByDistance;
|
|
8
|
-
in
|
|
5
|
+
in vec4 compressedAttribute0; // color, outlineColor, pick color
|
|
6
|
+
in vec4 compressedAttribute1; // show, translucency by distance, some free space
|
|
7
|
+
in vec4 scaleByDistance; // near, nearScale, far, farScale
|
|
8
|
+
in vec4 distanceDisplayConditionAndDisableDepthAndSplitDirection; // near, far, disableDepthTestDistance, splitDirection
|
|
9
9
|
|
|
10
10
|
out vec4 v_color;
|
|
11
11
|
out vec4 v_outlineColor;
|
|
12
12
|
out float v_innerPercent;
|
|
13
13
|
out float v_pixelDistance;
|
|
14
14
|
out vec4 v_pickColor;
|
|
15
|
+
out float v_splitDirection;
|
|
15
16
|
|
|
16
17
|
const float SHIFT_LEFT8 = 256.0;
|
|
17
18
|
const float SHIFT_RIGHT8 = 1.0 / 256.0;
|
|
@@ -135,8 +136,8 @@ void main()
|
|
|
135
136
|
#endif
|
|
136
137
|
|
|
137
138
|
#ifdef DISTANCE_DISPLAY_CONDITION
|
|
138
|
-
float nearSq =
|
|
139
|
-
float farSq =
|
|
139
|
+
float nearSq = distanceDisplayConditionAndDisableDepthAndSplitDirection.x;
|
|
140
|
+
float farSq = distanceDisplayConditionAndDisableDepthAndSplitDirection.y;
|
|
140
141
|
if (lengthSq < nearSq || lengthSq > farSq) {
|
|
141
142
|
// push vertex behind camera to force it to be clipped
|
|
142
143
|
positionEC.xyz = vec3(0.0, 0.0, 1.0);
|
|
@@ -147,7 +148,7 @@ void main()
|
|
|
147
148
|
czm_vertexLogDepth();
|
|
148
149
|
|
|
149
150
|
#ifdef DISABLE_DEPTH_DISTANCE
|
|
150
|
-
float disableDepthTestDistance =
|
|
151
|
+
float disableDepthTestDistance = distanceDisplayConditionAndDisableDepthAndSplitDirection.z;
|
|
151
152
|
if (disableDepthTestDistance == 0.0 && czm_minimumDisableDepthTestDistance != 0.0)
|
|
152
153
|
{
|
|
153
154
|
disableDepthTestDistance = czm_minimumDisableDepthTestDistance;
|
|
@@ -180,4 +181,5 @@ void main()
|
|
|
180
181
|
gl_Position *= show;
|
|
181
182
|
|
|
182
183
|
v_pickColor = pickColor;
|
|
184
|
+
v_splitDirection = distanceDisplayConditionAndDisableDepthAndSplitDirection.w;
|
|
183
185
|
}
|
|
@@ -3,16 +3,17 @@ export default "uniform float u_maxTotalPointSize;\n\
|
|
|
3
3
|
\n\
|
|
4
4
|
in vec4 positionHighAndSize;\n\
|
|
5
5
|
in vec4 positionLowAndOutline;\n\
|
|
6
|
-
in vec4 compressedAttribute0;
|
|
7
|
-
in vec4 compressedAttribute1;
|
|
8
|
-
in vec4 scaleByDistance;
|
|
9
|
-
in
|
|
6
|
+
in vec4 compressedAttribute0; // color, outlineColor, pick color\n\
|
|
7
|
+
in vec4 compressedAttribute1; // show, translucency by distance, some free space\n\
|
|
8
|
+
in vec4 scaleByDistance; // near, nearScale, far, farScale\n\
|
|
9
|
+
in vec4 distanceDisplayConditionAndDisableDepthAndSplitDirection; // near, far, disableDepthTestDistance, splitDirection\n\
|
|
10
10
|
\n\
|
|
11
11
|
out vec4 v_color;\n\
|
|
12
12
|
out vec4 v_outlineColor;\n\
|
|
13
13
|
out float v_innerPercent;\n\
|
|
14
14
|
out float v_pixelDistance;\n\
|
|
15
15
|
out vec4 v_pickColor;\n\
|
|
16
|
+
out float v_splitDirection;\n\
|
|
16
17
|
\n\
|
|
17
18
|
const float SHIFT_LEFT8 = 256.0;\n\
|
|
18
19
|
const float SHIFT_RIGHT8 = 1.0 / 256.0;\n\
|
|
@@ -136,8 +137,8 @@ void main()\n\
|
|
|
136
137
|
#endif\n\
|
|
137
138
|
\n\
|
|
138
139
|
#ifdef DISTANCE_DISPLAY_CONDITION\n\
|
|
139
|
-
float nearSq =
|
|
140
|
-
float farSq =
|
|
140
|
+
float nearSq = distanceDisplayConditionAndDisableDepthAndSplitDirection.x;\n\
|
|
141
|
+
float farSq = distanceDisplayConditionAndDisableDepthAndSplitDirection.y;\n\
|
|
141
142
|
if (lengthSq < nearSq || lengthSq > farSq) {\n\
|
|
142
143
|
// push vertex behind camera to force it to be clipped\n\
|
|
143
144
|
positionEC.xyz = vec3(0.0, 0.0, 1.0);\n\
|
|
@@ -148,7 +149,7 @@ void main()\n\
|
|
|
148
149
|
czm_vertexLogDepth();\n\
|
|
149
150
|
\n\
|
|
150
151
|
#ifdef DISABLE_DEPTH_DISTANCE\n\
|
|
151
|
-
float disableDepthTestDistance =
|
|
152
|
+
float disableDepthTestDistance = distanceDisplayConditionAndDisableDepthAndSplitDirection.z;\n\
|
|
152
153
|
if (disableDepthTestDistance == 0.0 && czm_minimumDisableDepthTestDistance != 0.0)\n\
|
|
153
154
|
{\n\
|
|
154
155
|
disableDepthTestDistance = czm_minimumDisableDepthTestDistance;\n\
|
|
@@ -181,5 +182,6 @@ void main()\n\
|
|
|
181
182
|
gl_Position *= show;\n\
|
|
182
183
|
\n\
|
|
183
184
|
v_pickColor = pickColor;\n\
|
|
185
|
+
v_splitDirection = distanceDisplayConditionAndDisableDepthAndSplitDirection.w;\n\
|
|
184
186
|
}\n\
|
|
185
187
|
";
|
package/index.d.ts
CHANGED
|
@@ -15890,7 +15890,7 @@ export namespace Simon1994PlanetaryPositions {
|
|
|
15890
15890
|
function computeSunPositionInEarthInertialFrame(julianDate?: JulianDate, result?: Cartesian3): Cartesian3;
|
|
15891
15891
|
/**
|
|
15892
15892
|
* Computes the position of the Moon in the Earth-centered inertial frame
|
|
15893
|
-
* @param [julianDate] - The time at which to compute the
|
|
15893
|
+
* @param [julianDate] - The time at which to compute the Moon's position, if not provided the current system time is used.
|
|
15894
15894
|
* @param [result] - The object onto which to store the result.
|
|
15895
15895
|
* @returns Calculated moon position
|
|
15896
15896
|
*/
|
|
@@ -17292,6 +17292,21 @@ export namespace Transforms {
|
|
|
17292
17292
|
* @returns The modified result parameter or a new HeadingPitchRoll instance if none was provided.
|
|
17293
17293
|
*/
|
|
17294
17294
|
function fixedFrameToHeadingPitchRoll(transform: Matrix4, ellipsoid?: Ellipsoid, fixedFrameTransform?: Transforms.LocalFrameToFixedFrame, result?: HeadingPitchRoll): HeadingPitchRoll;
|
|
17295
|
+
/**
|
|
17296
|
+
* The default function to compute a rotation matrix to transform a point or vector from the International Celestial
|
|
17297
|
+
* Reference Frame (GCRF/ICRF) inertial frame axes to the central body, typically Earth, fixed frame axis at a given
|
|
17298
|
+
* time for use in lighting and transformation from inertial reference frames. This function may return undefined if
|
|
17299
|
+
* the data necessary to do the transformation is not yet loaded.
|
|
17300
|
+
* @example
|
|
17301
|
+
* // Set the default ICRF to fixed transformation to that of the Moon.
|
|
17302
|
+
* Cesium.Transforms.computeIcrfToCentralBodyFixedMatrix = Cesium.Transforms.computeIcrfToMoonFixedMatrix;
|
|
17303
|
+
* @param date - The time at which to compute the rotation matrix.
|
|
17304
|
+
* @param [result] - The object onto which to store the result. If this parameter is
|
|
17305
|
+
* not specified, a new instance is created and returned.
|
|
17306
|
+
* @returns The rotation matrix, or undefined if the data necessary to do the
|
|
17307
|
+
* transformation is not yet loaded.
|
|
17308
|
+
*/
|
|
17309
|
+
function computeIcrfToCentralBodyFixedMatrix(date: JulianDate, result?: Matrix3): Matrix3 | undefined;
|
|
17295
17310
|
/**
|
|
17296
17311
|
* Computes a rotation matrix to transform a point or vector from True Equator Mean Equinox (TEME) axes to the
|
|
17297
17312
|
* pseudo-fixed axes at a given time. This method treats the UT1 time standard as equivalent to UTC.
|
|
@@ -17345,7 +17360,39 @@ export namespace Transforms {
|
|
|
17345
17360
|
* @returns The rotation matrix, or undefined if the data necessary to do the
|
|
17346
17361
|
* transformation is not yet loaded.
|
|
17347
17362
|
*/
|
|
17348
|
-
function computeIcrfToFixedMatrix(date: JulianDate, result?: Matrix3): Matrix3;
|
|
17363
|
+
function computeIcrfToFixedMatrix(date: JulianDate, result?: Matrix3): Matrix3 | undefined;
|
|
17364
|
+
/**
|
|
17365
|
+
* Computes a rotation matrix to transform a point or vector from the Moon-Fixed frame axes
|
|
17366
|
+
* to the International Celestial Reference Frame (GCRF/ICRF) inertial frame axes
|
|
17367
|
+
* at a given time.
|
|
17368
|
+
* @example
|
|
17369
|
+
* // Transform a point from the Fixed axes to the ICRF axes.
|
|
17370
|
+
* const now = Cesium.JulianDate.now();
|
|
17371
|
+
* const pointInFixed = Cesium.Cartesian3.fromDegrees(0.0, 0.0);
|
|
17372
|
+
* const fixedToIcrf = Cesium.Transforms.computeMoonFixedToIcrfMatrix(now);
|
|
17373
|
+
* let pointInInertial = new Cesium.Cartesian3();
|
|
17374
|
+
* if (Cesium.defined(fixedToIcrf)) {
|
|
17375
|
+
* pointInInertial = Cesium.Matrix3.multiplyByVector(fixedToIcrf, pointInFixed, pointInInertial);
|
|
17376
|
+
* }
|
|
17377
|
+
* @param date - The time at which to compute the rotation matrix.
|
|
17378
|
+
* @param [result] - The object onto which to store the result. If this parameter is
|
|
17379
|
+
* not specified, a new instance is created and returned.
|
|
17380
|
+
* @returns The rotation matrix.
|
|
17381
|
+
*/
|
|
17382
|
+
function computeMoonFixedToIcrfMatrix(date: JulianDate, result?: Matrix3): Matrix3;
|
|
17383
|
+
/**
|
|
17384
|
+
* Computes a rotation matrix to transform a point or vector from the International Celestial
|
|
17385
|
+
* Reference Frame (GCRF/ICRF) inertial frame axes to the Moon-Fixed frame axes
|
|
17386
|
+
* at a given time.
|
|
17387
|
+
* @example
|
|
17388
|
+
* // Set the default ICRF to fixed transformation to that of the Moon.
|
|
17389
|
+
* Cesium.Transforms.computeIcrfToCentralBodyFixedMatrix = Cesium.Transforms.computeIcrfToMoonFixedMatrix;
|
|
17390
|
+
* @param date - The time at which to compute the rotation matrix.
|
|
17391
|
+
* @param [result] - The object onto which to store the result. If this parameter is
|
|
17392
|
+
* not specified, a new instance is created and returned.
|
|
17393
|
+
* @returns The rotation matrix.
|
|
17394
|
+
*/
|
|
17395
|
+
function computeIcrfToMoonFixedMatrix(date: JulianDate, result?: Matrix3): Matrix3;
|
|
17349
17396
|
/**
|
|
17350
17397
|
* Computes a rotation matrix to transform a point or vector from the Earth-Fixed frame axes (ITRF)
|
|
17351
17398
|
* to the International Celestial Reference Frame (GCRF/ICRF) inertial frame axes
|
|
@@ -17366,7 +17413,7 @@ export namespace Transforms {
|
|
|
17366
17413
|
* @returns The rotation matrix, or undefined if the data necessary to do the
|
|
17367
17414
|
* transformation is not yet loaded.
|
|
17368
17415
|
*/
|
|
17369
|
-
function computeFixedToIcrfMatrix(date: JulianDate, result?: Matrix3): Matrix3;
|
|
17416
|
+
function computeFixedToIcrfMatrix(date: JulianDate, result?: Matrix3): Matrix3 | undefined;
|
|
17370
17417
|
/**
|
|
17371
17418
|
* Transform a point from model coordinates to window coordinates.
|
|
17372
17419
|
* @param modelViewProjectionMatrix - The 4x4 model-view-projection matrix.
|
|
@@ -18654,6 +18701,7 @@ export namespace BillboardGraphics {
|
|
|
18654
18701
|
* @property [imageSubRegion] - A Property specifying a {@link BoundingRectangle} that defines a sub-region of the image to use for the billboard, rather than the entire image, measured in pixels from the bottom-left.
|
|
18655
18702
|
* @property [distanceDisplayCondition] - A Property specifying at what distance from the camera that this billboard will be displayed.
|
|
18656
18703
|
* @property [disableDepthTestDistance] - A Property specifying the distance from the camera at which to disable the depth test to.
|
|
18704
|
+
* @property [splitDirection] - A Property specifying the {@link SplitDirection} of the billboard.
|
|
18657
18705
|
*/
|
|
18658
18706
|
type ConstructorOptions = {
|
|
18659
18707
|
show?: Property | boolean;
|
|
@@ -18676,6 +18724,7 @@ export namespace BillboardGraphics {
|
|
|
18676
18724
|
imageSubRegion?: Property | BoundingRectangle;
|
|
18677
18725
|
distanceDisplayCondition?: Property | DistanceDisplayCondition;
|
|
18678
18726
|
disableDepthTestDistance?: Property | number;
|
|
18727
|
+
splitDirection?: Property | SplitDirection;
|
|
18679
18728
|
};
|
|
18680
18729
|
}
|
|
18681
18730
|
|
|
@@ -18842,6 +18891,10 @@ export class BillboardGraphics {
|
|
|
18842
18891
|
* When set to zero, the depth test is always applied. When set to Number.POSITIVE_INFINITY, the depth test is never applied.
|
|
18843
18892
|
*/
|
|
18844
18893
|
disableDepthTestDistance: Property | undefined;
|
|
18894
|
+
/**
|
|
18895
|
+
* Gets or sets the Property specifying the {@link SplitDirection} of this billboard.
|
|
18896
|
+
*/
|
|
18897
|
+
splitDirection: Property | undefined;
|
|
18845
18898
|
/**
|
|
18846
18899
|
* Duplicates this instance.
|
|
18847
18900
|
* @param [result] - The object onto which to store the result.
|
|
@@ -22994,6 +23047,7 @@ export namespace PointGraphics {
|
|
|
22994
23047
|
* @property [translucencyByDistance] - A {@link NearFarScalar} Property used to set translucency based on distance from the camera.
|
|
22995
23048
|
* @property [distanceDisplayCondition] - A Property specifying at what distance from the camera that this point will be displayed.
|
|
22996
23049
|
* @property [disableDepthTestDistance] - A Property specifying the distance from the camera at which to disable the depth test to.
|
|
23050
|
+
* @property [splitDirection] - A Property specifying the {@link SplitDirection} split to apply to this point.
|
|
22997
23051
|
*/
|
|
22998
23052
|
type ConstructorOptions = {
|
|
22999
23053
|
show?: Property | boolean;
|
|
@@ -23006,6 +23060,7 @@ export namespace PointGraphics {
|
|
|
23006
23060
|
translucencyByDistance?: Property | NearFarScalar;
|
|
23007
23061
|
distanceDisplayCondition?: Property | DistanceDisplayCondition;
|
|
23008
23062
|
disableDepthTestDistance?: Property | number;
|
|
23063
|
+
splitDirection?: Property | SplitDirection;
|
|
23009
23064
|
};
|
|
23010
23065
|
}
|
|
23011
23066
|
|
|
@@ -23065,6 +23120,10 @@ export class PointGraphics {
|
|
|
23065
23120
|
* When set to zero, the depth test is always applied. When set to Number.POSITIVE_INFINITY, the depth test is never applied.
|
|
23066
23121
|
*/
|
|
23067
23122
|
disableDepthTestDistance: Property | undefined;
|
|
23123
|
+
/**
|
|
23124
|
+
* Gets or sets the Property specifying the {@link SplitDirection} of this point.
|
|
23125
|
+
*/
|
|
23126
|
+
splitDirection: Property | undefined;
|
|
23068
23127
|
/**
|
|
23069
23128
|
* Duplicates this instance.
|
|
23070
23129
|
* @param [result] - The object onto which to store the result.
|
|
@@ -25865,6 +25924,7 @@ export namespace Billboard {
|
|
|
25865
25924
|
* @property [imageSubRegion] - A {@link BoundingRectangle} Specifying the sub-region of the image to use for the billboard, rather than the entire image.
|
|
25866
25925
|
* @property [distanceDisplayCondition] - A {@link DistanceDisplayCondition} Specifying the distance from the camera at which this billboard will be displayed.
|
|
25867
25926
|
* @property [disableDepthTestDistance] - A number specifying the distance from the camera at which to disable the depth test to, for example, prevent clipping against terrain.
|
|
25927
|
+
* @property [splitDirection] - A {@link SplitDirection} Specifying the split property of the billboard.
|
|
25868
25928
|
*/
|
|
25869
25929
|
type ConstructorOptions = {
|
|
25870
25930
|
position: Cartesian3;
|
|
@@ -25889,6 +25949,7 @@ export namespace Billboard {
|
|
|
25889
25949
|
imageSubRegion?: BoundingRectangle;
|
|
25890
25950
|
distanceDisplayCondition?: DistanceDisplayCondition;
|
|
25891
25951
|
disableDepthTestDistance?: number;
|
|
25952
|
+
splitDirection?: SplitDirection;
|
|
25892
25953
|
};
|
|
25893
25954
|
/**
|
|
25894
25955
|
* A function that creates an image.
|
|
@@ -26155,6 +26216,10 @@ export class Billboard {
|
|
|
26155
26216
|
* has been downloaded and the WebGL resources are created.
|
|
26156
26217
|
*/
|
|
26157
26218
|
readonly ready: boolean;
|
|
26219
|
+
/**
|
|
26220
|
+
* Gets or sets the {@link SplitDirection} of this billboard.
|
|
26221
|
+
*/
|
|
26222
|
+
splitDirection: SplitDirection;
|
|
26158
26223
|
/**
|
|
26159
26224
|
* <p>
|
|
26160
26225
|
* Sets the image to be used for this billboard. If a texture has already been created for the
|
|
@@ -33541,8 +33606,8 @@ export class ImageBasedLighting {
|
|
|
33541
33606
|
* </p>
|
|
33542
33607
|
*
|
|
33543
33608
|
* These values can be obtained by preprocessing the environment map using the <code>cmgen</code> tool of
|
|
33544
|
-
* {@link https://github.com/google/filament/releases|Google's Filament project}.
|
|
33545
|
-
*
|
|
33609
|
+
* {@link https://github.com/google/filament/releases|Google's Filament project}.
|
|
33610
|
+
* Be sure to use the <code>--no-mirror</code> option in <code>cmgen</code>.
|
|
33546
33611
|
*/
|
|
33547
33612
|
sphericalHarmonicCoefficients: Cartesian3[];
|
|
33548
33613
|
/**
|
|
@@ -38327,6 +38392,10 @@ export class PointPrimitive {
|
|
|
38327
38392
|
* Gets or sets the user-defined value returned when the point is picked.
|
|
38328
38393
|
*/
|
|
38329
38394
|
id: any;
|
|
38395
|
+
/**
|
|
38396
|
+
* The {@link SplitDirection} to apply to this point.
|
|
38397
|
+
*/
|
|
38398
|
+
splitDirection: SplitDirection;
|
|
38330
38399
|
/**
|
|
38331
38400
|
* Computes the screen-space position of the point's origin.
|
|
38332
38401
|
* The screen space origin is the top, left corner of the canvas; <code>x</code> increases from
|