@cesium/engine 18.0.1-splats.0 → 18.3.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-6Y6TVYHS.js → chunk-2X55GKAZ.js} +7 -7
- package/Build/Workers/{chunk-SMFCIGM3.js → chunk-5X4ALWN3.js} +5 -5
- package/Build/Workers/{chunk-RTUZ7MJB.js → chunk-6ZILMWWT.js} +2 -2
- package/Build/Workers/{chunk-F43TQW5B.js → chunk-7NWNFECT.js} +2 -2
- package/Build/Workers/{chunk-UTLYCPFY.js → chunk-AU5LXL6F.js} +16 -16
- package/Build/Workers/{chunk-LHM6V4D6.js → chunk-B5GRG2XD.js} +5 -5
- package/Build/Workers/{chunk-6WWHK2ER.js → chunk-BF44BDI3.js} +14 -14
- package/Build/Workers/{chunk-PFD462OE.js → chunk-BOUULJGB.js} +6 -6
- package/Build/Workers/{chunk-PPI33PXH.js → chunk-CQGIUZBN.js} +7 -7
- package/Build/Workers/{chunk-DTVWE5YL.js → chunk-CSHXIRSO.js} +2 -2
- package/Build/Workers/{chunk-2SYY3UBI.js → chunk-D3WJH6EF.js} +1 -1
- package/Build/Workers/{chunk-2ZO6BCHN.js → chunk-DCGBZQAZ.js} +11 -11
- package/Build/Workers/{chunk-JZZQEZMA.js → chunk-DWNELHIA.js} +6 -6
- package/Build/Workers/{chunk-HOEUXPBL.js → chunk-E2ZVCKQO.js} +9 -9
- package/Build/Workers/{chunk-CQXYKPAW.js → chunk-ET4CKCHU.js} +16 -16
- package/Build/Workers/{chunk-OE2WXO2Z.js → chunk-F7UE7LON.js} +10 -10
- package/Build/Workers/{chunk-HDG3VHYL.js → chunk-GPIOZ7JH.js} +2 -2
- package/Build/Workers/{chunk-FOTXJYKS.js → chunk-HPJTS3IN.js} +4 -4
- package/Build/Workers/{chunk-ERPS2WZC.js → chunk-HWHEEBGN.js} +4 -4
- package/Build/Workers/{chunk-KPLU3WDY.js → chunk-IBBIUKYY.js} +5 -5
- package/Build/Workers/{chunk-2WKW3BEB.js → chunk-IIRU2UZR.js} +6 -6
- package/Build/Workers/{chunk-V7LEBY53.js → chunk-ILTKII7E.js} +6 -6
- package/Build/Workers/{chunk-TC3LEKFJ.js → chunk-IMF6BCGK.js} +5 -5
- package/Build/Workers/{chunk-7PQ52XCW.js → chunk-JFWWRZUR.js} +4 -4
- package/Build/Workers/{chunk-4GYIDPXP.js → chunk-JSLGNJ6G.js} +9 -9
- package/Build/Workers/{chunk-2J5ZZ7CY.js → chunk-LVBAAA7Y.js} +4 -4
- package/Build/Workers/{chunk-G2Y7EA4W.js → chunk-MICT4B6V.js} +5 -5
- package/Build/Workers/{chunk-LMTGCD6P.js → chunk-OSUQRKTM.js} +1 -1
- package/Build/Workers/{chunk-EYMZ5FSQ.js → chunk-PFBF3WJU.js} +1 -1
- package/Build/Workers/{chunk-S6QBTP5U.js → chunk-PFP5KMMR.js} +4 -4
- package/Build/Workers/{chunk-GY4E4ZP6.js → chunk-PYI4Z7OX.js} +10 -10
- package/Build/Workers/{chunk-2AXKROJA.js → chunk-QBK76DUM.js} +5 -5
- package/Build/Workers/{chunk-VE3UKRDB.js → chunk-QLWFCB6K.js} +9 -9
- package/Build/Workers/{chunk-IWDYVJ56.js → chunk-SEFDOCKE.js} +12 -12
- package/Build/Workers/{chunk-AQKVFTWV.js → chunk-SJYSTWZN.js} +8 -8
- package/Build/Workers/{chunk-6EP7ED36.js → chunk-SK5ZPCFM.js} +3 -3
- package/Build/Workers/{chunk-O25M56DO.js → chunk-TT2WV4GL.js} +2 -2
- package/Build/Workers/{chunk-A5UFJW2M.js → chunk-U7UDBZPG.js} +12 -12
- package/Build/Workers/{chunk-PRQQHLUB.js → chunk-UIGKHIPY.js} +1 -1
- package/Build/Workers/{chunk-YRR6CJGG.js → chunk-UTBVW7LF.js} +4 -4
- package/Build/Workers/{chunk-W3FBD4FE.js → chunk-UY6SDWRW.js} +8 -8
- package/Build/Workers/{chunk-DI7PHKC6.js → chunk-UYWREKNU.js} +5 -5
- package/Build/Workers/{chunk-6QOBORNG.js → chunk-VAZJ3S3Y.js} +6 -6
- package/Build/Workers/{chunk-ZVTKMLU6.js → chunk-WBVJPXIH.js} +4 -4
- package/Build/Workers/{chunk-JA4KPQJL.js → chunk-WXVKFB45.js} +12 -12
- package/Build/Workers/{chunk-744VWE2U.js → chunk-XCNMJANV.js} +13 -13
- package/Build/Workers/{chunk-BKTEHJFD.js → chunk-XUSVIME7.js} +2 -2
- package/Build/Workers/{chunk-LWZOYSSF.js → chunk-Y4UZFTIJ.js} +1 -1
- package/Build/Workers/{chunk-3UKG5X7F.js → chunk-YURGK72S.js} +12 -12
- package/Build/Workers/{chunk-FOMRN6II.js → chunk-ZAEJ2APC.js} +8 -8
- package/Build/Workers/{chunk-DKKIQS6F.js → chunk-ZHH7WJWF.js} +6 -6
- package/Build/Workers/{chunk-M6U7SV4T.js → chunk-ZLIWAB3Q.js} +7 -7
- 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 +21 -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 +4 -4
- package/Build/Workers/gaussianSplatTextureGenerator.js +4 -4
- package/Build/Workers/transcodeKTX2.js +6 -6
- package/Build/Workers/transferTypedArrayTest.js +1 -1
- package/Build/Workers/upsampleQuantizedTerrainMesh.js +19 -19
- package/Source/Core/Ion.js +1 -1
- package/Source/Core/Resource.js +2 -2
- package/Source/Renderer/Texture.js +6 -3
- package/Source/Scene/ArcGisMapService.js +1 -1
- package/Source/Scene/Cesium3DTileset.js +41 -0
- package/Source/Scene/ClippingPolygonCollection.js +0 -2
- package/Source/Scene/GaussianSplat3DTileContent.js +36 -6
- package/Source/Scene/GaussianSplatPrimitive.js +32 -21
- package/Source/Scene/Material.js +6 -2
- package/Source/Scene/Model/UniformType.js +1 -1
- package/Source/Scene/Vector3DTileContent.js +3 -2
- package/Source/Scene/Vector3DTilePoints.js +10 -0
- package/Source/Shaders/Voxels/convertUvToCylinder.glsl +1 -1
- package/Source/Shaders/Voxels/convertUvToCylinder.js +1 -1
- package/index.d.ts +28 -1
- package/index.js +319 -319
- package/package.json +5 -5
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
-
* Version 1.
|
|
4
|
+
* Version 1.131
|
|
5
5
|
*
|
|
6
6
|
* Copyright 2011-2022 Cesium Contributors
|
|
7
7
|
*
|
|
@@ -26,13 +26,13 @@
|
|
|
26
26
|
import {
|
|
27
27
|
generate_splat_texture,
|
|
28
28
|
initSync
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-PFBF3WJU.js";
|
|
30
30
|
import {
|
|
31
31
|
createTaskProcessorWorker_default
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-CSHXIRSO.js";
|
|
33
33
|
import {
|
|
34
34
|
defined_default
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-OSUQRKTM.js";
|
|
36
36
|
|
|
37
37
|
// packages/engine/Source/Workers/gaussianSplatTextureGenerator.js
|
|
38
38
|
async function initWorker(parameters, transferableObjects) {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
-
* Version 1.
|
|
4
|
+
* Version 1.131
|
|
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-CSHXIRSO.js";
|
|
29
29
|
import {
|
|
30
30
|
WebGLConstants_default
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-Y4UZFTIJ.js";
|
|
32
32
|
import {
|
|
33
33
|
RuntimeError_default
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-6ZILMWWT.js";
|
|
35
35
|
import {
|
|
36
36
|
Check_default
|
|
37
|
-
} from "./chunk-
|
|
37
|
+
} from "./chunk-GPIOZ7JH.js";
|
|
38
38
|
import {
|
|
39
39
|
__commonJS,
|
|
40
40
|
__require,
|
|
41
41
|
__toESM,
|
|
42
42
|
defined_default
|
|
43
|
-
} from "./chunk-
|
|
43
|
+
} from "./chunk-OSUQRKTM.js";
|
|
44
44
|
|
|
45
45
|
// packages/engine/Source/ThirdParty/Workers/basis_transcoder.js
|
|
46
46
|
var require_basis_transcoder = __commonJS({
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
* Cesium - https://github.com/CesiumGS/cesium
|
|
4
|
-
* Version 1.
|
|
4
|
+
* Version 1.131
|
|
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-JSLGNJ6G.js";
|
|
30
30
|
import {
|
|
31
31
|
createTaskProcessorWorker_default
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-CSHXIRSO.js";
|
|
33
33
|
import {
|
|
34
34
|
OrientedBoundingBox_default
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-E2ZVCKQO.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-2X55GKAZ.js";
|
|
39
|
+
import "./chunk-SJYSTWZN.js";
|
|
40
|
+
import "./chunk-UYWREKNU.js";
|
|
41
|
+
import "./chunk-BOUULJGB.js";
|
|
42
|
+
import "./chunk-ILTKII7E.js";
|
|
43
43
|
import {
|
|
44
44
|
IndexDatatype_default
|
|
45
|
-
} from "./chunk-
|
|
45
|
+
} from "./chunk-IBBIUKYY.js";
|
|
46
46
|
import {
|
|
47
47
|
BoundingSphere_default
|
|
48
|
-
} from "./chunk-
|
|
48
|
+
} from "./chunk-VAZJ3S3Y.js";
|
|
49
49
|
import {
|
|
50
50
|
Rectangle_default
|
|
51
|
-
} from "./chunk-
|
|
52
|
-
import "./chunk-
|
|
51
|
+
} from "./chunk-ZAEJ2APC.js";
|
|
52
|
+
import "./chunk-LVBAAA7Y.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-HPJTS3IN.js";
|
|
59
59
|
import {
|
|
60
60
|
Math_default
|
|
61
|
-
} from "./chunk-
|
|
62
|
-
import "./chunk-
|
|
63
|
-
import "./chunk-
|
|
61
|
+
} from "./chunk-SK5ZPCFM.js";
|
|
62
|
+
import "./chunk-Y4UZFTIJ.js";
|
|
63
|
+
import "./chunk-6ZILMWWT.js";
|
|
64
64
|
import {
|
|
65
65
|
Check_default,
|
|
66
66
|
DeveloperError_default
|
|
67
|
-
} from "./chunk-
|
|
67
|
+
} from "./chunk-GPIOZ7JH.js";
|
|
68
68
|
import {
|
|
69
69
|
defined_default
|
|
70
|
-
} from "./chunk-
|
|
70
|
+
} from "./chunk-OSUQRKTM.js";
|
|
71
71
|
|
|
72
72
|
// packages/engine/Source/Core/Intersections2D.js
|
|
73
73
|
var Intersections2D = {};
|
package/Source/Core/Ion.js
CHANGED
|
@@ -4,7 +4,7 @@ import Resource from "./Resource.js";
|
|
|
4
4
|
|
|
5
5
|
let defaultTokenCredit;
|
|
6
6
|
const defaultAccessToken =
|
|
7
|
-
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.
|
|
7
|
+
"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiIwNDljNWFmZC03MzRlLTRiMDMtYWIwMi00Yjk4YWQ4NzQwZGEiLCJpZCI6MjU5LCJpYXQiOjE3NTEzNzkyMzR9.OTqPNs3UGNnT1LYkPTavV80wN8Es_YphpJgQcpdnqWc";
|
|
8
8
|
/**
|
|
9
9
|
* Default settings for accessing the Cesium ion API.
|
|
10
10
|
*
|
package/Source/Core/Resource.js
CHANGED
|
@@ -231,7 +231,7 @@ Resource.supportsImageBitmapOptions = function () {
|
|
|
231
231
|
})
|
|
232
232
|
.then(function (blob) {
|
|
233
233
|
const imageBitmapOptions = {
|
|
234
|
-
imageOrientation: "flipY", // default is "
|
|
234
|
+
imageOrientation: "flipY", // default is "from-image"
|
|
235
235
|
premultiplyAlpha: "none", // default is "default"
|
|
236
236
|
colorSpaceConversion: "none", // default is "default"
|
|
237
237
|
};
|
|
@@ -2036,7 +2036,7 @@ Resource.createImageBitmapFromBlob = function (blob, options) {
|
|
|
2036
2036
|
);
|
|
2037
2037
|
|
|
2038
2038
|
return createImageBitmap(blob, {
|
|
2039
|
-
imageOrientation: options.flipY ? "flipY" : "
|
|
2039
|
+
imageOrientation: options.flipY ? "flipY" : "from-image",
|
|
2040
2040
|
premultiplyAlpha: options.premultiplyAlpha ? "premultiply" : "none",
|
|
2041
2041
|
colorSpaceConversion: options.skipColorSpaceConversion ? "none" : "default",
|
|
2042
2042
|
});
|
|
@@ -18,7 +18,9 @@ import TextureMinificationFilter from "./TextureMinificationFilter.js";
|
|
|
18
18
|
* @typedef {object} Texture.ConstructorOptions
|
|
19
19
|
*
|
|
20
20
|
* @property {Context} context
|
|
21
|
-
* @property {object} [source] The source for texel values to be loaded into the texture.
|
|
21
|
+
* @property {object} [source] The source for texel values to be loaded into the texture. A {@link ImageData}, {@link HTMLImageElement}, {@link HTMLCanvasElement},
|
|
22
|
+
* {@link HTMLVideoElement}, {@link OffscreenCanvas}, or {@link ImageBitmap},
|
|
23
|
+
* or an object with width, height, and arrayBufferView properties.
|
|
22
24
|
* @property {PixelFormat} [pixelFormat=PixelFormat.RGBA] The format of each pixel, i.e., the number of components it has and what they represent.
|
|
23
25
|
* @property {PixelDatatype} [pixelDatatype=PixelDatatype.UNSIGNED_BYTE] The data type of each pixel.
|
|
24
26
|
* @property {boolean} [flipY=true] If true, the source values will be read as if the y-axis is inverted (y=0 at the top).
|
|
@@ -484,7 +486,7 @@ function loadFramebufferSource(texture, source) {
|
|
|
484
486
|
* Load texel data from an Image into a texture.
|
|
485
487
|
*
|
|
486
488
|
* @param {Texture} texture The texture to which texel values will be loaded.
|
|
487
|
-
* @param {ImageData|HTMLImageElement|HTMLCanvasElement|HTMLVideoElement} source The source for texel values to be loaded into the texture.
|
|
489
|
+
* @param {ImageData|HTMLImageElement|HTMLCanvasElement|HTMLVideoElement|OffscreenCanvas|ImageBitmap} source The source for texel values to be loaded into the texture.
|
|
488
490
|
*
|
|
489
491
|
* @private
|
|
490
492
|
*/
|
|
@@ -831,7 +833,8 @@ function setupSampler(texture, sampler) {
|
|
|
831
833
|
* Copy new image data into this texture, from a source {@link ImageData}, {@link HTMLImageElement}, {@link HTMLCanvasElement}, or {@link HTMLVideoElement}.
|
|
832
834
|
* or an object with width, height, and arrayBufferView properties.
|
|
833
835
|
* @param {object} options Object with the following properties:
|
|
834
|
-
* @param {object} options.source The source {@link ImageData}, {@link HTMLImageElement}, {@link HTMLCanvasElement},
|
|
836
|
+
* @param {object} options.source The source {@link ImageData}, {@link HTMLImageElement}, {@link HTMLCanvasElement}, {@link HTMLVideoElement},
|
|
837
|
+
* {@link OffscreenCanvas}, or {@link ImageBitmap},
|
|
835
838
|
* or an object with width, height, and arrayBufferView properties.
|
|
836
839
|
* @param {number} [options.xOffset=0] The offset in the x direction within the texture to copy into.
|
|
837
840
|
* @param {number} [options.yOffset=0] The offset in the y direction within the texture to copy into.
|
|
@@ -4,7 +4,7 @@ import Resource from "../Core/Resource.js";
|
|
|
4
4
|
|
|
5
5
|
let defaultTokenCredit;
|
|
6
6
|
const defaultAccessToken =
|
|
7
|
-
"
|
|
7
|
+
"AAPTxy8BH1VEsoebNVZXo8HurEOF051kAEKlhkOhBEc9BmTvj0sIevECBw-bvZAvk8zYQRQq68aswXB6_yVObhIYNHapUAk3eqDIvpDZAUjFHpy1wJdPnkcKqSGXXGM22C1fqVC0gbU2S_RjRHuIHK5WVIYP7fUJQPjRGD1weDGyD5vBqwZX1Ah4LLUPG9474k1fvB1_vIROH9r9R-Sd9f9pbBFr9FjKfISJZiiJdaXVas4.AT1_eWrg8X2i";
|
|
8
8
|
/**
|
|
9
9
|
* Default options for accessing the ArcGIS image tile service.
|
|
10
10
|
*
|
|
@@ -102,6 +102,8 @@ import ImageryLayerCollection from "./ImageryLayerCollection.js";
|
|
|
102
102
|
* @property {ClippingPlaneCollection} [clippingPlanes] The {@link ClippingPlaneCollection} used to selectively disable rendering the tileset.
|
|
103
103
|
* @property {ClippingPolygonCollection} [clippingPolygons] The {@link ClippingPolygonCollection} used to selectively disable rendering the tileset.
|
|
104
104
|
* @property {ClassificationType} [classificationType] Determines whether terrain, 3D Tiles or both will be classified by this tileset. See {@link Cesium3DTileset#classificationType} for details about restrictions and limitations.
|
|
105
|
+
* @property {HeightReference} [heightReference] Sets the {@link HeightReference} for point features in vector tilesets.
|
|
106
|
+
* @property {Scene} [scene] The {@link CesiumWidget#scene} that the tileset will be rendered in, required for tilesets that specify a {@link heightReference} value for clamping 3D Tiles vector data content- like points, lines, and labels- to terrain or 3D tiles.
|
|
105
107
|
* @property {Ellipsoid} [ellipsoid=Ellipsoid.WGS84] The ellipsoid determining the size and shape of the globe.
|
|
106
108
|
* @property {object} [pointCloudShading] Options for constructing a {@link PointCloudShading} object to control point attenuation based on geometric error and lighting.
|
|
107
109
|
* @property {Cartesian3} [lightColor] The light color when shading models. When <code>undefined</code> the scene's light color is used instead.
|
|
@@ -336,6 +338,8 @@ function Cesium3DTileset(options) {
|
|
|
336
338
|
this._tileDebugLabels = undefined;
|
|
337
339
|
|
|
338
340
|
this._classificationType = options.classificationType;
|
|
341
|
+
this._heightReference = options.heightReference;
|
|
342
|
+
this._scene = options.scene;
|
|
339
343
|
|
|
340
344
|
this._ellipsoid = options.ellipsoid ?? Ellipsoid.WGS84;
|
|
341
345
|
|
|
@@ -1807,6 +1811,43 @@ Object.defineProperties(Cesium3DTileset.prototype, {
|
|
|
1807
1811
|
},
|
|
1808
1812
|
},
|
|
1809
1813
|
|
|
1814
|
+
/**
|
|
1815
|
+
* Specifies if the height is relative to terrain, 3D Tiles, or both.
|
|
1816
|
+
* <p>
|
|
1817
|
+
* This option is only applied to point features in tilesets containing vector data.
|
|
1818
|
+
* This option requires the Viewer's scene to be passed in through options.scene.
|
|
1819
|
+
* </p>
|
|
1820
|
+
*
|
|
1821
|
+
* @memberof Cesium3DTileset.prototype
|
|
1822
|
+
*
|
|
1823
|
+
* @type {HeightReference | undefined}
|
|
1824
|
+
* @default undefined
|
|
1825
|
+
*
|
|
1826
|
+
* @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.
|
|
1827
|
+
* @readonly
|
|
1828
|
+
*/
|
|
1829
|
+
heightReference: {
|
|
1830
|
+
get: function () {
|
|
1831
|
+
return this._heightReference;
|
|
1832
|
+
},
|
|
1833
|
+
},
|
|
1834
|
+
|
|
1835
|
+
/**
|
|
1836
|
+
* The {@link CesiumWidget#scene} that the tileset will be rendered in, required for tilesets that specify a {@link heightReference} value for clamping 3D Tiles vector data content- like points, lines, and labels- to terrain or 3D tiles.
|
|
1837
|
+
*
|
|
1838
|
+
* @member of Cesium3DTileset.prototype
|
|
1839
|
+
*
|
|
1840
|
+
* @type {Scene | undefined}
|
|
1841
|
+
* @default undefined
|
|
1842
|
+
* @readonly
|
|
1843
|
+
*
|
|
1844
|
+
*/
|
|
1845
|
+
scene: {
|
|
1846
|
+
get: function () {
|
|
1847
|
+
return this._scene;
|
|
1848
|
+
},
|
|
1849
|
+
},
|
|
1850
|
+
|
|
1810
1851
|
/**
|
|
1811
1852
|
* Gets an ellipsoid describing the shape of the globe.
|
|
1812
1853
|
*
|
|
@@ -66,7 +66,6 @@ function ClippingPolygonCollection(options) {
|
|
|
66
66
|
/**
|
|
67
67
|
* If true, clipping will be enabled.
|
|
68
68
|
*
|
|
69
|
-
* @memberof ClippingPolygonCollection.prototype
|
|
70
69
|
* @type {boolean}
|
|
71
70
|
* @default true
|
|
72
71
|
*/
|
|
@@ -77,7 +76,6 @@ function ClippingPolygonCollection(options) {
|
|
|
77
76
|
* collection. Otherwise, a region will only be clipped if it is
|
|
78
77
|
* inside of any polygon.
|
|
79
78
|
*
|
|
80
|
-
* @memberof ClippingPolygonCollection.prototype
|
|
81
79
|
* @type {boolean}
|
|
82
80
|
* @default false
|
|
83
81
|
*/
|
|
@@ -5,6 +5,8 @@ import RuntimeError from "../Core/RuntimeError.js";
|
|
|
5
5
|
import Axis from "./Axis.js";
|
|
6
6
|
import GaussianSplatPrimitive from "./GaussianSplatPrimitive.js";
|
|
7
7
|
import destroyObject from "../Core/destroyObject.js";
|
|
8
|
+
import ModelUtility from "./Model/ModelUtility.js";
|
|
9
|
+
import VertexAttributeSemantic from "./VertexAttributeSemantic.js";
|
|
8
10
|
|
|
9
11
|
/**
|
|
10
12
|
* Represents the contents of a glTF or glb using the {@link https://github.com/CesiumGS/glTF/tree/draft-spz-splat-compression/extensions/2.0/Khronos/KHR_spz_gaussian_splats_compression|KHR_spz_gaussian_splats_compression} extension.
|
|
@@ -28,6 +30,17 @@ function GaussianSplat3DTileContent(loader, tileset, tile, resource) {
|
|
|
28
30
|
});
|
|
29
31
|
}
|
|
30
32
|
|
|
33
|
+
/**
|
|
34
|
+
* Original position, scale and rotation values for splats. Used to maintain
|
|
35
|
+
* consistency when multiple transforms may occur. Downstream consumers otherwise may not know
|
|
36
|
+
* the underlying data was modified.
|
|
37
|
+
* @type {undefined|Float32Array}
|
|
38
|
+
* @private
|
|
39
|
+
*/
|
|
40
|
+
this._originalPositions = undefined;
|
|
41
|
+
this._originalRotations = undefined;
|
|
42
|
+
this._originalScales = undefined;
|
|
43
|
+
|
|
31
44
|
/**
|
|
32
45
|
* glTF primitive data that contains the Gaussian splat data needed for rendering.
|
|
33
46
|
* @type {undefined|Primitive}
|
|
@@ -350,7 +363,7 @@ GaussianSplat3DTileContent.fromGltf = async function (
|
|
|
350
363
|
|
|
351
364
|
/**
|
|
352
365
|
* Updates the content of the tile and prepares it for rendering.
|
|
353
|
-
* @param {Cesium3DTileset}
|
|
366
|
+
* @param {Cesium3DTileset}Data attribution
|
|
354
367
|
* @param {FrameState} frameState - The current frame state.
|
|
355
368
|
* @private
|
|
356
369
|
*/
|
|
@@ -358,11 +371,7 @@ GaussianSplat3DTileContent.prototype.update = function (primitive, frameState) {
|
|
|
358
371
|
const loader = this._loader;
|
|
359
372
|
|
|
360
373
|
if (this._ready) {
|
|
361
|
-
if (
|
|
362
|
-
!this._transformed &&
|
|
363
|
-
this._tile !== primitive.root &&
|
|
364
|
-
primitive.root.content.ready
|
|
365
|
-
) {
|
|
374
|
+
if (!this._transformed && primitive.root.content.ready) {
|
|
366
375
|
GaussianSplatPrimitive.transformTile(this._tile);
|
|
367
376
|
this._transformed = true;
|
|
368
377
|
}
|
|
@@ -382,6 +391,27 @@ GaussianSplat3DTileContent.prototype.update = function (primitive, frameState) {
|
|
|
382
391
|
this.worldTransform = loader.components.scene.nodes[0].matrix;
|
|
383
392
|
this._ready = true;
|
|
384
393
|
|
|
394
|
+
this._originalPositions = new Float32Array(
|
|
395
|
+
ModelUtility.getAttributeBySemantic(
|
|
396
|
+
this.splatPrimitive,
|
|
397
|
+
VertexAttributeSemantic.POSITION,
|
|
398
|
+
).typedArray,
|
|
399
|
+
);
|
|
400
|
+
|
|
401
|
+
this._originalRotations = new Float32Array(
|
|
402
|
+
ModelUtility.getAttributeBySemantic(
|
|
403
|
+
this.splatPrimitive,
|
|
404
|
+
VertexAttributeSemantic.ROTATION,
|
|
405
|
+
).typedArray,
|
|
406
|
+
);
|
|
407
|
+
|
|
408
|
+
this._originalScales = new Float32Array(
|
|
409
|
+
ModelUtility.getAttributeBySemantic(
|
|
410
|
+
this.splatPrimitive,
|
|
411
|
+
VertexAttributeSemantic.SCALE,
|
|
412
|
+
).typedArray,
|
|
413
|
+
);
|
|
414
|
+
|
|
385
415
|
return;
|
|
386
416
|
}
|
|
387
417
|
|
|
@@ -29,7 +29,6 @@ import AttributeType from "./AttributeType.js";
|
|
|
29
29
|
import ModelComponents from "./ModelComponents.js";
|
|
30
30
|
import Axis from "./Axis.js";
|
|
31
31
|
import Cartesian3 from "../Core/Cartesian3.js";
|
|
32
|
-
import Transforms from "../Core/Transforms.js";
|
|
33
32
|
import Quaternion from "../Core/Quaternion.js";
|
|
34
33
|
import SplitDirection from "./SplitDirection.js";
|
|
35
34
|
import destroyObject from "../Core/destroyObject.js";
|
|
@@ -438,27 +437,31 @@ GaussianSplatPrimitive.transformTile = function (tile) {
|
|
|
438
437
|
computedModelMatrix,
|
|
439
438
|
);
|
|
440
439
|
|
|
441
|
-
const
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
440
|
+
const toGlobal = Matrix4.multiply(
|
|
441
|
+
tile.tileset.modelMatrix,
|
|
442
|
+
Matrix4.fromArray(tile.tileset.root.transform),
|
|
443
|
+
scratchMatrix4B,
|
|
444
|
+
);
|
|
445
|
+
const toLocal = Matrix4.inverse(toGlobal, scratchMatrix4C);
|
|
445
446
|
const transform = Matrix4.multiplyTransformation(
|
|
446
447
|
toLocal,
|
|
447
448
|
computedModelMatrix,
|
|
448
449
|
scratchMatrix4A,
|
|
449
450
|
);
|
|
450
|
-
|
|
451
|
-
const
|
|
451
|
+
const positions = tile.content._originalPositions;
|
|
452
|
+
const rotations = tile.content._originalRotations;
|
|
453
|
+
const scales = tile.content._originalScales;
|
|
454
|
+
const attributePositions = ModelUtility.getAttributeBySemantic(
|
|
452
455
|
splatPrimitive,
|
|
453
456
|
VertexAttributeSemantic.POSITION,
|
|
454
457
|
).typedArray;
|
|
455
458
|
|
|
456
|
-
const
|
|
459
|
+
const attributeRotations = ModelUtility.getAttributeBySemantic(
|
|
457
460
|
splatPrimitive,
|
|
458
461
|
VertexAttributeSemantic.ROTATION,
|
|
459
462
|
).typedArray;
|
|
460
463
|
|
|
461
|
-
const
|
|
464
|
+
const attributeScales = ModelUtility.getAttributeBySemantic(
|
|
462
465
|
splatPrimitive,
|
|
463
466
|
VertexAttributeSemantic.SCALE,
|
|
464
467
|
).typedArray;
|
|
@@ -493,18 +496,18 @@ GaussianSplatPrimitive.transformTile = function (tile) {
|
|
|
493
496
|
Matrix4.getRotation(scratchMatrix4C, rotation);
|
|
494
497
|
Matrix4.getScale(scratchMatrix4C, scale);
|
|
495
498
|
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
+
attributePositions[i * 3] = position.x;
|
|
500
|
+
attributePositions[i * 3 + 1] = position.y;
|
|
501
|
+
attributePositions[i * 3 + 2] = position.z;
|
|
499
502
|
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
503
|
+
attributeRotations[i * 4] = rotation.x;
|
|
504
|
+
attributeRotations[i * 4 + 1] = rotation.y;
|
|
505
|
+
attributeRotations[i * 4 + 2] = rotation.z;
|
|
506
|
+
attributeRotations[i * 4 + 3] = rotation.w;
|
|
504
507
|
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
+
attributeScales[i * 3] = scale.x;
|
|
509
|
+
attributeScales[i * 3 + 1] = scale.y;
|
|
510
|
+
attributeScales[i * 3 + 2] = scale.z;
|
|
508
511
|
}
|
|
509
512
|
};
|
|
510
513
|
|
|
@@ -706,8 +709,11 @@ GaussianSplatPrimitive.buildGSplatDrawCommand = function (
|
|
|
706
709
|
|
|
707
710
|
primitive._vertexArrayLen = primitive._indexes.length;
|
|
708
711
|
|
|
709
|
-
const
|
|
710
|
-
|
|
712
|
+
const modelMatrix = Matrix4.multiply(
|
|
713
|
+
tileset.modelMatrix,
|
|
714
|
+
Matrix4.fromArray(tileset.root.transform),
|
|
715
|
+
scratchMatrix4B,
|
|
716
|
+
);
|
|
711
717
|
|
|
712
718
|
const command = new DrawCommand({
|
|
713
719
|
boundingVolume: tileset.boundingSphere,
|
|
@@ -751,6 +757,11 @@ GaussianSplatPrimitive.prototype.update = function (frameState) {
|
|
|
751
757
|
frameState.commandList.push(this._drawCommand);
|
|
752
758
|
}
|
|
753
759
|
|
|
760
|
+
if (tileset._modelMatrixChanged) {
|
|
761
|
+
this._dirty = true;
|
|
762
|
+
return;
|
|
763
|
+
}
|
|
764
|
+
|
|
754
765
|
if (frameState.passes.pick === true) {
|
|
755
766
|
return;
|
|
756
767
|
}
|
package/Source/Scene/Material.js
CHANGED
|
@@ -914,7 +914,9 @@ function createTexture2DUpdateFunction(uniformId) {
|
|
|
914
914
|
});
|
|
915
915
|
} else if (
|
|
916
916
|
uniformValue instanceof HTMLCanvasElement ||
|
|
917
|
-
uniformValue instanceof HTMLImageElement
|
|
917
|
+
uniformValue instanceof HTMLImageElement ||
|
|
918
|
+
uniformValue instanceof ImageBitmap ||
|
|
919
|
+
uniformValue instanceof OffscreenCanvas
|
|
918
920
|
) {
|
|
919
921
|
material._loadedImages.push({
|
|
920
922
|
id: uniformId,
|
|
@@ -1091,7 +1093,9 @@ function getUniformType(uniformValue) {
|
|
|
1091
1093
|
type === "string" ||
|
|
1092
1094
|
uniformValue instanceof Resource ||
|
|
1093
1095
|
uniformValue instanceof HTMLCanvasElement ||
|
|
1094
|
-
uniformValue instanceof HTMLImageElement
|
|
1096
|
+
uniformValue instanceof HTMLImageElement ||
|
|
1097
|
+
uniformValue instanceof ImageBitmap ||
|
|
1098
|
+
uniformValue instanceof OffscreenCanvas
|
|
1095
1099
|
) {
|
|
1096
1100
|
if (/^([rgba]){1,4}$/i.test(uniformValue)) {
|
|
1097
1101
|
uniformType = "channels";
|
|
@@ -524,7 +524,7 @@ function initialize(content, arrayBuffer, byteOffset) {
|
|
|
524
524
|
modelMatrix: modelMatrix,
|
|
525
525
|
});
|
|
526
526
|
}
|
|
527
|
-
|
|
527
|
+
const tileset = content._tileset;
|
|
528
528
|
if (numberOfPolylines > 0) {
|
|
529
529
|
featureTable.featuresLength = numberOfPolylines;
|
|
530
530
|
|
|
@@ -570,7 +570,6 @@ function initialize(content, arrayBuffer, byteOffset) {
|
|
|
570
570
|
);
|
|
571
571
|
byteOffset += polylinePositionByteLength;
|
|
572
572
|
|
|
573
|
-
const tileset = content._tileset;
|
|
574
573
|
const examineVectorLinesFunction = tileset.examineVectorLinesFunction;
|
|
575
574
|
if (defined(examineVectorLinesFunction)) {
|
|
576
575
|
const decodedPositions = decodeVectorPolylinePositions(
|
|
@@ -625,6 +624,8 @@ function initialize(content, arrayBuffer, byteOffset) {
|
|
|
625
624
|
maximumHeight: maxHeight,
|
|
626
625
|
rectangle: rectangle,
|
|
627
626
|
batchTable: batchTable,
|
|
627
|
+
heightReference: tileset.heightReference,
|
|
628
|
+
scene: tileset.scene,
|
|
628
629
|
});
|
|
629
630
|
}
|
|
630
631
|
}
|
|
@@ -15,6 +15,7 @@ import LabelCollection from "./LabelCollection.js";
|
|
|
15
15
|
import LabelStyle from "./LabelStyle.js";
|
|
16
16
|
import PolylineCollection from "./PolylineCollection.js";
|
|
17
17
|
import VerticalOrigin from "./VerticalOrigin.js";
|
|
18
|
+
import HeightReference from "./HeightReference.js";
|
|
18
19
|
|
|
19
20
|
/**
|
|
20
21
|
* Creates a batch of points or billboards and labels.
|
|
@@ -27,8 +28,10 @@ import VerticalOrigin from "./VerticalOrigin.js";
|
|
|
27
28
|
* @param {number} options.minimumHeight The minimum height of the terrain covered by the tile.
|
|
28
29
|
* @param {number} options.maximumHeight The maximum height of the terrain covered by the tile.
|
|
29
30
|
* @param {Rectangle} options.rectangle The rectangle containing the tile.
|
|
31
|
+
* @param {HeightReference} options.heightReference Determines how billboard and label features are positioned relative to terrain or 3d tiles.
|
|
30
32
|
* @param {Cesium3DTileBatchTable} options.batchTable The batch table for the tile containing the batched polygons.
|
|
31
33
|
* @param {Uint16Array} options.batchIds The batch ids for each polygon.
|
|
34
|
+
* @param {Scene} options.scene The Cesium Viewer {@link Scene}. This is required for clamping billboards and labels with {@link HeightReference}
|
|
32
35
|
*
|
|
33
36
|
* @private
|
|
34
37
|
*/
|
|
@@ -42,12 +45,15 @@ function Vector3DTilePoints(options) {
|
|
|
42
45
|
this._rectangle = options.rectangle;
|
|
43
46
|
this._minHeight = options.minimumHeight;
|
|
44
47
|
this._maxHeight = options.maximumHeight;
|
|
48
|
+
this._heightReference = options.heightReference;
|
|
45
49
|
|
|
46
50
|
this._billboardCollection = new BillboardCollection({
|
|
47
51
|
batchTable: options.batchTable,
|
|
52
|
+
scene: options.scene,
|
|
48
53
|
});
|
|
49
54
|
this._labelCollection = new LabelCollection({
|
|
50
55
|
batchTable: options.batchTable,
|
|
56
|
+
scene: options.scene,
|
|
51
57
|
});
|
|
52
58
|
this._polylineCollection = new PolylineCollection();
|
|
53
59
|
this._polylineCollection._useHighlightColor = true;
|
|
@@ -175,6 +181,8 @@ function createPoints(points, ellipsoid) {
|
|
|
175
181
|
const batchIds = points._batchIds;
|
|
176
182
|
const numberOfPoints = positions.length / 3;
|
|
177
183
|
|
|
184
|
+
const heightReference = points._heightReference ?? HeightReference.NONE;
|
|
185
|
+
|
|
178
186
|
for (let i = 0; i < numberOfPoints; ++i) {
|
|
179
187
|
const id = batchIds[i];
|
|
180
188
|
|
|
@@ -183,11 +191,13 @@ function createPoints(points, ellipsoid) {
|
|
|
183
191
|
const b = billboardCollection.add();
|
|
184
192
|
b.position = position;
|
|
185
193
|
b._batchIndex = id;
|
|
194
|
+
b.heightReference = heightReference;
|
|
186
195
|
|
|
187
196
|
const l = labelCollection.add();
|
|
188
197
|
l.text = " ";
|
|
189
198
|
l.position = position;
|
|
190
199
|
l._batchIndex = id;
|
|
200
|
+
l.heightReference = heightReference;
|
|
191
201
|
|
|
192
202
|
const p = polylineCollection.add();
|
|
193
203
|
p.positions = [Cartesian3.clone(position), Cartesian3.clone(position)];
|
|
@@ -38,7 +38,7 @@ PointJacobianT convertUvToShapeSpaceDerivative(in vec3 positionUv) {
|
|
|
38
38
|
vec3 east = normalize(vec3(-position.y, position.x, 0.0));
|
|
39
39
|
|
|
40
40
|
vec3 point = vec3(radius, angle, height);
|
|
41
|
-
mat3 jacobianT = mat3(radial,
|
|
41
|
+
mat3 jacobianT = mat3(radial, east / length(position.xy), z);
|
|
42
42
|
return PointJacobianT(point, jacobianT);
|
|
43
43
|
}
|
|
44
44
|
|
|
@@ -39,7 +39,7 @@ PointJacobianT convertUvToShapeSpaceDerivative(in vec3 positionUv) {\n\
|
|
|
39
39
|
vec3 east = normalize(vec3(-position.y, position.x, 0.0));\n\
|
|
40
40
|
\n\
|
|
41
41
|
vec3 point = vec3(radius, angle, height);\n\
|
|
42
|
-
mat3 jacobianT = mat3(radial,
|
|
42
|
+
mat3 jacobianT = mat3(radial, east / length(position.xy), z);\n\
|
|
43
43
|
return PointJacobianT(point, jacobianT);\n\
|
|
44
44
|
}\n\
|
|
45
45
|
\n\
|