@cesium/engine 24.0.0 → 25.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Build/Workers/{chunk-NKT5K3K3.js → chunk-35H3UBIO.js} +13 -12
- package/Build/Workers/{chunk-5A2SW66E.js → chunk-3LSD7OOA.js} +16 -16
- package/Build/Workers/{chunk-HXJMS2ZI.js → chunk-3RFFPH4M.js} +1 -1
- package/Build/Workers/{chunk-EDXL4W76.js → chunk-3TKLDHV3.js} +2 -2
- package/Build/Workers/{chunk-GQUNK2XC.js → chunk-3VDDRF2E.js} +14 -14
- package/Build/Workers/{chunk-Q3C6VQH6.js → chunk-3XY3MVPG.js} +4 -4
- package/Build/Workers/{chunk-A47HVBC5.js → chunk-4GF4MVPY.js} +7 -7
- package/Build/Workers/{chunk-YQFTYQMZ.js → chunk-4MTRQFJP.js} +3 -2
- package/Build/Workers/{chunk-N65BAKSH.js → chunk-4QQXGTCE.js} +8 -8
- package/Build/Workers/{chunk-EV3VGO6Y.js → chunk-4XXHJI6Y.js} +17 -17
- package/Build/Workers/{chunk-DHKPFLSJ.js → chunk-5T6QQAJW.js} +3 -2
- package/Build/Workers/{chunk-UIGVOKKI.js → chunk-6SDGQI27.js} +3 -2
- package/Build/Workers/{chunk-ILMFADZA.js → chunk-77RL3MBD.js} +6 -5
- package/Build/Workers/{chunk-2N4KDHS3.js → chunk-7LSFAEWF.js} +12 -11
- package/Build/Workers/{chunk-44EMEGKW.js → chunk-A7A433MD.js} +5 -5
- package/Build/Workers/{chunk-J6AW5YHS.js → chunk-A7ZBMVFS.js} +14 -14
- package/Build/Workers/{chunk-XJRBB253.js → chunk-ACFFCHHZ.js} +11 -11
- package/Build/Workers/{chunk-MKM27KGV.js → chunk-AEAVLYPS.js} +2 -2
- package/Build/Workers/{chunk-7MDYBRYJ.js → chunk-AWFZHD2B.js} +4 -4
- package/Build/Workers/{chunk-UQU4RXLT.js → chunk-BTX2NL3P.js} +50 -45
- package/Build/Workers/{chunk-4TIG36AW.js → chunk-BVAIWR7O.js} +12 -12
- package/Build/Workers/chunk-CKQP3DSS.js +973 -0
- package/Build/Workers/{chunk-VLDEUTOP.js → chunk-CZ23Y3RM.js} +2 -2
- package/Build/Workers/{chunk-NPF7SSHZ.js → chunk-DFEI5MAV.js} +7 -7
- package/Build/Workers/{chunk-AJLTU6PF.js → chunk-DH26SNAB.js} +4 -1
- package/Build/Workers/{chunk-5GXYJQ2K.js → chunk-DYT5NR6P.js} +3 -3
- package/Build/Workers/{chunk-63SIWPLS.js → chunk-EZARA5FJ.js} +13 -13
- package/Build/Workers/{chunk-AMIHNSST.js → chunk-FIBS5S7R.js} +2 -2
- package/Build/Workers/{chunk-Y7HNNPNK.js → chunk-FVLVVOBQ.js} +10 -10
- package/Build/Workers/{chunk-XY6HMDGI.js → chunk-GL7DNVUS.js} +5 -5
- package/Build/Workers/{chunk-6WLHJFD3.js → chunk-GPIGURCG.js} +59 -32
- package/Build/Workers/{chunk-B6SCUUFP.js → chunk-H2A4USJR.js} +10 -10
- package/Build/Workers/chunk-HSVQATK2.js +147 -0
- package/Build/Workers/{chunk-72VYSVEW.js → chunk-HVMG6AG4.js} +11 -10
- package/Build/Workers/{chunk-LXMCPFFS.js → chunk-I3A6DXYZ.js} +4 -4
- package/Build/Workers/{chunk-7QRFIKWQ.js → chunk-ITD2IN7N.js} +2 -2
- package/Build/Workers/{chunk-RQNJD3O4.js → chunk-J3OFS2RD.js} +12 -12
- package/Build/Workers/{chunk-C6P4IG5P.js → chunk-J647NNZW.js} +6 -6
- package/Build/Workers/{chunk-7X322WP2.js → chunk-J7KQEKPK.js} +13 -13
- package/Build/Workers/{chunk-7O5XJTVE.js → chunk-K6NFIRFB.js} +5 -5
- package/Build/Workers/{chunk-AF3MU2RL.js → chunk-LH5SF3XV.js} +7 -6
- package/Build/Workers/{chunk-GOQBUCXH.js → chunk-ND3NTTOF.js} +708 -430
- package/Build/Workers/chunk-QO2CGXMP.js +2342 -0
- package/Build/Workers/chunk-QSDY4NS7.js +1287 -0
- package/Build/Workers/chunk-QXNQQYPV.js +3201 -0
- package/Build/Workers/{chunk-YAOZMOFL.js → chunk-ST2UWDUU.js} +5 -5
- package/Build/Workers/{chunk-PVV64VFW.js → chunk-TA777BGS.js} +3 -2
- package/Build/Workers/{chunk-ISY4EZCA.js → chunk-TAI4HLII.js} +4 -4
- package/Build/Workers/{chunk-JCI63T3K.js → chunk-URUCCIPS.js} +6 -6
- package/Build/Workers/{chunk-VMVOUQ5J.js → chunk-VQKLRBIK.js} +7 -7
- package/Build/Workers/{chunk-6MPGQEHA.js → chunk-WC57YYBN.js} +2 -2
- package/Build/Workers/{chunk-BJD6QGXZ.js → chunk-WN6P5UDH.js} +12 -12
- package/Build/Workers/{chunk-LIB2H534.js → chunk-WNN5D4W3.js} +12 -11
- package/Build/Workers/{chunk-D4EJ2NXG.js → chunk-WTQGE7Q6.js} +17 -17
- package/Build/Workers/{chunk-YJZGW74L.js → chunk-WUBKZFF6.js} +2213 -1349
- package/Build/Workers/{chunk-7TYLCBGK.js → chunk-ZAPOS52G.js} +12 -10
- package/Build/Workers/{chunk-6RMS4S72.js → chunk-ZCCIIBZT.js} +6 -6
- package/Build/Workers/combineGeometry.js +24 -24
- package/Build/Workers/createBoxGeometry.js +18 -18
- package/Build/Workers/createBoxOutlineGeometry.js +16 -16
- package/Build/Workers/createCircleGeometry.js +26 -26
- package/Build/Workers/createCircleOutlineGeometry.js +19 -19
- package/Build/Workers/createCoplanarPolygonGeometry.js +33 -33
- package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +31 -31
- package/Build/Workers/createCorridorGeometry.js +29 -29
- package/Build/Workers/createCorridorOutlineGeometry.js +28 -28
- package/Build/Workers/createCylinderGeometry.js +20 -20
- package/Build/Workers/createCylinderOutlineGeometry.js +18 -18
- package/Build/Workers/createEllipseGeometry.js +26 -26
- package/Build/Workers/createEllipseOutlineGeometry.js +19 -19
- package/Build/Workers/createEllipsoidGeometry.js +19 -19
- package/Build/Workers/createEllipsoidOutlineGeometry.js +18 -18
- package/Build/Workers/createFrustumGeometry.js +18 -18
- package/Build/Workers/createFrustumOutlineGeometry.js +18 -18
- package/Build/Workers/createGeometry.js +24 -24
- package/Build/Workers/createGroundPolylineGeometry.js +175 -118
- package/Build/Workers/createPlaneGeometry.js +16 -16
- package/Build/Workers/createPlaneOutlineGeometry.js +15 -15
- package/Build/Workers/createPolygonGeometry.js +32 -32
- package/Build/Workers/createPolygonOutlineGeometry.js +30 -30
- package/Build/Workers/createPolylineGeometry.js +25 -25
- package/Build/Workers/createPolylineVolumeGeometry.js +31 -31
- package/Build/Workers/createPolylineVolumeOutlineGeometry.js +27 -27
- package/Build/Workers/createRectangleGeometry.js +27 -27
- package/Build/Workers/createRectangleOutlineGeometry.js +20 -20
- package/Build/Workers/createSimplePolylineGeometry.js +23 -23
- package/Build/Workers/createSphereGeometry.js +19 -19
- package/Build/Workers/createSphereOutlineGeometry.js +18 -18
- package/Build/Workers/createTaskProcessorWorker.js +3 -3
- package/Build/Workers/createVectorTileClampedPolylines.js +14 -14
- package/Build/Workers/createVectorTileGeometries.js +24 -24
- package/Build/Workers/createVectorTilePoints.js +13 -13
- package/Build/Workers/createVectorTilePolygons.js +22 -22
- package/Build/Workers/createVectorTilePolylines.js +14 -14
- package/Build/Workers/createVerticesFromCesium3DTilesTerrain.js +25 -25
- package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +22 -22
- package/Build/Workers/createVerticesFromHeightmap.js +24 -23
- package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +20 -20
- package/Build/Workers/createWallGeometry.js +24 -24
- package/Build/Workers/createWallOutlineGeometry.js +23 -23
- package/Build/Workers/decodeDraco.js +10 -10
- package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +5 -5
- package/Build/Workers/decodeI3S.js +10 -10
- package/Build/Workers/gaussianSplatSorter.js +4 -4
- package/Build/Workers/gaussianSplatTextureGenerator.js +4 -4
- package/Build/Workers/incrementallyBuildTerrainPicker.js +10 -10
- package/Build/Workers/transcodeKTX2.js +12 -9
- package/Build/Workers/transferTypedArrayTest.js +1 -1
- package/Build/Workers/upsampleQuantizedTerrainMesh.js +22 -22
- package/Build/Workers/upsampleVerticesFromCesium3DTilesTerrain.js +25 -25
- package/Source/Core/ArcType.js +6 -1
- package/Source/Core/ArticulationStageType.js +5 -1
- package/Source/Core/AssociativeArray.js +100 -94
- package/Source/Core/BoundingSphere.js +1296 -1300
- package/Source/Core/Cartesian3.js +1 -2
- package/Source/Core/Cartographic.js +257 -249
- package/Source/Core/ClockRange.js +6 -1
- package/Source/Core/ClockStep.js +6 -1
- package/Source/Core/Color.js +844 -835
- package/Source/Core/ComponentDatatype.js +4 -1
- package/Source/Core/CornerType.js +6 -1
- package/Source/Core/Credit.js +121 -124
- package/Source/Core/Ellipsoid.js +637 -660
- package/Source/Core/ExtrapolationType.js +6 -1
- package/Source/Core/GeocodeType.js +6 -1
- package/Source/Core/GeographicProjection.js +74 -74
- package/Source/Core/GeographicTilingScheme.js +179 -198
- package/Source/Core/GeometryOffsetAttribute.js +7 -1
- package/Source/Core/GeometryType.js +7 -1
- package/Source/Core/HeightmapEncoding.js +6 -1
- package/Source/Core/Iau2006XysData.js +24 -13
- package/Source/Core/IndexDatatype.js +3 -1
- package/Source/Core/InterpolationType.js +5 -1
- package/Source/Core/Intersect.js +6 -1
- package/Source/Core/Ion.js +1 -1
- package/Source/Core/IonGeocodeProviderType.js +5 -1
- package/Source/Core/JulianDate.js +850 -848
- package/Source/Core/KeyboardEventModifier.js +6 -1
- package/Source/Core/MapProjection.js +39 -44
- package/Source/Core/Matrix2.js +906 -893
- package/Source/Core/Matrix3.js +1643 -1575
- package/Source/Core/Matrix4.js +2903 -2872
- package/Source/Core/PixelFormat.js +3 -1
- package/Source/Core/PrimitiveType.js +11 -1
- package/Source/Core/Ray.js +62 -60
- package/Source/Core/Rectangle.js +913 -904
- package/Source/Core/ReferenceFrame.js +6 -1
- package/Source/Core/RequestScheduler.js +8 -3
- package/Source/Core/RequestState.js +6 -1
- package/Source/Core/RequestType.js +6 -1
- package/Source/Core/ScreenSpaceEventType.js +6 -1
- package/Source/Core/TerrainQuantization.js +6 -1
- package/Source/Core/TilingScheme.js +100 -98
- package/Source/Core/TimeConstants.js +6 -1
- package/Source/Core/TimeStandard.js +6 -1
- package/Source/Core/TrackingReferenceFrame.js +6 -1
- package/Source/Core/Visibility.js +6 -1
- package/Source/Core/VulkanConstants.js +6 -1
- package/Source/Core/WebGLConstants.js +6 -1
- package/Source/Core/WebMercatorProjection.js +108 -109
- package/Source/Core/WebMercatorTilingScheme.js +246 -242
- package/Source/Core/WindingOrder.js +3 -1
- package/Source/DataSources/StaticGroundGeometryPerMaterialBatch.js +1 -0
- package/Source/DataSources/StaticGroundPolylinePerMaterialBatch.js +1 -0
- package/Source/DataSources/StripeOrientation.js +6 -1
- package/Source/Renderer/BufferUsage.js +20 -9
- package/Source/Renderer/Context.js +2 -29
- package/Source/Renderer/DrawCommand.js +435 -403
- package/Source/Renderer/MipmapHint.js +5 -1
- package/Source/Renderer/Pass.js +7 -1
- package/Source/Renderer/PickId.js +44 -0
- package/Source/Renderer/PixelDatatype.js +3 -1
- package/Source/Renderer/RenderbufferFormat.js +5 -1
- package/Source/Renderer/ShaderDestination.js +4 -1
- package/Source/Renderer/TextureMagnificationFilter.js +3 -1
- package/Source/Renderer/TextureMinificationFilter.js +3 -1
- package/Source/Renderer/TextureWrap.js +5 -1
- package/Source/Scene/AlphaMode.js +5 -1
- package/Source/Scene/ArcGisBaseMapType.js +6 -1
- package/Source/Scene/ArcGisMapService.js +1 -1
- package/Source/Scene/AttributeType.js +3 -1
- package/Source/Scene/Axis.js +3 -1
- package/Source/Scene/BingMapsStyle.js +6 -1
- package/Source/Scene/BlendEquation.js +6 -1
- package/Source/Scene/BlendFunction.js +6 -1
- package/Source/Scene/BlendOption.js +6 -1
- package/Source/Scene/BlendingState.js +6 -1
- package/Source/Scene/BufferLoader.js +0 -2
- package/Source/Scene/BufferPointCollection.js +4 -1
- package/Source/Scene/BufferPolygonCollection.js +3 -1
- package/Source/Scene/BufferPolylineCollection.js +3 -1
- package/Source/Scene/BufferPrimitiveCollection.js +140 -24
- package/Source/Scene/CameraEventType.js +6 -1
- package/Source/Scene/Cesium3DTileColorBlendMode.js +6 -1
- package/Source/Scene/Cesium3DTileContentState.js +6 -1
- package/Source/Scene/Cesium3DTileContentType.js +3 -1
- package/Source/Scene/Cesium3DTileFeature.js +289 -306
- package/Source/Scene/Cesium3DTileOptimizationHint.js +6 -1
- package/Source/Scene/Cesium3DTilePass.js +5 -1
- package/Source/Scene/Cesium3DTilePointFeature.js +433 -511
- package/Source/Scene/Cesium3DTileRefine.js +6 -1
- package/Source/Scene/Cesium3DTileVectorFeature.js +586 -0
- package/Source/Scene/Cesium3DTileset.js +1 -1
- package/Source/Scene/ClassificationType.js +3 -1
- package/Source/Scene/CloudType.js +3 -1
- package/Source/Scene/ColorBlendMode.js +4 -1
- package/Source/Scene/CullFace.js +6 -1
- package/Source/Scene/DepthFunction.js +6 -1
- package/Source/Scene/DynamicAtmosphereLightingType.js +3 -1
- package/Source/Scene/EquirectangularPanorama.js +1 -0
- package/Source/Scene/ExpressionNodeType.js +6 -1
- package/Source/Scene/GltfBufferViewLoader.js +0 -2
- package/Source/Scene/GltfDracoLoader.js +0 -2
- package/Source/Scene/GltfImageLoader.js +0 -3
- package/Source/Scene/GltfIndexBufferLoader.js +0 -4
- package/Source/Scene/GltfJsonLoader.js +0 -2
- package/Source/Scene/GltfLoader.js +0 -5
- package/Source/Scene/GltfLoaderUtil.js +14 -0
- package/Source/Scene/GltfSpzLoader.js +0 -2
- package/Source/Scene/GltfStructuralMetadataLoader.js +0 -2
- package/Source/Scene/GltfTextureLoader.js +0 -2
- package/Source/Scene/GltfVertexBufferLoader.js +0 -4
- package/Source/Scene/HeightReference.js +5 -1
- package/Source/Scene/HorizontalOrigin.js +6 -1
- package/Source/Scene/ImageryProvider.js +1 -1
- package/Source/Scene/ImageryState.js +6 -1
- package/Source/Scene/ImplicitSubdivisionScheme.js +3 -1
- package/Source/Scene/InstanceAttributeSemantic.js +3 -1
- package/Source/Scene/IonWorldImageryStyle.js +6 -1
- package/Source/Scene/JobType.js +6 -1
- package/Source/Scene/LabelStyle.js +6 -1
- package/Source/Scene/MapMode2D.js +6 -1
- package/Source/Scene/MetadataComponentType.js +3 -1
- package/Source/Scene/MetadataSchemaLoader.js +0 -2
- package/Source/Scene/MetadataSemantic.js +6 -2
- package/Source/Scene/MetadataType.js +3 -1
- package/Source/Scene/Model/B3dmLoader.js +0 -3
- package/Source/Scene/Model/CustomShaderMode.js +3 -1
- package/Source/Scene/Model/CustomShaderTranslucencyMode.js +5 -1
- package/Source/Scene/Model/EdgeVisibilityPipelineStage.js +44 -71
- package/Source/Scene/Model/Extensions/Gpm/PpeSource.js +5 -1
- package/Source/Scene/Model/Extensions/Gpm/StorageType.js +5 -1
- package/Source/Scene/Model/GeoJsonLoader.js +0 -2
- package/Source/Scene/Model/I3dmLoader.js +0 -3
- package/Source/Scene/Model/InstancingPipelineStage.js +1 -1
- package/Source/Scene/Model/LightingModel.js +5 -1
- package/Source/Scene/Model/MaterialPipelineStage.js +184 -3
- package/Source/Scene/Model/ModelReader.js +474 -3
- package/Source/Scene/Model/ModelRuntimePrimitive.js +2 -1
- package/Source/Scene/Model/ModelType.js +3 -1
- package/Source/Scene/Model/PntsLoader.js +4 -3
- package/Source/Scene/Model/StyleCommandsNeeded.js +3 -1
- package/Source/Scene/Model/UniformType.js +5 -1
- package/Source/Scene/Model/VaryingType.js +5 -1
- package/Source/Scene/Model/createVectorTileBuffersFromModelComponents.js +73 -28
- package/Source/Scene/Model/pickModel.js +94 -299
- package/Source/Scene/ModelAnimationLoop.js +6 -1
- package/Source/Scene/ModelAnimationState.js +6 -1
- package/Source/Scene/ModelComponents.js +8 -1
- package/Source/Scene/PrimitiveState.js +7 -1
- package/Source/Scene/QuadtreeOccluders.js +20 -15
- package/Source/Scene/QuadtreeTile.js +547 -541
- package/Source/Scene/QuadtreeTileLoadState.js +6 -1
- package/Source/Scene/QuadtreeTileProvider.js +159 -175
- package/Source/Scene/ResourceLoader.js +0 -1
- package/Source/Scene/ResourceLoaderState.js +7 -1
- package/Source/Scene/SceneMode.js +4 -1
- package/Source/Scene/ShadowMode.js +3 -1
- package/Source/Scene/SkyBox.js +1 -1
- package/Source/Scene/SplitDirection.js +6 -1
- package/Source/Scene/StencilFunction.js +6 -1
- package/Source/Scene/StencilOperation.js +6 -1
- package/Source/Scene/TerrainState.js +7 -1
- package/Source/Scene/TileState.js +7 -1
- package/Source/Scene/Tonemapper.js +5 -1
- package/Source/Scene/VectorGltf3DTileContent.js +72 -51
- package/Source/Scene/VertexAttributeSemantic.js +3 -1
- package/Source/Scene/VerticalOrigin.js +6 -1
- package/Source/Scene/VoxelBoxShape.js +12 -6
- package/Source/Scene/VoxelContent.js +2 -0
- package/Source/Scene/VoxelCylinderShape.js +39 -38
- package/Source/Scene/VoxelEllipsoidShape.js +46 -96
- package/Source/Scene/VoxelMetadataOrder.js +6 -1
- package/Source/Scene/VoxelProvider.js +1 -0
- package/Source/Scene/VoxelShapeType.js +3 -1
- package/Source/Scene/renderBufferPointCollection.js +17 -66
- package/Source/Scene/renderBufferPolygonCollection.js +21 -68
- package/Source/Scene/renderBufferPolylineCollection.js +22 -73
- package/Source/Shaders/Builtin/CzmBuiltins.js +2 -0
- package/Source/Shaders/Builtin/Functions/computeTextureTransform.glsl +24 -0
- package/Source/Shaders/Builtin/Functions/computeTextureTransform.js +25 -0
- package/Source/Shaders/Model/ConstantLodStageFS.glsl +60 -0
- package/Source/Shaders/Model/ConstantLodStageFS.js +62 -0
- package/Source/Shaders/Model/ConstantLodStageVS.glsl +12 -0
- package/Source/Shaders/Model/ConstantLodStageVS.js +13 -0
- package/Source/Shaders/Model/MaterialStageFS.glsl +46 -20
- package/Source/Shaders/Model/MaterialStageFS.js +46 -20
- package/Source/Shaders/Voxels/convertLocalToBoxUv.glsl +0 -1
- package/Source/Shaders/Voxels/convertLocalToBoxUv.js +0 -1
- package/Source/Shaders/Voxels/convertLocalToCylinderUv.glsl +7 -9
- package/Source/Shaders/Voxels/convertLocalToCylinderUv.js +7 -9
- package/Source/Shaders/Voxels/convertLocalToEllipsoidUv.glsl +7 -17
- package/Source/Shaders/Voxels/convertLocalToEllipsoidUv.js +7 -17
- package/Source/Widget/CesiumWidget.js +11 -4
- package/index.d.ts +343 -309
- package/index.js +443 -438
- package/package.json +2 -2
- package/Build/Workers/chunk-DVB56LG7.js +0 -114
- package/Build/Workers/chunk-HKUES6UG.js +0 -2357
- package/Build/Workers/chunk-HRHRYFHS.js +0 -940
- package/Build/Workers/chunk-KLPGTXS3.js +0 -642
- package/Build/Workers/chunk-ZBZRTRJB.js +0 -1829
|
@@ -92,7 +92,6 @@ class GltfBufferViewLoader extends ResourceLoader {
|
|
|
92
92
|
/**
|
|
93
93
|
* The cache key of the resource.
|
|
94
94
|
*
|
|
95
|
-
* @memberof GltfBufferViewLoader.prototype
|
|
96
95
|
*
|
|
97
96
|
* @type {string}
|
|
98
97
|
* @readonly
|
|
@@ -105,7 +104,6 @@ class GltfBufferViewLoader extends ResourceLoader {
|
|
|
105
104
|
/**
|
|
106
105
|
* The typed array containing buffer view data.
|
|
107
106
|
*
|
|
108
|
-
* @memberof GltfBufferViewLoader.prototype
|
|
109
107
|
*
|
|
110
108
|
* @type {Uint8Array}
|
|
111
109
|
* @readonly
|
|
@@ -66,7 +66,6 @@ class GltfDracoLoader extends ResourceLoader {
|
|
|
66
66
|
/**
|
|
67
67
|
* The cache key of the resource.
|
|
68
68
|
*
|
|
69
|
-
* @memberof GltfDracoLoader.prototype
|
|
70
69
|
*
|
|
71
70
|
* @type {string}
|
|
72
71
|
* @readonly
|
|
@@ -79,7 +78,6 @@ class GltfDracoLoader extends ResourceLoader {
|
|
|
79
78
|
/**
|
|
80
79
|
* The decoded data.
|
|
81
80
|
*
|
|
82
|
-
* @memberof GltfDracoLoader.prototype
|
|
83
81
|
*
|
|
84
82
|
* @type {object}
|
|
85
83
|
* @readonly
|
|
@@ -65,7 +65,6 @@ class GltfImageLoader extends ResourceLoader {
|
|
|
65
65
|
/**
|
|
66
66
|
* The cache key of the resource.
|
|
67
67
|
*
|
|
68
|
-
* @memberof GltfImageLoader.prototype
|
|
69
68
|
*
|
|
70
69
|
* @type {string}
|
|
71
70
|
* @readonly
|
|
@@ -78,7 +77,6 @@ class GltfImageLoader extends ResourceLoader {
|
|
|
78
77
|
/**
|
|
79
78
|
* The image.
|
|
80
79
|
*
|
|
81
|
-
* @memberof GltfImageLoader.prototype
|
|
82
80
|
*
|
|
83
81
|
* @type {Image|ImageBitmap|CompressedTextureBuffer}
|
|
84
82
|
* @readonly
|
|
@@ -91,7 +89,6 @@ class GltfImageLoader extends ResourceLoader {
|
|
|
91
89
|
/**
|
|
92
90
|
* The mip levels. Only defined for KTX2 files containing mip levels.
|
|
93
91
|
*
|
|
94
|
-
* @memberof GltfImageLoader.prototype
|
|
95
92
|
*
|
|
96
93
|
* @type {Uint8Array[]}
|
|
97
94
|
* @readonly
|
|
@@ -88,7 +88,6 @@ class GltfIndexBufferLoader extends ResourceLoader {
|
|
|
88
88
|
/**
|
|
89
89
|
* The cache key of the resource.
|
|
90
90
|
*
|
|
91
|
-
* @memberof GltfIndexBufferLoader.prototype
|
|
92
91
|
*
|
|
93
92
|
* @type {string}
|
|
94
93
|
* @readonly
|
|
@@ -101,7 +100,6 @@ class GltfIndexBufferLoader extends ResourceLoader {
|
|
|
101
100
|
/**
|
|
102
101
|
* The index buffer. This is only defined when <code>loadBuffer</code> is true.
|
|
103
102
|
*
|
|
104
|
-
* @memberof GltfIndexBufferLoader.prototype
|
|
105
103
|
*
|
|
106
104
|
* @type {Buffer}
|
|
107
105
|
* @readonly
|
|
@@ -114,7 +112,6 @@ class GltfIndexBufferLoader extends ResourceLoader {
|
|
|
114
112
|
/**
|
|
115
113
|
* The typed array containing indices. This is only defined when <code>loadTypedArray</code> is true.
|
|
116
114
|
*
|
|
117
|
-
* @memberof GltfIndexBufferLoader.prototype
|
|
118
115
|
*
|
|
119
116
|
* @type {Uint8Array|Uint16Array|Uint32Array}
|
|
120
117
|
* @readonly
|
|
@@ -127,7 +124,6 @@ class GltfIndexBufferLoader extends ResourceLoader {
|
|
|
127
124
|
/**
|
|
128
125
|
* The index datatype after decode.
|
|
129
126
|
*
|
|
130
|
-
* @memberof GltfIndexBufferLoader.prototype
|
|
131
127
|
*
|
|
132
128
|
* @type {IndexDatatype}
|
|
133
129
|
* @readonly
|
|
@@ -67,7 +67,6 @@ class GltfJsonLoader extends ResourceLoader {
|
|
|
67
67
|
/**
|
|
68
68
|
* The cache key of the resource.
|
|
69
69
|
*
|
|
70
|
-
* @memberof GltfJsonLoader.prototype
|
|
71
70
|
*
|
|
72
71
|
* @type {string}
|
|
73
72
|
* @readonly
|
|
@@ -80,7 +79,6 @@ class GltfJsonLoader extends ResourceLoader {
|
|
|
80
79
|
/**
|
|
81
80
|
* The glTF JSON.
|
|
82
81
|
*
|
|
83
|
-
* @memberof GltfJsonLoader.prototype
|
|
84
82
|
*
|
|
85
83
|
* @type {object}
|
|
86
84
|
* @readonly
|
|
@@ -287,7 +287,6 @@ class GltfLoader extends ResourceLoader {
|
|
|
287
287
|
/**
|
|
288
288
|
* The cache key of the resource.
|
|
289
289
|
*
|
|
290
|
-
* @memberof GltfLoader.prototype
|
|
291
290
|
*
|
|
292
291
|
* @type {string}
|
|
293
292
|
* @readonly
|
|
@@ -300,7 +299,6 @@ class GltfLoader extends ResourceLoader {
|
|
|
300
299
|
/**
|
|
301
300
|
* The loaded components.
|
|
302
301
|
*
|
|
303
|
-
* @memberof GltfLoader.prototype
|
|
304
302
|
*
|
|
305
303
|
* @type {ModelComponents.Components}
|
|
306
304
|
* @readonly
|
|
@@ -313,7 +311,6 @@ class GltfLoader extends ResourceLoader {
|
|
|
313
311
|
/**
|
|
314
312
|
* The loaded glTF json.
|
|
315
313
|
*
|
|
316
|
-
* @memberof GltfLoader.prototype
|
|
317
314
|
*
|
|
318
315
|
* @type {object}
|
|
319
316
|
* @readonly
|
|
@@ -329,7 +326,6 @@ class GltfLoader extends ResourceLoader {
|
|
|
329
326
|
/**
|
|
330
327
|
* Returns true if textures are loaded separately from the other glTF resources.
|
|
331
328
|
*
|
|
332
|
-
* @memberof GltfLoader.prototype
|
|
333
329
|
*
|
|
334
330
|
* @type {boolean}
|
|
335
331
|
* @readonly
|
|
@@ -342,7 +338,6 @@ class GltfLoader extends ResourceLoader {
|
|
|
342
338
|
/**
|
|
343
339
|
* true if textures are loaded, useful when incrementallyLoadTextures is true
|
|
344
340
|
*
|
|
345
|
-
* @memberof GltfLoader.prototype
|
|
346
341
|
*
|
|
347
342
|
* @type {boolean}
|
|
348
343
|
* @readonly
|
|
@@ -178,6 +178,20 @@ GltfLoaderUtil.createModelTextureReader = function (options) {
|
|
|
178
178
|
modelTextureReader.transform = transform;
|
|
179
179
|
modelTextureReader.channels = channels;
|
|
180
180
|
|
|
181
|
+
// EXT_textureInfo_constant_lod extension
|
|
182
|
+
const constantLodExtension =
|
|
183
|
+
textureInfo.extensions?.EXT_textureInfo_constant_lod;
|
|
184
|
+
if (defined(constantLodExtension)) {
|
|
185
|
+
modelTextureReader.constantLod = {
|
|
186
|
+
repetitions: constantLodExtension.repetitions ?? 1.0,
|
|
187
|
+
offset: defined(constantLodExtension.offset)
|
|
188
|
+
? Cartesian2.unpack(constantLodExtension.offset)
|
|
189
|
+
: Cartesian2.ZERO,
|
|
190
|
+
minClampDistance: constantLodExtension.minClampDistance ?? 1.0,
|
|
191
|
+
maxClampDistance: constantLodExtension.maxClampDistance ?? 4294967296.0,
|
|
192
|
+
};
|
|
193
|
+
}
|
|
194
|
+
|
|
181
195
|
return modelTextureReader;
|
|
182
196
|
};
|
|
183
197
|
|
|
@@ -141,7 +141,6 @@ class GltfSpzLoader extends ResourceLoader {
|
|
|
141
141
|
|
|
142
142
|
/**
|
|
143
143
|
* The cache key of the resource.
|
|
144
|
-
* @memberof GltfSpzLoader.prototype
|
|
145
144
|
* @type {string}
|
|
146
145
|
* @readonly
|
|
147
146
|
* @private
|
|
@@ -152,7 +151,6 @@ class GltfSpzLoader extends ResourceLoader {
|
|
|
152
151
|
|
|
153
152
|
/**
|
|
154
153
|
* The decoded SPZ data.
|
|
155
|
-
* @memberof GltfSpzLoader.prototype
|
|
156
154
|
* @type {object}
|
|
157
155
|
* @readonly
|
|
158
156
|
* @private
|
|
@@ -82,7 +82,6 @@ class GltfStructuralMetadataLoader extends ResourceLoader {
|
|
|
82
82
|
/**
|
|
83
83
|
* The cache key of the resource.
|
|
84
84
|
*
|
|
85
|
-
* @memberof GltfStructuralMetadataLoader.prototype
|
|
86
85
|
*
|
|
87
86
|
* @type {string}
|
|
88
87
|
* @readonly
|
|
@@ -95,7 +94,6 @@ class GltfStructuralMetadataLoader extends ResourceLoader {
|
|
|
95
94
|
/**
|
|
96
95
|
* The parsed structural metadata
|
|
97
96
|
*
|
|
98
|
-
* @memberof GltfStructuralMetadataLoader.prototype
|
|
99
97
|
*
|
|
100
98
|
* @type {StructuralMetadata}
|
|
101
99
|
* @readonly
|
|
@@ -83,7 +83,6 @@ class GltfTextureLoader extends ResourceLoader {
|
|
|
83
83
|
/**
|
|
84
84
|
* The cache key of the resource.
|
|
85
85
|
*
|
|
86
|
-
* @memberof GltfTextureLoader.prototype
|
|
87
86
|
*
|
|
88
87
|
* @type {string}
|
|
89
88
|
* @readonly
|
|
@@ -96,7 +95,6 @@ class GltfTextureLoader extends ResourceLoader {
|
|
|
96
95
|
/**
|
|
97
96
|
* The texture.
|
|
98
97
|
*
|
|
99
|
-
* @memberof GltfTextureLoader.prototype
|
|
100
98
|
*
|
|
101
99
|
* @type {Texture}
|
|
102
100
|
* @readonly
|
|
@@ -135,7 +135,6 @@ class GltfVertexBufferLoader extends ResourceLoader {
|
|
|
135
135
|
/**
|
|
136
136
|
* The cache key of the resource.
|
|
137
137
|
*
|
|
138
|
-
* @memberof GltfVertexBufferLoader.prototype
|
|
139
138
|
*
|
|
140
139
|
* @type {string}
|
|
141
140
|
* @readonly
|
|
@@ -148,7 +147,6 @@ class GltfVertexBufferLoader extends ResourceLoader {
|
|
|
148
147
|
/**
|
|
149
148
|
* The vertex buffer. This is only defined when <code>loadAsTypedArray</code> is false.
|
|
150
149
|
*
|
|
151
|
-
* @memberof GltfVertexBufferLoader.prototype
|
|
152
150
|
*
|
|
153
151
|
* @type {Buffer}
|
|
154
152
|
* @readonly
|
|
@@ -161,7 +159,6 @@ class GltfVertexBufferLoader extends ResourceLoader {
|
|
|
161
159
|
/**
|
|
162
160
|
* The typed array containing vertex buffer data. This is only defined when <code>loadAsTypedArray</code> is true.
|
|
163
161
|
*
|
|
164
|
-
* @memberof GltfVertexBufferLoader.prototype
|
|
165
162
|
*
|
|
166
163
|
* @type {Uint8Array}
|
|
167
164
|
* @readonly
|
|
@@ -174,7 +171,6 @@ class GltfVertexBufferLoader extends ResourceLoader {
|
|
|
174
171
|
/**
|
|
175
172
|
* Information about the quantized vertex attribute after Draco decode.
|
|
176
173
|
*
|
|
177
|
-
* @memberof GltfVertexBufferLoader.prototype
|
|
178
174
|
*
|
|
179
175
|
* @type {ModelComponents.Quantization}
|
|
180
176
|
* @readonly
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// @ts-check
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* Represents the position relative to the terrain.
|
|
3
5
|
*
|
|
@@ -54,7 +56,9 @@ const HeightReference = {
|
|
|
54
56
|
RELATIVE_TO_3D_TILE: 6,
|
|
55
57
|
};
|
|
56
58
|
|
|
57
|
-
|
|
59
|
+
Object.freeze(HeightReference);
|
|
60
|
+
|
|
61
|
+
export default HeightReference;
|
|
58
62
|
|
|
59
63
|
/**
|
|
60
64
|
* Returns true if the height should be clamped to the surface
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// @ts-check
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* The horizontal location of an origin relative to an object, e.g., a {@link Billboard}
|
|
3
5
|
* or {@link Label}. For example, setting the horizontal origin to <code>LEFT</code>
|
|
@@ -38,4 +40,7 @@ const HorizontalOrigin = {
|
|
|
38
40
|
*/
|
|
39
41
|
RIGHT: -1,
|
|
40
42
|
};
|
|
41
|
-
|
|
43
|
+
|
|
44
|
+
Object.freeze(HorizontalOrigin);
|
|
45
|
+
|
|
46
|
+
export default HorizontalOrigin;
|
|
@@ -5,7 +5,7 @@ import loadKTX2 from "../Core/loadKTX2.js";
|
|
|
5
5
|
import Resource from "../Core/Resource.js";
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
|
-
* @typedef {HTMLImageElement|HTMLCanvasElement|ImageBitmap} ImageryTypes
|
|
8
|
+
* @typedef {HTMLImageElement|HTMLCanvasElement|ImageBitmap|OffscreenCanvas} ImageryTypes
|
|
9
9
|
*
|
|
10
10
|
* The format in which {@link ImageryProvider} methods return an image may
|
|
11
11
|
* vary by provider, configuration, or server settings. Most common are
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// @ts-check
|
|
2
|
+
|
|
1
3
|
// Note, these values map directly to ion asset ids.
|
|
2
4
|
|
|
3
5
|
/**
|
|
@@ -30,4 +32,7 @@ const IonWorldImageryStyle = {
|
|
|
30
32
|
*/
|
|
31
33
|
ROAD: 4,
|
|
32
34
|
};
|
|
33
|
-
|
|
35
|
+
|
|
36
|
+
Object.freeze(IonWorldImageryStyle);
|
|
37
|
+
|
|
38
|
+
export default IonWorldImageryStyle;
|
package/Source/Scene/JobType.js
CHANGED
|
@@ -593,4 +593,6 @@ MetadataComponentType.getDataViewAccessors = function (view, componentType) {
|
|
|
593
593
|
return accessors[componentType];
|
|
594
594
|
};
|
|
595
595
|
|
|
596
|
-
|
|
596
|
+
Object.freeze(MetadataComponentType);
|
|
597
|
+
|
|
598
|
+
export default MetadataComponentType;
|
|
@@ -51,7 +51,6 @@ class MetadataSchemaLoader extends ResourceLoader {
|
|
|
51
51
|
/**
|
|
52
52
|
* The cache key of the resource.
|
|
53
53
|
*
|
|
54
|
-
* @memberof MetadataSchemaLoader.prototype
|
|
55
54
|
*
|
|
56
55
|
* @type {string}
|
|
57
56
|
* @readonly
|
|
@@ -64,7 +63,6 @@ class MetadataSchemaLoader extends ResourceLoader {
|
|
|
64
63
|
/**
|
|
65
64
|
* The metadata schema object.
|
|
66
65
|
*
|
|
67
|
-
* @memberof MetadataSchemaLoader.prototype
|
|
68
66
|
*
|
|
69
67
|
* @type {MetadataSchema}
|
|
70
68
|
* @readonly
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
// @ts-check
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* An enum of built-in semantics.
|
|
3
5
|
*
|
|
4
|
-
* @enum
|
|
6
|
+
* @enum {string}
|
|
5
7
|
*
|
|
6
8
|
* @private
|
|
7
9
|
* @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
|
|
@@ -150,4 +152,6 @@ const MetadataSemantic = {
|
|
|
150
152
|
CONTENT_HORIZON_OCCLUSION_POINT: "CONTENT_HORIZON_OCCLUSION_POINT",
|
|
151
153
|
};
|
|
152
154
|
|
|
153
|
-
|
|
155
|
+
Object.freeze(MetadataSemantic);
|
|
156
|
+
|
|
157
|
+
export default MetadataSemantic;
|
|
@@ -118,7 +118,6 @@ class B3dmLoader extends ResourceLoader {
|
|
|
118
118
|
/**
|
|
119
119
|
* true if textures are loaded, useful when incrementallyLoadTextures is true
|
|
120
120
|
*
|
|
121
|
-
* @memberof B3dmLoader.prototype
|
|
122
121
|
*
|
|
123
122
|
* @type {boolean}
|
|
124
123
|
* @readonly
|
|
@@ -131,7 +130,6 @@ class B3dmLoader extends ResourceLoader {
|
|
|
131
130
|
/**
|
|
132
131
|
* The cache key of the resource
|
|
133
132
|
*
|
|
134
|
-
* @memberof B3dmLoader.prototype
|
|
135
133
|
*
|
|
136
134
|
* @type {string}
|
|
137
135
|
* @readonly
|
|
@@ -144,7 +142,6 @@ class B3dmLoader extends ResourceLoader {
|
|
|
144
142
|
/**
|
|
145
143
|
* The loaded components.
|
|
146
144
|
*
|
|
147
|
-
* @memberof B3dmLoader.prototype
|
|
148
145
|
*
|
|
149
146
|
* @type {ModelComponents.Components}
|
|
150
147
|
* @readonly
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// @ts-check
|
|
2
|
+
|
|
1
3
|
/**
|
|
2
4
|
* An enum for controling how {@link CustomShader} handles translucency compared with the original
|
|
3
5
|
* primitive.
|
|
@@ -32,4 +34,6 @@ const CustomShaderTranslucencyMode = {
|
|
|
32
34
|
TRANSLUCENT: 2,
|
|
33
35
|
};
|
|
34
36
|
|
|
35
|
-
|
|
37
|
+
Object.freeze(CustomShaderTranslucencyMode);
|
|
38
|
+
|
|
39
|
+
export default CustomShaderTranslucencyMode;
|
|
@@ -5,9 +5,7 @@ import defined from "../../Core/defined.js";
|
|
|
5
5
|
import IndexDatatype from "../../Core/IndexDatatype.js";
|
|
6
6
|
import ComponentDatatype from "../../Core/ComponentDatatype.js";
|
|
7
7
|
import PrimitiveType from "../../Core/PrimitiveType.js";
|
|
8
|
-
import Cartesian2 from "../../Core/Cartesian2.js";
|
|
9
8
|
import Cartesian3 from "../../Core/Cartesian3.js";
|
|
10
|
-
import AttributeCompression from "../../Core/AttributeCompression.js";
|
|
11
9
|
import Pass from "../../Renderer/Pass.js";
|
|
12
10
|
import ShaderDestination from "../../Renderer/ShaderDestination.js";
|
|
13
11
|
import EdgeVisibilityStageFS from "../../Shaders/Model/EdgeVisibilityStageFS.js";
|
|
@@ -358,7 +356,22 @@ function buildTriangleAdjacency(primitive) {
|
|
|
358
356
|
Cartesian3.subtract(scratchP1, scratchP0, scratchE1);
|
|
359
357
|
Cartesian3.subtract(scratchP2, scratchP0, scratchE2);
|
|
360
358
|
Cartesian3.cross(scratchE1, scratchE2, scratchCross);
|
|
361
|
-
|
|
359
|
+
|
|
360
|
+
// Skip degenerate triangles: a zero or non-finite cross product cannot be
|
|
361
|
+
// safely normalized and would produce invalid face normals.
|
|
362
|
+
const crossMagnitudeSquared = Cartesian3.magnitudeSquared(scratchCross);
|
|
363
|
+
if (
|
|
364
|
+
crossMagnitudeSquared === 0.0 ||
|
|
365
|
+
!Number.isFinite(crossMagnitudeSquared)
|
|
366
|
+
) {
|
|
367
|
+
continue;
|
|
368
|
+
}
|
|
369
|
+
|
|
370
|
+
Cartesian3.multiplyByScalar(
|
|
371
|
+
scratchCross,
|
|
372
|
+
1.0 / Math.sqrt(crossMagnitudeSquared),
|
|
373
|
+
scratchCross,
|
|
374
|
+
);
|
|
362
375
|
|
|
363
376
|
faceNormals[base] = scratchCross.x;
|
|
364
377
|
faceNormals[base + 1] = scratchCross.y;
|
|
@@ -397,58 +410,34 @@ function generateEdgeFaceNormals(
|
|
|
397
410
|
|
|
398
411
|
const hasGLBSilhouetteNormals =
|
|
399
412
|
defined(edgeVisibility) && defined(edgeVisibility.silhouetteNormals);
|
|
400
|
-
let silhouetteNormalsUint32 = null;
|
|
401
|
-
const scratchDecodedA = new Cartesian3();
|
|
402
|
-
const scratchDecodedB = new Cartesian3();
|
|
403
413
|
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
const decodeSignedByte = (val) => 2 * ((val + 128) / 255) - 1;
|
|
414
|
+
// Decode GLB silhouette normals from signed-byte VEC3 to a flat Float32Array
|
|
415
|
+
// (3 floats per normal) to avoid per-normal object allocation and GC pressure.
|
|
416
|
+
let silhouetteNormalsFloat = null;
|
|
408
417
|
|
|
409
|
-
|
|
410
|
-
const
|
|
411
|
-
|
|
412
|
-
);
|
|
418
|
+
if (hasGLBSilhouetteNormals) {
|
|
419
|
+
const raw = edgeVisibility.silhouetteNormals;
|
|
420
|
+
silhouetteNormalsFloat = new Float32Array(raw.length * 3);
|
|
413
421
|
const scratchNormal = new Cartesian3();
|
|
414
|
-
const scratchEncoded = new Cartesian2();
|
|
415
422
|
|
|
416
|
-
for (let i = 0; i <
|
|
417
|
-
const vec3 =
|
|
423
|
+
for (let i = 0; i < raw.length; i++) {
|
|
424
|
+
const vec3 = raw[i];
|
|
425
|
+
// Signed byte → float: map [-128,127] → [-1,1] via [0,255]
|
|
426
|
+
scratchNormal.x = 2 * ((vec3.x + 128) / 255) - 1;
|
|
427
|
+
scratchNormal.y = 2 * ((vec3.y + 128) / 255) - 1;
|
|
428
|
+
scratchNormal.z = 2 * ((vec3.z + 128) / 255) - 1;
|
|
418
429
|
|
|
419
|
-
|
|
420
|
-
scratchNormal.x = decodeSignedByte(vec3.x);
|
|
421
|
-
scratchNormal.y = decodeSignedByte(vec3.y);
|
|
422
|
-
scratchNormal.z = decodeSignedByte(vec3.z);
|
|
423
|
-
|
|
424
|
-
// Normalize to unit vector
|
|
425
|
-
const magnitude = Cartesian3.magnitude(scratchNormal);
|
|
426
|
-
if (magnitude > 0) {
|
|
430
|
+
if (Cartesian3.magnitudeSquared(scratchNormal) > 0) {
|
|
427
431
|
Cartesian3.normalize(scratchNormal, scratchNormal);
|
|
428
432
|
} else {
|
|
429
|
-
// Handle zero vector - use default up vector
|
|
430
433
|
scratchNormal.x = 0;
|
|
431
434
|
scratchNormal.y = 0;
|
|
432
435
|
scratchNormal.z = 1;
|
|
433
436
|
}
|
|
434
437
|
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
// Convert to 16-bit integer: (y << 8) | x
|
|
439
|
-
const byteX = scratchEncoded.x & 0xff;
|
|
440
|
-
const byteY = scratchEncoded.y & 0xff;
|
|
441
|
-
uint16Normals[i] = (byteY << 8) | byteX;
|
|
442
|
-
}
|
|
443
|
-
|
|
444
|
-
// Pack pairs into Uint32Array (little-endian: normalA|normalB<<16)
|
|
445
|
-
const numPairs = Math.floor(uint16Normals.length / 2);
|
|
446
|
-
silhouetteNormalsUint32 = new Uint32Array(numPairs);
|
|
447
|
-
|
|
448
|
-
for (let i = 0; i < numPairs; i++) {
|
|
449
|
-
const normalA = uint16Normals[i * 2];
|
|
450
|
-
const normalB = uint16Normals[i * 2 + 1];
|
|
451
|
-
silhouetteNormalsUint32[i] = normalA | (normalB << 16);
|
|
438
|
+
silhouetteNormalsFloat[i * 3] = scratchNormal.x;
|
|
439
|
+
silhouetteNormalsFloat[i * 3 + 1] = scratchNormal.y;
|
|
440
|
+
silhouetteNormalsFloat[i * 3 + 2] = scratchNormal.z;
|
|
452
441
|
}
|
|
453
442
|
}
|
|
454
443
|
|
|
@@ -466,37 +455,21 @@ function generateEdgeFaceNormals(
|
|
|
466
455
|
// Use GLB silhouetteNormals for type=1 (SILHOUETTE) edges if available
|
|
467
456
|
if (
|
|
468
457
|
hasGLBSilhouetteNormals &&
|
|
469
|
-
|
|
458
|
+
silhouetteNormalsFloat &&
|
|
470
459
|
edgeType === 1 &&
|
|
471
460
|
mateVertexIndex >= 0
|
|
472
461
|
) {
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
uint32Value & 0xff, // xA
|
|
485
|
-
(uint32Value >> 8) & 0xff, // yA
|
|
486
|
-
scratchDecodedA,
|
|
487
|
-
);
|
|
488
|
-
AttributeCompression.octDecode(
|
|
489
|
-
(uint32Value >> 16) & 0xff, // xB
|
|
490
|
-
(uint32Value >> 24) & 0xff, // yB
|
|
491
|
-
scratchDecodedB,
|
|
492
|
-
);
|
|
493
|
-
|
|
494
|
-
nAx = scratchDecodedA.x;
|
|
495
|
-
nAy = scratchDecodedA.y;
|
|
496
|
-
nAz = scratchDecodedA.z;
|
|
497
|
-
nBx = scratchDecodedB.x;
|
|
498
|
-
nBy = scratchDecodedB.y;
|
|
499
|
-
nBz = scratchDecodedB.z;
|
|
462
|
+
const pairBase = mateVertexIndex * 2;
|
|
463
|
+
if ((pairBase + 1) * 3 + 2 < silhouetteNormalsFloat.length) {
|
|
464
|
+
const baseA = pairBase * 3;
|
|
465
|
+
const baseB = (pairBase + 1) * 3;
|
|
466
|
+
|
|
467
|
+
nAx = silhouetteNormalsFloat[baseA];
|
|
468
|
+
nAy = silhouetteNormalsFloat[baseA + 1];
|
|
469
|
+
nAz = silhouetteNormalsFloat[baseA + 2];
|
|
470
|
+
nBx = silhouetteNormalsFloat[baseB];
|
|
471
|
+
nBy = silhouetteNormalsFloat[baseB + 1];
|
|
472
|
+
nBz = silhouetteNormalsFloat[baseB + 2];
|
|
500
473
|
|
|
501
474
|
usedGLBNormals = true;
|
|
502
475
|
}
|