@cesium/engine 18.0.0 → 18.2.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-QN7JEOQV.js → chunk-2QPO2E4E.js} +5 -5
- package/Build/Workers/{chunk-HS76VTVY.js → chunk-3JKMJ2DT.js} +2 -2
- package/Build/Workers/{chunk-3RKVDGRF.js → chunk-3RZFU3BO.js} +8 -8
- package/Build/Workers/{chunk-4MIY63FM.js → chunk-3X2BQHN6.js} +13 -13
- package/Build/Workers/{chunk-I3BAKR4S.js → chunk-4TGW7D6G.js} +16 -16
- package/Build/Workers/{chunk-LWJWWCZ4.js → chunk-5J3B5IYT.js} +6 -6
- package/Build/Workers/{chunk-WYCR5DWQ.js → chunk-5N52XJIS.js} +2 -2
- package/Build/Workers/{chunk-KGXTCGX3.js → chunk-5WXKC7TN.js} +12 -12
- package/Build/Workers/{chunk-5OL6XFNS.js → chunk-7252BLXK.js} +1 -1
- package/Build/Workers/{chunk-WGHUCZMX.js → chunk-7DRP5IKA.js} +7 -7
- package/Build/Workers/{chunk-AEGAQ6FD.js → chunk-AGEQBE2G.js} +12 -12
- package/Build/Workers/{chunk-EXEZHW3P.js → chunk-AJWIQQTX.js} +4 -4
- package/Build/Workers/{chunk-4DSTDGY3.js → chunk-DBPLDHPT.js} +2 -2
- package/Build/Workers/{chunk-J4MAVE6J.js → chunk-EG3P66JO.js} +6 -6
- package/Build/Workers/{chunk-OATG6PKE.js → chunk-EJGJUZST.js} +12 -12
- package/Build/Workers/{chunk-ZIP27IX6.js → chunk-ER7SSBHR.js} +6 -6
- package/Build/Workers/{chunk-5WVF4BK7.js → chunk-F3ZH4MQG.js} +5 -5
- package/Build/Workers/{chunk-RWFYLWSF.js → chunk-FC2YDGY6.js} +9 -9
- package/Build/Workers/{chunk-NR7KSD56.js → chunk-FPJWHB5J.js} +3 -3
- package/Build/Workers/{chunk-YV37YFUM.js → chunk-HMYDBCCY.js} +9 -9
- package/Build/Workers/{chunk-EHB2OCQX.js → chunk-JVHONLHD.js} +4 -4
- package/Build/Workers/{chunk-ZADJ6FRX.js → chunk-K65RSNI5.js} +4 -4
- package/Build/Workers/{chunk-MFGVMUN3.js → chunk-KZ752MAA.js} +5 -5
- package/Build/Workers/{chunk-CES6DHHV.js → chunk-LMDJ23I7.js} +1 -1
- package/Build/Workers/{chunk-KNA65INJ.js → chunk-LQQDQHA5.js} +4 -4
- package/Build/Workers/{chunk-LZFUG3GO.js → chunk-MATVBVGM.js} +10 -10
- package/Build/Workers/chunk-MIMOEYBO.js +280 -0
- package/Build/Workers/{chunk-NWSAYFZG.js → chunk-MPNN7PNO.js} +6 -6
- package/Build/Workers/{chunk-2AXPWBJG.js → chunk-MV5UVSOZ.js} +1 -1
- package/Build/Workers/{chunk-NVJ5JRIM.js → chunk-NCW6XN5X.js} +2 -2
- package/Build/Workers/{chunk-T6B6H3GR.js → chunk-PFZ45265.js} +7 -7
- package/Build/Workers/{chunk-F4ZAKN4V.js → chunk-PHIB2ITA.js} +2 -2
- package/Build/Workers/{chunk-UK33ZN4K.js → chunk-PLM7GGHT.js} +4 -4
- package/Build/Workers/{chunk-GS55WTRX.js → chunk-PMNYUVMK.js} +6 -6
- package/Build/Workers/{chunk-SIOVJ4L5.js → chunk-R3VU4BBN.js} +4 -4
- package/Build/Workers/{chunk-JF4IYQYC.js → chunk-R7LO2ZW7.js} +7 -7
- package/Build/Workers/{chunk-LIPZUYNR.js → chunk-R7VDSCQM.js} +11 -11
- package/Build/Workers/{chunk-2CAYUY2B.js → chunk-RRSRPDQN.js} +8 -8
- package/Build/Workers/{chunk-IWGMVQGG.js → chunk-SOLM3ZIV.js} +9 -9
- package/Build/Workers/{chunk-W6CPO62M.js → chunk-UGKOGDMZ.js} +6 -6
- package/Build/Workers/{chunk-2QNKQVUT.js → chunk-UGWI4JAZ.js} +5 -5
- package/Build/Workers/{chunk-FPYBD2P5.js → chunk-UOU6BW5C.js} +1 -1
- package/Build/Workers/{chunk-DINSLSJD.js → chunk-USCHXXVF.js} +6 -6
- package/Build/Workers/{chunk-GM55YFOB.js → chunk-VB7MVZDU.js} +14 -14
- package/Build/Workers/{chunk-OIHAAHBK.js → chunk-VC5NTCLG.js} +10 -10
- package/Build/Workers/{chunk-2NKHPWDY.js → chunk-VGOLRLK7.js} +12 -12
- package/Build/Workers/{chunk-QUSP3NWA.js → chunk-VKMJSSOD.js} +5 -5
- package/Build/Workers/{chunk-WTFZHPUW.js → chunk-XAP7YXEJ.js} +5 -5
- package/Build/Workers/{chunk-IWZK2AIH.js → chunk-XH4DQCNS.js} +5 -5
- package/Build/Workers/{chunk-GAUF4F5A.js → chunk-YTIUL27M.js} +16 -16
- package/Build/Workers/{chunk-VGJSKEIB.js → chunk-Z43MDFLH.js} +4 -4
- package/Build/Workers/{chunk-HQE7KSR4.js → chunk-ZT5GZ75Z.js} +2 -2
- package/Build/Workers/combineGeometry.js +21 -21
- package/Build/Workers/createBoxGeometry.js +15 -15
- package/Build/Workers/createBoxOutlineGeometry.js +13 -13
- package/Build/Workers/createCircleGeometry.js +23 -23
- package/Build/Workers/createCircleOutlineGeometry.js +16 -16
- package/Build/Workers/createCoplanarPolygonGeometry.js +30 -30
- package/Build/Workers/createCoplanarPolygonOutlineGeometry.js +28 -28
- package/Build/Workers/createCorridorGeometry.js +26 -26
- package/Build/Workers/createCorridorOutlineGeometry.js +25 -25
- package/Build/Workers/createCylinderGeometry.js +17 -17
- package/Build/Workers/createCylinderOutlineGeometry.js +15 -15
- package/Build/Workers/createEllipseGeometry.js +23 -23
- package/Build/Workers/createEllipseOutlineGeometry.js +16 -16
- package/Build/Workers/createEllipsoidGeometry.js +16 -16
- package/Build/Workers/createEllipsoidOutlineGeometry.js +15 -15
- package/Build/Workers/createFrustumGeometry.js +15 -15
- package/Build/Workers/createFrustumOutlineGeometry.js +15 -15
- package/Build/Workers/createGeometry.js +23 -21
- package/Build/Workers/createGroundPolylineGeometry.js +19 -19
- package/Build/Workers/createPlaneGeometry.js +13 -13
- package/Build/Workers/createPlaneOutlineGeometry.js +12 -12
- package/Build/Workers/createPolygonGeometry.js +29 -29
- package/Build/Workers/createPolygonOutlineGeometry.js +27 -27
- package/Build/Workers/createPolylineGeometry.js +22 -22
- package/Build/Workers/createPolylineVolumeGeometry.js +28 -28
- package/Build/Workers/createPolylineVolumeOutlineGeometry.js +24 -24
- package/Build/Workers/createRectangleGeometry.js +24 -24
- package/Build/Workers/createRectangleOutlineGeometry.js +17 -17
- package/Build/Workers/createSimplePolylineGeometry.js +20 -20
- package/Build/Workers/createSphereGeometry.js +16 -16
- package/Build/Workers/createSphereOutlineGeometry.js +15 -15
- package/Build/Workers/createTaskProcessorWorker.js +3 -3
- package/Build/Workers/createVectorTileClampedPolylines.js +12 -12
- package/Build/Workers/createVectorTileGeometries.js +21 -21
- package/Build/Workers/createVectorTilePoints.js +11 -11
- package/Build/Workers/createVectorTilePolygons.js +19 -19
- package/Build/Workers/createVectorTilePolylines.js +12 -12
- package/Build/Workers/createVerticesFromGoogleEarthEnterpriseBuffer.js +19 -19
- package/Build/Workers/createVerticesFromHeightmap.js +19 -19
- package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +16 -16
- package/Build/Workers/createWallGeometry.js +21 -21
- package/Build/Workers/createWallOutlineGeometry.js +20 -20
- package/Build/Workers/decodeDraco.js +10 -10
- package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +5 -5
- package/Build/Workers/decodeI3S.js +9 -9
- package/Build/Workers/gaussianSplatSorter.js +62 -0
- package/Build/Workers/gaussianSplatTextureGenerator.js +68 -0
- package/Build/Workers/transcodeKTX2.js +59 -7
- package/Build/Workers/transferTypedArrayTest.js +1 -1
- package/Build/Workers/upsampleQuantizedTerrainMesh.js +19 -19
- package/Source/Core/PixelFormat.js +62 -0
- package/Source/Renderer/Context.js +2 -0
- package/Source/Renderer/Pass.js +3 -2
- package/Source/Renderer/Texture.js +1 -0
- package/Source/Renderer/VertexArray.js +33 -8
- package/Source/Renderer/createUniform.js +2 -0
- package/Source/Scene/Cesium3DTileContentFactory.js +23 -0
- package/Source/Scene/Cesium3DTileset.js +59 -2
- package/Source/Scene/GaussianSplat3DTileContent.js +504 -0
- package/Source/Scene/GaussianSplatPrimitive.js +932 -0
- package/Source/Scene/GaussianSplatRenderResources.js +81 -0
- package/Source/Scene/GaussianSplatSorter.js +73 -0
- package/Source/Scene/GaussianSplatTextureGenerator.js +64 -0
- package/Source/Scene/GltfLoader.js +82 -4
- package/Source/Scene/GltfSpzLoader.js +222 -0
- package/Source/Scene/GltfVertexBufferLoader.js +98 -3
- package/Source/Scene/Model/ModelRuntimePrimitive.js +1 -0
- package/Source/Scene/Model/ModelUtility.js +2 -0
- package/Source/Scene/PrimitiveLoadPlan.js +59 -0
- package/Source/Scene/ResourceCache.js +60 -3
- package/Source/Scene/ResourceCacheKey.js +39 -1
- package/Source/Scene/Scene.js +32 -1
- package/Source/Scene/VertexAttributeSemantic.js +30 -0
- package/Source/Shaders/Builtin/Constants/passGaussianSplats.glsl +9 -0
- package/Source/Shaders/Builtin/Constants/passGaussianSplats.js +11 -0
- package/Source/Shaders/Builtin/Constants/passOverlay.glsl +1 -1
- package/Source/Shaders/Builtin/Constants/passOverlay.js +1 -1
- package/Source/Shaders/Builtin/CzmBuiltins.js +2 -0
- package/Source/Shaders/Model/ModelFS.glsl +3 -1
- package/Source/Shaders/Model/ModelFS.js +3 -1
- package/Source/Shaders/Model/ModelVS.glsl +1 -1
- package/Source/Shaders/Model/ModelVS.js +1 -1
- package/Source/Shaders/Model/PointCloudStylingStageVS.glsl +1 -1
- package/Source/Shaders/Model/PointCloudStylingStageVS.js +2 -1
- package/Source/Shaders/PrimitiveGaussianSplatFS.glsl +18 -0
- package/Source/Shaders/PrimitiveGaussianSplatFS.js +20 -0
- package/Source/Shaders/PrimitiveGaussianSplatVS.glsl +108 -0
- package/Source/Shaders/PrimitiveGaussianSplatVS.js +109 -0
- package/Source/ThirdParty/wasm_splats_bg.wasm +0 -0
- package/Source/Workers/gaussianSplatSorter.js +34 -0
- package/Source/Workers/gaussianSplatTextureGenerator.js +39 -0
- package/index.d.ts +16 -0
- package/index.js +71 -62
- package/package.json +4 -2
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
-
* Version 1.130
|
|
4
|
+
* Version 1.130.1
|
|
5
5
|
*
|
|
6
6
|
* Copyright 2011-2022 Cesium Contributors
|
|
7
7
|
*
|
|
@@ -25,18 +25,18 @@
|
|
|
25
25
|
|
|
26
26
|
import {
|
|
27
27
|
createTaskProcessorWorker_default
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-DBPLDHPT.js";
|
|
29
29
|
import {
|
|
30
30
|
RuntimeError_default
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-3JKMJ2DT.js";
|
|
32
32
|
import {
|
|
33
33
|
Check_default
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-5N52XJIS.js";
|
|
35
35
|
import {
|
|
36
36
|
__commonJS,
|
|
37
37
|
__toESM,
|
|
38
38
|
defined_default
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-UOU6BW5C.js";
|
|
40
40
|
|
|
41
41
|
// node_modules/pako/lib/zlib/adler32.js
|
|
42
42
|
var require_adler32 = __commonJS({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
-
* Version 1.130
|
|
4
|
+
* Version 1.130.1
|
|
5
5
|
*
|
|
6
6
|
* Copyright 2011-2022 Cesium Contributors
|
|
7
7
|
*
|
|
@@ -25,32 +25,32 @@
|
|
|
25
25
|
|
|
26
26
|
import {
|
|
27
27
|
require_draco_decoder_nodejs
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-ZT5GZ75Z.js";
|
|
29
29
|
import {
|
|
30
30
|
Color_default
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-UGWI4JAZ.js";
|
|
32
32
|
import {
|
|
33
33
|
createTaskProcessorWorker_default
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-DBPLDHPT.js";
|
|
35
35
|
import {
|
|
36
36
|
WebMercatorProjection_default
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-XAP7YXEJ.js";
|
|
38
38
|
import {
|
|
39
39
|
Cartesian3_default,
|
|
40
40
|
Cartographic_default,
|
|
41
41
|
Ellipsoid_default,
|
|
42
42
|
Matrix3_default
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-Z43MDFLH.js";
|
|
44
44
|
import {
|
|
45
45
|
Math_default
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-FPJWHB5J.js";
|
|
47
47
|
import {
|
|
48
48
|
Check_default
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-5N52XJIS.js";
|
|
50
50
|
import {
|
|
51
51
|
__toESM,
|
|
52
52
|
defined_default
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-UOU6BW5C.js";
|
|
54
54
|
|
|
55
55
|
// packages/engine/Source/Workers/decodeI3S.js
|
|
56
56
|
var import_draco_decoder_nodejs = __toESM(require_draco_decoder_nodejs(), 1);
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
+
* Version 1.130.1
|
|
5
|
+
*
|
|
6
|
+
* Copyright 2011-2022 Cesium Contributors
|
|
7
|
+
*
|
|
8
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
+
* you may not use this file except in compliance with the License.
|
|
10
|
+
* You may obtain a copy of the License at
|
|
11
|
+
*
|
|
12
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
+
*
|
|
14
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
15
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
+
* See the License for the specific language governing permissions and
|
|
18
|
+
* limitations under the License.
|
|
19
|
+
*
|
|
20
|
+
* Columbus View (Pat. Pend.)
|
|
21
|
+
*
|
|
22
|
+
* Portions licensed separately.
|
|
23
|
+
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
import {
|
|
27
|
+
initSync,
|
|
28
|
+
radix_sort_gaussians_indexes
|
|
29
|
+
} from "./chunk-MIMOEYBO.js";
|
|
30
|
+
import {
|
|
31
|
+
createTaskProcessorWorker_default
|
|
32
|
+
} from "./chunk-DBPLDHPT.js";
|
|
33
|
+
import {
|
|
34
|
+
defined_default
|
|
35
|
+
} from "./chunk-UOU6BW5C.js";
|
|
36
|
+
|
|
37
|
+
// packages/engine/Source/Workers/gaussianSplatSorter.js
|
|
38
|
+
async function initWorker(parameters, transferableObjects) {
|
|
39
|
+
const wasmConfig = parameters.webAssemblyConfig;
|
|
40
|
+
if (defined_default(wasmConfig) && defined_default(wasmConfig.wasmBinary)) {
|
|
41
|
+
initSync({ module: wasmConfig.wasmBinary });
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
function generateGaussianSortWorker(parameters, transferableObjects) {
|
|
46
|
+
const wasmConfig = parameters.webAssemblyConfig;
|
|
47
|
+
if (defined_default(wasmConfig)) {
|
|
48
|
+
return initWorker(parameters, transferableObjects);
|
|
49
|
+
}
|
|
50
|
+
const { primitive, sortType } = parameters;
|
|
51
|
+
if (sortType === "Index") {
|
|
52
|
+
return radix_sort_gaussians_indexes(
|
|
53
|
+
primitive.positions,
|
|
54
|
+
primitive.modelView,
|
|
55
|
+
primitive.count
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
var gaussianSplatSorter_default = createTaskProcessorWorker_default(generateGaussianSortWorker);
|
|
60
|
+
export {
|
|
61
|
+
gaussianSplatSorter_default as default
|
|
62
|
+
};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
+
* Version 1.130.1
|
|
5
|
+
*
|
|
6
|
+
* Copyright 2011-2022 Cesium Contributors
|
|
7
|
+
*
|
|
8
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
9
|
+
* you may not use this file except in compliance with the License.
|
|
10
|
+
* You may obtain a copy of the License at
|
|
11
|
+
*
|
|
12
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
13
|
+
*
|
|
14
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
15
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
16
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
17
|
+
* See the License for the specific language governing permissions and
|
|
18
|
+
* limitations under the License.
|
|
19
|
+
*
|
|
20
|
+
* Columbus View (Pat. Pend.)
|
|
21
|
+
*
|
|
22
|
+
* Portions licensed separately.
|
|
23
|
+
* See https://github.com/CesiumGS/cesium/blob/main/LICENSE.md for full licensing details.
|
|
24
|
+
*/
|
|
25
|
+
|
|
26
|
+
import {
|
|
27
|
+
generate_splat_texture,
|
|
28
|
+
initSync
|
|
29
|
+
} from "./chunk-MIMOEYBO.js";
|
|
30
|
+
import {
|
|
31
|
+
createTaskProcessorWorker_default
|
|
32
|
+
} from "./chunk-DBPLDHPT.js";
|
|
33
|
+
import {
|
|
34
|
+
defined_default
|
|
35
|
+
} from "./chunk-UOU6BW5C.js";
|
|
36
|
+
|
|
37
|
+
// packages/engine/Source/Workers/gaussianSplatTextureGenerator.js
|
|
38
|
+
async function initWorker(parameters, transferableObjects) {
|
|
39
|
+
const wasmConfig = parameters.webAssemblyConfig;
|
|
40
|
+
if (defined_default(wasmConfig) && defined_default(wasmConfig.wasmBinary)) {
|
|
41
|
+
initSync({ module: wasmConfig.wasmBinary });
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
return false;
|
|
45
|
+
}
|
|
46
|
+
async function generateSplatTextureWorker(parameters, transferableObjects) {
|
|
47
|
+
const wasmConfig = parameters.webAssemblyConfig;
|
|
48
|
+
if (defined_default(wasmConfig)) {
|
|
49
|
+
return initWorker(parameters, transferableObjects);
|
|
50
|
+
}
|
|
51
|
+
const { attributes, count } = parameters;
|
|
52
|
+
const result = generate_splat_texture(
|
|
53
|
+
attributes.positions,
|
|
54
|
+
attributes.scales,
|
|
55
|
+
attributes.rotations,
|
|
56
|
+
attributes.colors,
|
|
57
|
+
count
|
|
58
|
+
);
|
|
59
|
+
return {
|
|
60
|
+
data: result.data,
|
|
61
|
+
width: result.width,
|
|
62
|
+
height: result.height
|
|
63
|
+
};
|
|
64
|
+
}
|
|
65
|
+
var gaussianSplatTextureGenerator_default = createTaskProcessorWorker_default(generateSplatTextureWorker);
|
|
66
|
+
export {
|
|
67
|
+
gaussianSplatTextureGenerator_default as default
|
|
68
|
+
};
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
-
* Version 1.130
|
|
4
|
+
* Version 1.130.1
|
|
5
5
|
*
|
|
6
6
|
* Copyright 2011-2022 Cesium Contributors
|
|
7
7
|
*
|
|
@@ -25,22 +25,22 @@
|
|
|
25
25
|
|
|
26
26
|
import {
|
|
27
27
|
createTaskProcessorWorker_default
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-DBPLDHPT.js";
|
|
29
29
|
import {
|
|
30
30
|
WebGLConstants_default
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-7252BLXK.js";
|
|
32
32
|
import {
|
|
33
33
|
RuntimeError_default
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-3JKMJ2DT.js";
|
|
35
35
|
import {
|
|
36
36
|
Check_default
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-5N52XJIS.js";
|
|
38
38
|
import {
|
|
39
39
|
__commonJS,
|
|
40
40
|
__require,
|
|
41
41
|
__toESM,
|
|
42
42
|
defined_default
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-UOU6BW5C.js";
|
|
44
44
|
|
|
45
45
|
// packages/engine/Source/ThirdParty/Workers/basis_transcoder.js
|
|
46
46
|
var require_basis_transcoder = __commonJS({
|
|
@@ -2366,6 +2366,30 @@ var PixelFormat = {
|
|
|
2366
2366
|
* @constant
|
|
2367
2367
|
*/
|
|
2368
2368
|
RGBA: WebGLConstants_default.RGBA,
|
|
2369
|
+
/**
|
|
2370
|
+
* A pixel format containing a red channel as an integer.
|
|
2371
|
+
* @type {number}
|
|
2372
|
+
* @constant
|
|
2373
|
+
*/
|
|
2374
|
+
RED_INTEGER: WebGLConstants_default.RED_INTEGER,
|
|
2375
|
+
/**
|
|
2376
|
+
* A pixel format containing red and green channels as integers.
|
|
2377
|
+
* @type {number}
|
|
2378
|
+
* @constant
|
|
2379
|
+
*/
|
|
2380
|
+
RG_INTEGER: WebGLConstants_default.RG_INTEGER,
|
|
2381
|
+
/**
|
|
2382
|
+
* A pixel format containing red, green, and blue channels as integers.
|
|
2383
|
+
* @type {number}
|
|
2384
|
+
* @constant
|
|
2385
|
+
*/
|
|
2386
|
+
RGB_INTEGER: WebGLConstants_default.RGB_INTEGER,
|
|
2387
|
+
/**
|
|
2388
|
+
* A pixel format containing red, green, blue, and alpha channels as integers.
|
|
2389
|
+
* @type {number}
|
|
2390
|
+
* @constant
|
|
2391
|
+
*/
|
|
2392
|
+
RGBA_INTEGER: WebGLConstants_default.RGBA_INTEGER,
|
|
2369
2393
|
/**
|
|
2370
2394
|
* A pixel format containing a luminance (intensity) channel.
|
|
2371
2395
|
*
|
|
@@ -2475,14 +2499,18 @@ var PixelFormat = {
|
|
|
2475
2499
|
PixelFormat.componentsLength = function(pixelFormat) {
|
|
2476
2500
|
switch (pixelFormat) {
|
|
2477
2501
|
case PixelFormat.RGB:
|
|
2502
|
+
case PixelFormat.RGB_INTEGER:
|
|
2478
2503
|
return 3;
|
|
2479
2504
|
case PixelFormat.RGBA:
|
|
2505
|
+
case PixelFormat.RGBA_INTEGER:
|
|
2480
2506
|
return 4;
|
|
2481
2507
|
case PixelFormat.LUMINANCE_ALPHA:
|
|
2482
2508
|
case PixelFormat.RG:
|
|
2509
|
+
case PixelFormat.RG_INTEGER:
|
|
2483
2510
|
return 2;
|
|
2484
2511
|
case PixelFormat.ALPHA:
|
|
2485
2512
|
case PixelFormat.RED:
|
|
2513
|
+
case PixelFormat.RED_INTEGER:
|
|
2486
2514
|
case PixelFormat.LUMINANCE:
|
|
2487
2515
|
return 1;
|
|
2488
2516
|
default:
|
|
@@ -2490,7 +2518,7 @@ PixelFormat.componentsLength = function(pixelFormat) {
|
|
|
2490
2518
|
}
|
|
2491
2519
|
};
|
|
2492
2520
|
PixelFormat.validate = function(pixelFormat) {
|
|
2493
|
-
return pixelFormat === PixelFormat.DEPTH_COMPONENT || pixelFormat === PixelFormat.DEPTH_STENCIL || pixelFormat === PixelFormat.ALPHA || pixelFormat === PixelFormat.RED || pixelFormat === PixelFormat.RG || pixelFormat === PixelFormat.RGB || pixelFormat === PixelFormat.RGBA || pixelFormat === PixelFormat.LUMINANCE || pixelFormat === PixelFormat.LUMINANCE_ALPHA || pixelFormat === PixelFormat.RGB_DXT1 || pixelFormat === PixelFormat.RGBA_DXT1 || pixelFormat === PixelFormat.RGBA_DXT3 || pixelFormat === PixelFormat.RGBA_DXT5 || pixelFormat === PixelFormat.RGB_PVRTC_4BPPV1 || pixelFormat === PixelFormat.RGB_PVRTC_2BPPV1 || pixelFormat === PixelFormat.RGBA_PVRTC_4BPPV1 || pixelFormat === PixelFormat.RGBA_PVRTC_2BPPV1 || pixelFormat === PixelFormat.RGBA_ASTC || pixelFormat === PixelFormat.RGB_ETC1 || pixelFormat === PixelFormat.RGB8_ETC2 || pixelFormat === PixelFormat.RGBA8_ETC2_EAC || pixelFormat === PixelFormat.RGBA_BC7;
|
|
2521
|
+
return pixelFormat === PixelFormat.DEPTH_COMPONENT || pixelFormat === PixelFormat.DEPTH_STENCIL || pixelFormat === PixelFormat.ALPHA || pixelFormat === PixelFormat.RED || pixelFormat === PixelFormat.RG || pixelFormat === PixelFormat.RGB || pixelFormat === PixelFormat.RGBA || pixelFormat === PixelFormat.RED_INTEGER || pixelFormat === PixelFormat.RG_INTEGER || pixelFormat === PixelFormat.RGB_INTEGER || pixelFormat === PixelFormat.RGBA_INTEGER || pixelFormat === PixelFormat.LUMINANCE || pixelFormat === PixelFormat.LUMINANCE_ALPHA || pixelFormat === PixelFormat.RGB_DXT1 || pixelFormat === PixelFormat.RGBA_DXT1 || pixelFormat === PixelFormat.RGBA_DXT3 || pixelFormat === PixelFormat.RGBA_DXT5 || pixelFormat === PixelFormat.RGB_PVRTC_4BPPV1 || pixelFormat === PixelFormat.RGB_PVRTC_2BPPV1 || pixelFormat === PixelFormat.RGBA_PVRTC_4BPPV1 || pixelFormat === PixelFormat.RGBA_PVRTC_2BPPV1 || pixelFormat === PixelFormat.RGBA_ASTC || pixelFormat === PixelFormat.RGB_ETC1 || pixelFormat === PixelFormat.RGB8_ETC2 || pixelFormat === PixelFormat.RGBA8_ETC2_EAC || pixelFormat === PixelFormat.RGBA_BC7;
|
|
2494
2522
|
};
|
|
2495
2523
|
PixelFormat.isColorFormat = function(pixelFormat) {
|
|
2496
2524
|
return pixelFormat === PixelFormat.RED || pixelFormat === PixelFormat.ALPHA || pixelFormat === PixelFormat.RGB || pixelFormat === PixelFormat.RGBA || pixelFormat === PixelFormat.LUMINANCE || pixelFormat === PixelFormat.LUMINANCE_ALPHA;
|
|
@@ -2639,6 +2667,30 @@ PixelFormat.toInternalFormat = function(pixelFormat, pixelDatatype, context) {
|
|
|
2639
2667
|
return WebGLConstants_default.R8;
|
|
2640
2668
|
}
|
|
2641
2669
|
}
|
|
2670
|
+
if (pixelDatatype === PixelDatatype_default.INT) {
|
|
2671
|
+
switch (pixelFormat) {
|
|
2672
|
+
case PixelFormat.RGBA_INTEGER:
|
|
2673
|
+
return WebGLConstants_default.RGBA32I;
|
|
2674
|
+
case PixelFormat.RGB_INTEGER:
|
|
2675
|
+
return WebGLConstants_default.RGB32I;
|
|
2676
|
+
case PixelFormat.RG_INTEGER:
|
|
2677
|
+
return WebGLConstants_default.RG32I;
|
|
2678
|
+
case PixelFormat.RED_INTEGER:
|
|
2679
|
+
return WebGLConstants_default.R32I;
|
|
2680
|
+
}
|
|
2681
|
+
}
|
|
2682
|
+
if (pixelDatatype === PixelDatatype_default.UNSIGNED_INT) {
|
|
2683
|
+
switch (pixelFormat) {
|
|
2684
|
+
case PixelFormat.RGBA_INTEGER:
|
|
2685
|
+
return WebGLConstants_default.RGBA32UI;
|
|
2686
|
+
case PixelFormat.RGB_INTEGER:
|
|
2687
|
+
return WebGLConstants_default.RGB32UI;
|
|
2688
|
+
case PixelFormat.RG_INTEGER:
|
|
2689
|
+
return WebGLConstants_default.RG32UI;
|
|
2690
|
+
case PixelFormat.RED_INTEGER:
|
|
2691
|
+
return WebGLConstants_default.R32UI;
|
|
2692
|
+
}
|
|
2693
|
+
}
|
|
2642
2694
|
return pixelFormat;
|
|
2643
2695
|
};
|
|
2644
2696
|
var PixelFormat_default = Object.freeze(PixelFormat);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
-
* Version 1.130
|
|
4
|
+
* Version 1.130.1
|
|
5
5
|
*
|
|
6
6
|
* Copyright 2011-2022 Cesium Contributors
|
|
7
7
|
*
|
|
@@ -26,48 +26,48 @@
|
|
|
26
26
|
import {
|
|
27
27
|
EllipsoidalOccluder_default,
|
|
28
28
|
TerrainEncoding_default
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-SOLM3ZIV.js";
|
|
30
30
|
import {
|
|
31
31
|
createTaskProcessorWorker_default
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-DBPLDHPT.js";
|
|
33
33
|
import {
|
|
34
34
|
OrientedBoundingBox_default
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-HMYDBCCY.js";
|
|
36
36
|
import {
|
|
37
37
|
AttributeCompression_default
|
|
38
|
-
} from "./chunk-
|
|
39
|
-
import "./chunk-
|
|
40
|
-
import "./chunk-
|
|
41
|
-
import "./chunk-
|
|
42
|
-
import "./chunk-
|
|
38
|
+
} from "./chunk-R7LO2ZW7.js";
|
|
39
|
+
import "./chunk-RRSRPDQN.js";
|
|
40
|
+
import "./chunk-2QPO2E4E.js";
|
|
41
|
+
import "./chunk-5J3B5IYT.js";
|
|
42
|
+
import "./chunk-PMNYUVMK.js";
|
|
43
43
|
import {
|
|
44
44
|
IndexDatatype_default
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-VKMJSSOD.js";
|
|
46
46
|
import {
|
|
47
47
|
BoundingSphere_default
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-EG3P66JO.js";
|
|
49
49
|
import {
|
|
50
50
|
Rectangle_default
|
|
51
|
-
} from "./chunk-
|
|
52
|
-
import "./chunk-
|
|
51
|
+
} from "./chunk-UGKOGDMZ.js";
|
|
52
|
+
import "./chunk-PLM7GGHT.js";
|
|
53
53
|
import {
|
|
54
54
|
Cartesian2_default,
|
|
55
55
|
Cartesian3_default,
|
|
56
56
|
Cartographic_default,
|
|
57
57
|
Ellipsoid_default
|
|
58
|
-
} from "./chunk-
|
|
58
|
+
} from "./chunk-Z43MDFLH.js";
|
|
59
59
|
import {
|
|
60
60
|
Math_default
|
|
61
|
-
} from "./chunk-
|
|
62
|
-
import "./chunk-
|
|
63
|
-
import "./chunk-
|
|
61
|
+
} from "./chunk-FPJWHB5J.js";
|
|
62
|
+
import "./chunk-7252BLXK.js";
|
|
63
|
+
import "./chunk-3JKMJ2DT.js";
|
|
64
64
|
import {
|
|
65
65
|
Check_default,
|
|
66
66
|
DeveloperError_default
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-5N52XJIS.js";
|
|
68
68
|
import {
|
|
69
69
|
defined_default
|
|
70
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-UOU6BW5C.js";
|
|
71
71
|
|
|
72
72
|
// packages/engine/Source/Core/Intersections2D.js
|
|
73
73
|
var Intersections2D = {};
|
|
@@ -63,6 +63,34 @@ const PixelFormat = {
|
|
|
63
63
|
*/
|
|
64
64
|
RGBA: WebGLConstants.RGBA,
|
|
65
65
|
|
|
66
|
+
/**
|
|
67
|
+
* A pixel format containing a red channel as an integer.
|
|
68
|
+
* @type {number}
|
|
69
|
+
* @constant
|
|
70
|
+
*/
|
|
71
|
+
RED_INTEGER: WebGLConstants.RED_INTEGER,
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* A pixel format containing red and green channels as integers.
|
|
75
|
+
* @type {number}
|
|
76
|
+
* @constant
|
|
77
|
+
*/
|
|
78
|
+
RG_INTEGER: WebGLConstants.RG_INTEGER,
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* A pixel format containing red, green, and blue channels as integers.
|
|
82
|
+
* @type {number}
|
|
83
|
+
* @constant
|
|
84
|
+
*/
|
|
85
|
+
RGB_INTEGER: WebGLConstants.RGB_INTEGER,
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* A pixel format containing red, green, blue, and alpha channels as integers.
|
|
89
|
+
* @type {number}
|
|
90
|
+
* @constant
|
|
91
|
+
*/
|
|
92
|
+
RGBA_INTEGER: WebGLConstants.RGBA_INTEGER,
|
|
93
|
+
|
|
66
94
|
/**
|
|
67
95
|
* A pixel format containing a luminance (intensity) channel.
|
|
68
96
|
*
|
|
@@ -190,14 +218,18 @@ const PixelFormat = {
|
|
|
190
218
|
PixelFormat.componentsLength = function (pixelFormat) {
|
|
191
219
|
switch (pixelFormat) {
|
|
192
220
|
case PixelFormat.RGB:
|
|
221
|
+
case PixelFormat.RGB_INTEGER:
|
|
193
222
|
return 3;
|
|
194
223
|
case PixelFormat.RGBA:
|
|
224
|
+
case PixelFormat.RGBA_INTEGER:
|
|
195
225
|
return 4;
|
|
196
226
|
case PixelFormat.LUMINANCE_ALPHA:
|
|
197
227
|
case PixelFormat.RG:
|
|
228
|
+
case PixelFormat.RG_INTEGER:
|
|
198
229
|
return 2;
|
|
199
230
|
case PixelFormat.ALPHA:
|
|
200
231
|
case PixelFormat.RED:
|
|
232
|
+
case PixelFormat.RED_INTEGER:
|
|
201
233
|
case PixelFormat.LUMINANCE:
|
|
202
234
|
return 1;
|
|
203
235
|
default:
|
|
@@ -217,6 +249,10 @@ PixelFormat.validate = function (pixelFormat) {
|
|
|
217
249
|
pixelFormat === PixelFormat.RG ||
|
|
218
250
|
pixelFormat === PixelFormat.RGB ||
|
|
219
251
|
pixelFormat === PixelFormat.RGBA ||
|
|
252
|
+
pixelFormat === PixelFormat.RED_INTEGER ||
|
|
253
|
+
pixelFormat === PixelFormat.RG_INTEGER ||
|
|
254
|
+
pixelFormat === PixelFormat.RGB_INTEGER ||
|
|
255
|
+
pixelFormat === PixelFormat.RGBA_INTEGER ||
|
|
220
256
|
pixelFormat === PixelFormat.LUMINANCE ||
|
|
221
257
|
pixelFormat === PixelFormat.LUMINANCE_ALPHA ||
|
|
222
258
|
pixelFormat === PixelFormat.RGB_DXT1 ||
|
|
@@ -535,6 +571,32 @@ PixelFormat.toInternalFormat = function (pixelFormat, pixelDatatype, context) {
|
|
|
535
571
|
}
|
|
536
572
|
}
|
|
537
573
|
|
|
574
|
+
if (pixelDatatype === PixelDatatype.INT) {
|
|
575
|
+
switch (pixelFormat) {
|
|
576
|
+
case PixelFormat.RGBA_INTEGER:
|
|
577
|
+
return WebGLConstants.RGBA32I;
|
|
578
|
+
case PixelFormat.RGB_INTEGER:
|
|
579
|
+
return WebGLConstants.RGB32I;
|
|
580
|
+
case PixelFormat.RG_INTEGER:
|
|
581
|
+
return WebGLConstants.RG32I;
|
|
582
|
+
case PixelFormat.RED_INTEGER:
|
|
583
|
+
return WebGLConstants.R32I;
|
|
584
|
+
}
|
|
585
|
+
}
|
|
586
|
+
|
|
587
|
+
if (pixelDatatype === PixelDatatype.UNSIGNED_INT) {
|
|
588
|
+
switch (pixelFormat) {
|
|
589
|
+
case PixelFormat.RGBA_INTEGER:
|
|
590
|
+
return WebGLConstants.RGBA32UI;
|
|
591
|
+
case PixelFormat.RGB_INTEGER:
|
|
592
|
+
return WebGLConstants.RGB32UI;
|
|
593
|
+
case PixelFormat.RG_INTEGER:
|
|
594
|
+
return WebGLConstants.RG32UI;
|
|
595
|
+
case PixelFormat.RED_INTEGER:
|
|
596
|
+
return WebGLConstants.R32UI;
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
|
|
538
600
|
return pixelFormat;
|
|
539
601
|
};
|
|
540
602
|
|
|
@@ -1302,6 +1302,7 @@ function beginDraw(
|
|
|
1302
1302
|
bindFramebuffer(context, framebuffer);
|
|
1303
1303
|
applyRenderState(context, renderState, passState, false);
|
|
1304
1304
|
shaderProgram._bind();
|
|
1305
|
+
|
|
1305
1306
|
context._maxFrameTextureUnitIndex = Math.max(
|
|
1306
1307
|
context._maxFrameTextureUnitIndex,
|
|
1307
1308
|
shaderProgram.maximumTextureUnitIndex,
|
|
@@ -1376,6 +1377,7 @@ function continueDraw(context, drawCommand, shaderProgram, uniformMap) {
|
|
|
1376
1377
|
} else {
|
|
1377
1378
|
count = va.numberOfVertices;
|
|
1378
1379
|
}
|
|
1380
|
+
|
|
1379
1381
|
if (instanceCount === 0) {
|
|
1380
1382
|
context._gl.drawArrays(primitiveType, offset, count);
|
|
1381
1383
|
} else {
|
package/Source/Renderer/Pass.js
CHANGED
|
@@ -340,6 +340,7 @@ function loadBufferSource(texture, source) {
|
|
|
340
340
|
pixelDatatype,
|
|
341
341
|
width,
|
|
342
342
|
);
|
|
343
|
+
|
|
343
344
|
gl.pixelStorei(gl.UNPACK_ALIGNMENT, unpackAlignment);
|
|
344
345
|
gl.pixelStorei(gl.UNPACK_PREMULTIPLY_ALPHA_WEBGL, false);
|
|
345
346
|
gl.pixelStorei(gl.UNPACK_FLIP_Y_WEBGL, false);
|
|
@@ -11,6 +11,7 @@ import RuntimeError from "../Core/RuntimeError.js";
|
|
|
11
11
|
import Buffer from "./Buffer.js";
|
|
12
12
|
import BufferUsage from "./BufferUsage.js";
|
|
13
13
|
import ContextLimits from "./ContextLimits.js";
|
|
14
|
+
import AttributeType from "../Scene/AttributeType.js";
|
|
14
15
|
|
|
15
16
|
function addAttribute(attributes, attribute, index, context) {
|
|
16
17
|
const hasVertexBuffer = defined(attribute.vertexBuffer);
|
|
@@ -639,6 +640,7 @@ VertexArray.fromGeometry = function (options) {
|
|
|
639
640
|
componentDatatype = ComponentDatatype.FLOAT;
|
|
640
641
|
}
|
|
641
642
|
|
|
643
|
+
let attrProps = {};
|
|
642
644
|
vertexBuffer = undefined;
|
|
643
645
|
if (defined(attribute.values)) {
|
|
644
646
|
vertexBuffer = Buffer.createVertexBuffer({
|
|
@@ -649,16 +651,39 @@ VertexArray.fromGeometry = function (options) {
|
|
|
649
651
|
),
|
|
650
652
|
usage: bufferUsage,
|
|
651
653
|
});
|
|
654
|
+
|
|
655
|
+
attrProps = {
|
|
656
|
+
index: attributeLocations[name],
|
|
657
|
+
vertexBuffer: vertexBuffer,
|
|
658
|
+
value: attribute.value,
|
|
659
|
+
componentDatatype: componentDatatype,
|
|
660
|
+
componentsPerAttribute: attribute.componentsPerAttribute,
|
|
661
|
+
normalize: attribute.normalize,
|
|
662
|
+
};
|
|
663
|
+
}
|
|
664
|
+
|
|
665
|
+
//if we already have a typedArray lets use it
|
|
666
|
+
if (defined(attribute.typedArray)) {
|
|
667
|
+
vertexBuffer = Buffer.createVertexBuffer({
|
|
668
|
+
context: context,
|
|
669
|
+
typedArray: attribute.typedArray,
|
|
670
|
+
usage: bufferUsage,
|
|
671
|
+
});
|
|
672
|
+
|
|
673
|
+
attrProps = {
|
|
674
|
+
index: attributeLocations[name],
|
|
675
|
+
vertexBuffer: vertexBuffer,
|
|
676
|
+
value: undefined,
|
|
677
|
+
componentDatatype: componentDatatype,
|
|
678
|
+
componentsPerAttribute: AttributeType.getNumberOfComponents(
|
|
679
|
+
attribute.type,
|
|
680
|
+
),
|
|
681
|
+
normalize: attribute.normalized,
|
|
682
|
+
instanceDivisor: attribute.instanceDivisor,
|
|
683
|
+
};
|
|
652
684
|
}
|
|
653
685
|
|
|
654
|
-
vaAttributes.push(
|
|
655
|
-
index: attributeLocations[name],
|
|
656
|
-
vertexBuffer: vertexBuffer,
|
|
657
|
-
value: attribute.value,
|
|
658
|
-
componentDatatype: componentDatatype,
|
|
659
|
-
componentsPerAttribute: attribute.componentsPerAttribute,
|
|
660
|
-
normalize: attribute.normalize,
|
|
661
|
-
});
|
|
686
|
+
vaAttributes.push(attrProps);
|
|
662
687
|
}
|
|
663
688
|
}
|
|
664
689
|
}
|
|
@@ -27,6 +27,8 @@ function createUniform(gl, activeUniform, uniformName, location) {
|
|
|
27
27
|
case gl.SAMPLER_3D:
|
|
28
28
|
case gl.SAMPLER_CUBE:
|
|
29
29
|
return new UniformSampler(gl, activeUniform, uniformName, location);
|
|
30
|
+
case gl.UNSIGNED_INT_SAMPLER_2D:
|
|
31
|
+
return new UniformSampler(gl, activeUniform, uniformName, location);
|
|
30
32
|
case gl.INT:
|
|
31
33
|
case gl.BOOL:
|
|
32
34
|
return new UniformInt(gl, activeUniform, uniformName, location);
|
|
@@ -4,6 +4,7 @@ import Implicit3DTileContent from "./Implicit3DTileContent.js";
|
|
|
4
4
|
import Model3DTileContent from "./Model/Model3DTileContent.js";
|
|
5
5
|
import Tileset3DTileContent from "./Tileset3DTileContent.js";
|
|
6
6
|
import Vector3DTileContent from "./Vector3DTileContent.js";
|
|
7
|
+
import GaussianSplat3DTileContent from "./GaussianSplat3DTileContent.js";
|
|
7
8
|
import RuntimeError from "../Core/RuntimeError.js";
|
|
8
9
|
|
|
9
10
|
/**
|
|
@@ -92,9 +93,31 @@ const Cesium3DTileContentFactory = {
|
|
|
92
93
|
const dataView = new DataView(arrayBuffer, byteOffset);
|
|
93
94
|
const byteLength = dataView.getUint32(8, true);
|
|
94
95
|
const glb = new Uint8Array(arrayBuffer, byteOffset, byteLength);
|
|
96
|
+
let hasGaussianSplatExtension = false;
|
|
97
|
+
if (tileset.isGltfExtensionRequired instanceof Function) {
|
|
98
|
+
hasGaussianSplatExtension = tileset.isGltfExtensionRequired(
|
|
99
|
+
"KHR_spz_gaussian_splats_compression",
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
if (hasGaussianSplatExtension) {
|
|
103
|
+
return GaussianSplat3DTileContent.fromGltf(tileset, tile, resource, glb);
|
|
104
|
+
}
|
|
105
|
+
|
|
95
106
|
return Model3DTileContent.fromGltf(tileset, tile, resource, glb);
|
|
96
107
|
},
|
|
97
108
|
gltf: function (tileset, tile, resource, json) {
|
|
109
|
+
const forceGaussianSplats =
|
|
110
|
+
tileset.debugTreatTilesetAsGaussianSplats ?? false;
|
|
111
|
+
let hasGaussianSplatExtension = false;
|
|
112
|
+
if (tileset.isGltfExtensionRequired instanceof Function) {
|
|
113
|
+
hasGaussianSplatExtension = tileset.isGltfExtensionRequired(
|
|
114
|
+
"KHR_spz_gaussian_splats_compression",
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
if (forceGaussianSplats || hasGaussianSplatExtension) {
|
|
118
|
+
return GaussianSplat3DTileContent.fromGltf(tileset, tile, resource, json);
|
|
119
|
+
}
|
|
120
|
+
|
|
98
121
|
return Model3DTileContent.fromGltf(tileset, tile, resource, json);
|
|
99
122
|
},
|
|
100
123
|
geoJson: function (tileset, tile, resource, json) {
|