@cesium/engine 23.0.0 → 24.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-QTOHIXGF.js → chunk-2N4KDHS3.js} +10 -10
- package/Build/Workers/{chunk-SQTRWKO2.js → chunk-44EMEGKW.js} +5 -5
- package/Build/Workers/{chunk-OHBM4YG4.js → chunk-4TIG36AW.js} +12 -12
- package/Build/Workers/{chunk-BNBD2YZK.js → chunk-5A2SW66E.js} +16 -16
- package/Build/Workers/{chunk-52K3GJKG.js → chunk-5GXYJQ2K.js} +3 -3
- package/Build/Workers/{chunk-NQCAZU7S.js → chunk-63SIWPLS.js} +13 -13
- package/Build/Workers/{chunk-UEEGWJJP.js → chunk-6MPGQEHA.js} +2 -2
- package/Build/Workers/{chunk-PQVNT5CJ.js → chunk-6RMS4S72.js} +6 -6
- package/Build/Workers/{chunk-HYTFXWMY.js → chunk-6WLHJFD3.js} +7 -7
- package/Build/Workers/{chunk-DT5SJBKA.js → chunk-72VYSVEW.js} +9 -9
- package/Build/Workers/{chunk-JUGY5AZN.js → chunk-7MDYBRYJ.js} +4 -4
- package/Build/Workers/{chunk-6SLGTBB2.js → chunk-7O5XJTVE.js} +5 -5
- package/Build/Workers/{chunk-4UNQX2MP.js → chunk-7QRFIKWQ.js} +2 -2
- package/Build/Workers/{chunk-GN5NEUDT.js → chunk-7TYLCBGK.js} +8 -8
- package/Build/Workers/{chunk-SGKTBHFQ.js → chunk-7X322WP2.js} +13 -13
- package/Build/Workers/{chunk-T43FXHNC.js → chunk-A47HVBC5.js} +7 -7
- package/Build/Workers/{chunk-FSDVXW7M.js → chunk-AF3MU2RL.js} +5 -5
- package/Build/Workers/{chunk-3B65YFXC.js → chunk-AJLTU6PF.js} +1 -1
- package/Build/Workers/{chunk-OQ3EAJNW.js → chunk-AMIHNSST.js} +2 -2
- package/Build/Workers/{chunk-N4AWE7TZ.js → chunk-B6SCUUFP.js} +10 -10
- package/Build/Workers/{chunk-OMXN7YF4.js → chunk-BJD6QGXZ.js} +12 -12
- package/Build/Workers/{chunk-APDKMX7W.js → chunk-C6P4IG5P.js} +6 -6
- package/Build/Workers/{chunk-QA24Q62E.js → chunk-D4EJ2NXG.js} +17 -17
- package/Build/Workers/{chunk-HYLEKKO5.js → chunk-DHKPFLSJ.js} +1 -1
- package/Build/Workers/{chunk-MQJG522T.js → chunk-DVB56LG7.js} +6 -6
- package/Build/Workers/{chunk-Y5AJSEEN.js → chunk-EDXL4W76.js} +2 -2
- package/Build/Workers/{chunk-QQX7S5QT.js → chunk-EV3VGO6Y.js} +17 -17
- package/Build/Workers/{chunk-IFA7VHHP.js → chunk-GOQBUCXH.js} +10 -10
- package/Build/Workers/{chunk-5A7YSAXT.js → chunk-GQUNK2XC.js} +14 -14
- package/Build/Workers/{chunk-36LBFITA.js → chunk-HKUES6UG.js} +12 -12
- package/Build/Workers/{chunk-OC6X22PG.js → chunk-HRHRYFHS.js} +9 -9
- package/Build/Workers/{chunk-L7RDJ4V7.js → chunk-HXJMS2ZI.js} +1 -1
- package/Build/Workers/{chunk-NAYRNPEP.js → chunk-ILMFADZA.js} +4 -4
- package/Build/Workers/{chunk-AA33B6PU.js → chunk-ISY4EZCA.js} +4 -4
- package/Build/Workers/{chunk-7KRN6JPQ.js → chunk-J6AW5YHS.js} +14 -14
- package/Build/Workers/{chunk-OQBPOKPZ.js → chunk-JCI63T3K.js} +6 -6
- package/Build/Workers/{chunk-2WI4HGJU.js → chunk-KLPGTXS3.js} +6 -6
- package/Build/Workers/{chunk-5R7SBUTW.js → chunk-LIB2H534.js} +10 -10
- package/Build/Workers/{chunk-IYVDOB5V.js → chunk-LXMCPFFS.js} +4 -4
- package/Build/Workers/{chunk-NUYLNQKV.js → chunk-MKM27KGV.js} +2 -2
- package/Build/Workers/{chunk-R7M4XNPP.js → chunk-N65BAKSH.js} +8 -8
- package/Build/Workers/{chunk-4LGFX2P5.js → chunk-NKT5K3K3.js} +11 -11
- package/Build/Workers/{chunk-NNHU33JK.js → chunk-NPF7SSHZ.js} +7 -7
- package/Build/Workers/{chunk-LDQWNMEC.js → chunk-PVV64VFW.js} +1 -1
- package/Build/Workers/{chunk-WKXDCVBO.js → chunk-Q3C6VQH6.js} +4 -4
- package/Build/Workers/{chunk-ARCFIOKA.js → chunk-RQNJD3O4.js} +12 -12
- package/Build/Workers/{chunk-G3YT7M7A.js → chunk-UIGVOKKI.js} +1 -1
- package/Build/Workers/{chunk-ZIW5FCIW.js → chunk-UQU4RXLT.js} +27 -19
- package/Build/Workers/{chunk-MT5M7RLZ.js → chunk-VLDEUTOP.js} +2 -2
- package/Build/Workers/{chunk-5JP5FG7U.js → chunk-VMVOUQ5J.js} +7 -7
- package/Build/Workers/{chunk-2GL2EUEE.js → chunk-XJRBB253.js} +11 -11
- package/Build/Workers/{chunk-ESD4IEOU.js → chunk-XY6HMDGI.js} +5 -5
- package/Build/Workers/{chunk-56OHFSLH.js → chunk-Y7HNNPNK.js} +10 -10
- package/Build/Workers/{chunk-6FVFM2KB.js → chunk-YAOZMOFL.js} +5 -5
- package/Build/Workers/{chunk-AP6XWET5.js → chunk-YJZGW74L.js} +8 -8
- package/Build/Workers/{chunk-KPYU6YZG.js → chunk-YQFTYQMZ.js} +1 -1
- package/Build/Workers/{chunk-5VKZVPO5.js → chunk-ZBZRTRJB.js} +10 -10
- 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 +22 -22
- 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 +22 -22
- package/Build/Workers/createVerticesFromQuantizedTerrainMesh.js +20 -20
- package/Build/Workers/createWallGeometry.js +25 -25
- package/Build/Workers/createWallOutlineGeometry.js +24 -24
- package/Build/Workers/decodeDraco.js +10 -10
- package/Build/Workers/decodeGoogleEarthEnterprisePacket.js +5 -5
- package/Build/Workers/decodeI3S.js +12 -12
- 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 +6 -6
- package/Build/Workers/transferTypedArrayTest.js +1 -1
- package/Build/Workers/upsampleQuantizedTerrainMesh.js +22 -22
- package/Build/Workers/upsampleVerticesFromCesium3DTilesTerrain.js +25 -25
- package/Source/Core/BoundingSphere.js +1 -1
- package/Source/Core/Cartesian2.js +7 -5
- package/Source/Core/Cartesian3.js +8 -6
- package/Source/Core/Cartesian4.js +8 -6
- package/Source/Core/Color.js +5 -3
- package/Source/Core/DeveloperError.js +2 -1
- package/Source/Core/ITwinPlatform.js +1 -0
- package/Source/Core/Ion.js +1 -1
- package/Source/Core/S2Cell.js +2 -2
- package/Source/Core/TerrainMesh.js +10 -1
- package/Source/Core/TerrainPicker.js +1 -0
- package/Source/Core/WallGeometry.js +1 -1
- package/Source/Core/WallOutlineGeometry.js +1 -1
- package/Source/Core/assert.js +27 -0
- package/Source/Core/globalTypes.js +4 -0
- package/Source/DataSources/CzmlDataSource.js +9 -0
- package/Source/DataSources/PathGraphics.js +13 -0
- package/Source/DataSources/PathVisualizer.js +330 -18
- package/Source/DataSources/StaticGeometryColorBatch.js +7 -2
- package/Source/DataSources/StaticGeometryPerMaterialBatch.js +7 -2
- package/Source/DataSources/StaticGroundGeometryPerMaterialBatch.js +3 -1
- package/Source/DataSources/StaticGroundPolylinePerMaterialBatch.js +3 -1
- package/Source/Renderer/Context.js +1 -1
- package/Source/Renderer/RenderState.js +2 -2
- package/Source/Renderer/VertexArray.js +80 -0
- package/Source/Scene/ArcGisMapService.js +1 -1
- package/Source/Scene/BillboardCollection.js +65 -364
- package/Source/Scene/BufferPoint.js +148 -0
- package/Source/Scene/BufferPointCollection.js +135 -0
- package/Source/Scene/BufferPointMaterial.js +95 -0
- package/Source/Scene/BufferPolygon.js +516 -0
- package/Source/Scene/BufferPolygonCollection.js +368 -0
- package/Source/Scene/BufferPolygonMaterial.js +41 -0
- package/Source/Scene/BufferPolyline.js +185 -0
- package/Source/Scene/BufferPolylineCollection.js +136 -0
- package/Source/Scene/BufferPolylineMaterial.js +93 -0
- package/Source/Scene/BufferPrimitive.js +347 -0
- package/Source/Scene/BufferPrimitiveCollection.js +702 -0
- package/Source/Scene/BufferPrimitiveMaterial.js +140 -0
- package/Source/Scene/Cesium3DTileContent.js +5 -1
- package/Source/Scene/Cesium3DTileContentFactory.js +9 -0
- package/Source/Scene/Cesium3DTileStyle.js +22 -0
- package/Source/Scene/Cesium3DTileset.js +1 -0
- package/Source/Scene/ClippingPolygonCollection.js +270 -101
- package/Source/Scene/CubeMapPanorama.js +4 -4
- package/Source/Scene/GaussianSplat3DTileContent.js +40 -46
- package/Source/Scene/GaussianSplatPrimitive.js +413 -70
- package/Source/Scene/GetFeatureInfoFormat.js +3 -3
- package/Source/Scene/GltfLoader.js +227 -34
- package/Source/Scene/GltfSpzLoader.js +109 -0
- package/Source/Scene/ITwinData.js +1 -0
- package/Source/Scene/Label.js +32 -0
- package/Source/Scene/LabelCollection.js +14 -13
- package/Source/Scene/Material.js +2 -0
- package/Source/Scene/Megatexture.js +1 -0
- package/Source/Scene/MetadataClassProperty.js +24 -10
- package/Source/Scene/MetadataComponentType.js +115 -23
- package/Source/Scene/Model/CustomShaderPipelineStage.js +3 -1
- package/Source/Scene/Model/EdgeVisibilityPipelineStage.js +761 -263
- package/Source/Scene/Model/MaterialPipelineStage.js +147 -0
- package/Source/Scene/Model/MetadataPipelineStage.js +3 -3
- package/Source/Scene/Model/ModelDrawCommand.js +6 -0
- package/Source/Scene/Model/ModelReader.js +1 -1
- package/Source/Scene/Model/ModelUtility.js +3 -1
- package/Source/Scene/Model/createVectorTileBuffersFromModelComponents.js +330 -0
- package/Source/Scene/ModelComponents.js +1632 -1542
- package/Source/Scene/PickedMetadataInfo.js +1 -0
- package/Source/Scene/ScreenSpaceCameraController.js +13 -0
- package/Source/Scene/SkyBox.js +17 -8
- package/Source/Scene/TileBoundingRegion.js +1 -1
- package/Source/Scene/TileBoundingS2Cell.js +1 -1
- package/Source/Scene/TileBoundingSphere.js +1 -1
- package/Source/Scene/TweenCollection.js +7 -0
- package/Source/Scene/VectorGltf3DTileContent.js +382 -0
- package/Source/Scene/VertexAttributeSemantic.js +14 -0
- package/Source/Scene/WebMapServiceImageryProvider.js +2 -2
- package/Source/Scene/WebMapTileServiceImageryProvider.js +366 -131
- package/Source/Scene/parseStructuralMetadata.js +97 -37
- package/Source/Scene/renderBufferPointCollection.js +334 -0
- package/Source/Scene/renderBufferPolygonCollection.js +386 -0
- package/Source/Scene/renderBufferPolylineCollection.js +529 -0
- package/Source/Shaders/BillboardCollectionFS.glsl +2 -77
- package/Source/Shaders/BillboardCollectionFS.js +2 -77
- package/Source/Shaders/BillboardCollectionVS.glsl +2 -60
- package/Source/Shaders/BillboardCollectionVS.js +2 -60
- package/Source/Shaders/BufferPointMaterialFS.glsl +27 -0
- package/Source/Shaders/BufferPointMaterialFS.js +29 -0
- package/Source/Shaders/BufferPointMaterialVS.glsl +48 -0
- package/Source/Shaders/BufferPointMaterialVS.js +50 -0
- package/Source/Shaders/BufferPolygonMaterialFS.glsl +13 -0
- package/Source/Shaders/BufferPolygonMaterialFS.js +15 -0
- package/Source/Shaders/BufferPolygonMaterialVS.glsl +30 -0
- package/Source/Shaders/BufferPolygonMaterialVS.js +32 -0
- package/Source/Shaders/BufferPolylineMaterialFS.glsl +13 -0
- package/Source/Shaders/BufferPolylineMaterialFS.js +15 -0
- package/Source/Shaders/BufferPolylineMaterialVS.glsl +49 -0
- package/Source/Shaders/BufferPolylineMaterialVS.js +51 -0
- package/Source/Shaders/Model/EdgeVisibilityStageFS.glsl +34 -48
- package/Source/Shaders/Model/EdgeVisibilityStageFS.js +34 -49
- package/Source/Shaders/Model/EdgeVisibilityStageVS.glsl +98 -0
- package/Source/Shaders/Model/EdgeVisibilityStageVS.js +100 -0
- package/Source/Shaders/Model/ModelFS.glsl +15 -0
- package/Source/Shaders/Model/ModelFS.js +15 -0
- package/Source/Shaders/Model/ModelVS.glsl +8 -0
- package/Source/Shaders/Model/ModelVS.js +8 -0
- package/Source/Shaders/PolygonSignedDistanceFS.glsl +64 -33
- package/Source/Shaders/PolygonSignedDistanceFS.js +64 -33
- package/Source/Shaders/PrimitiveGaussianSplatVS.glsl +9 -2
- package/Source/Shaders/PrimitiveGaussianSplatVS.js +9 -2
- package/Source/Shaders/Voxels/VoxelFS.glsl +1 -1
- package/Source/Shaders/Voxels/VoxelFS.js +1 -1
- package/Source/Workers/decodeDraco.js +3 -0
- package/Source/Workers/decodeI3S.js +5 -2
- package/index.d.ts +1007 -111
- package/index.js +368 -343
- package/package.json +2 -2
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
// @ts-check
|
|
2
|
+
|
|
3
|
+
import Color from "../Core/Color.js";
|
|
4
|
+
import Frozen from "../Core/Frozen.js";
|
|
5
|
+
|
|
6
|
+
/** @import Packable from "../Core/Packable.js"; */
|
|
7
|
+
/** @import BufferPrimitive from "./BufferPrimitive.js"; */
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* @typedef {object} BufferPrimitiveMaterialOptions
|
|
11
|
+
* @property {Color} [color=Color.WHITE] Color of fill.
|
|
12
|
+
* @property {Color} [outlineColor=Color.WHITE] Color of outline.
|
|
13
|
+
* @property {number} [outlineWidth=0.0] Width of outline, 0-255px.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Material description for a {@link BufferPrimitive}. Abstract.
|
|
18
|
+
*
|
|
19
|
+
* <p>BufferPrimitiveMaterial objects are {@link Packable|packable}, stored
|
|
20
|
+
* when calling {@link BufferPrimitive#setMaterial}. Subsequent changes to the
|
|
21
|
+
* material will not affect the primitive until setMaterial() is called again.</p>
|
|
22
|
+
*
|
|
23
|
+
* @see BufferPointMaterial
|
|
24
|
+
* @see BufferPolylineMaterial
|
|
25
|
+
* @see BufferPolygonMaterial
|
|
26
|
+
* @see Packable
|
|
27
|
+
*
|
|
28
|
+
* @abstract
|
|
29
|
+
* @experimental This feature is not final and is subject to change without Cesium's standard deprecation policy.
|
|
30
|
+
*/
|
|
31
|
+
class BufferPrimitiveMaterial {
|
|
32
|
+
/** @ignore */
|
|
33
|
+
static Layout = {
|
|
34
|
+
COLOR_U32: 0,
|
|
35
|
+
OUTLINE_COLOR_U32: 4,
|
|
36
|
+
OUTLINE_WIDTH_U8: 8,
|
|
37
|
+
__BYTE_LENGTH: 12,
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* @type {BufferPrimitiveMaterial}
|
|
42
|
+
* @ignore
|
|
43
|
+
*/
|
|
44
|
+
static DEFAULT_MATERIAL;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* @param {BufferPrimitiveMaterialOptions} [options]
|
|
48
|
+
*/
|
|
49
|
+
constructor(options = Frozen.EMPTY_OBJECT) {
|
|
50
|
+
/**
|
|
51
|
+
* Color of fill.
|
|
52
|
+
* @type {Color}
|
|
53
|
+
*/
|
|
54
|
+
this.color = Color.clone(options.color ?? Color.WHITE);
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Color of outline.
|
|
58
|
+
* @type {Color}
|
|
59
|
+
*/
|
|
60
|
+
this.outlineColor = Color.clone(options.outlineColor ?? Color.WHITE);
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Width of outline, 0-255px.
|
|
64
|
+
* @type {number}
|
|
65
|
+
*/
|
|
66
|
+
this.outlineWidth = options.outlineWidth ?? 0;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/** @type {number} */
|
|
70
|
+
static get packedLength() {
|
|
71
|
+
return this.Layout.__BYTE_LENGTH;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Stores the provided material into the provided array.
|
|
76
|
+
*
|
|
77
|
+
* @param {BufferPrimitiveMaterial} material
|
|
78
|
+
* @param {DataView} view
|
|
79
|
+
* @param {number} byteOffset
|
|
80
|
+
*/
|
|
81
|
+
static pack(material, view, byteOffset) {
|
|
82
|
+
view.setUint32(
|
|
83
|
+
this.Layout.COLOR_U32 + byteOffset,
|
|
84
|
+
material.color.toRgba(),
|
|
85
|
+
true,
|
|
86
|
+
);
|
|
87
|
+
view.setUint32(
|
|
88
|
+
this.Layout.OUTLINE_COLOR_U32 + byteOffset,
|
|
89
|
+
material.outlineColor.toRgba(),
|
|
90
|
+
true,
|
|
91
|
+
);
|
|
92
|
+
view.setUint8(
|
|
93
|
+
this.Layout.OUTLINE_WIDTH_U8 + byteOffset,
|
|
94
|
+
material.outlineWidth,
|
|
95
|
+
);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Retrieves a material from a packed array.
|
|
100
|
+
*
|
|
101
|
+
* @param {DataView} view The packed array.
|
|
102
|
+
* @param {number} byteOffset Starting index of the element to be unpacked.
|
|
103
|
+
* @param {BufferPrimitiveMaterial} result Material into which results are unpacked.
|
|
104
|
+
* @returns {BufferPrimitiveMaterial} Modified result material, with results unpacked.
|
|
105
|
+
*/
|
|
106
|
+
static unpack(view, byteOffset, result) {
|
|
107
|
+
Color.fromRgba(
|
|
108
|
+
view.getUint32(this.Layout.COLOR_U32 + byteOffset, true),
|
|
109
|
+
result.color,
|
|
110
|
+
);
|
|
111
|
+
Color.fromRgba(
|
|
112
|
+
view.getUint32(this.Layout.OUTLINE_COLOR_U32 + byteOffset, true),
|
|
113
|
+
result.outlineColor,
|
|
114
|
+
);
|
|
115
|
+
result.outlineWidth = view.getUint8(
|
|
116
|
+
this.Layout.OUTLINE_WIDTH_U8 + byteOffset,
|
|
117
|
+
);
|
|
118
|
+
return result;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/////////////////////////////////////////////////////////////////////////////
|
|
122
|
+
// DEBUG
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Returns a JSON-serializable object representing the material. This encoding
|
|
126
|
+
* is not memory-efficient, and should generally be used for debugging and
|
|
127
|
+
* testing.
|
|
128
|
+
*
|
|
129
|
+
* @returns {Object} JSON-serializable object.
|
|
130
|
+
*/
|
|
131
|
+
toJSON() {
|
|
132
|
+
return {
|
|
133
|
+
color: this.color.toCssHexString(),
|
|
134
|
+
outlineColor: this.outlineColor.toCssHexString(),
|
|
135
|
+
outlineWidth: this.outlineWidth,
|
|
136
|
+
};
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
export default BufferPrimitiveMaterial;
|
|
@@ -255,7 +255,7 @@ Object.defineProperties(Cesium3DTileContent.prototype, {
|
|
|
255
255
|
* not part of the public Cesium API.
|
|
256
256
|
* </p>
|
|
257
257
|
*
|
|
258
|
-
* @type {
|
|
258
|
+
* @type {Cesium3DContentGroup|undefined}
|
|
259
259
|
*
|
|
260
260
|
* @private
|
|
261
261
|
* @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.
|
|
@@ -325,6 +325,7 @@ Cesium3DTileContent.prototype.applyDebugSettings = function (enabled, color) {
|
|
|
325
325
|
* </p>
|
|
326
326
|
*
|
|
327
327
|
* @param {Cesium3DTileStyle} style The style.
|
|
328
|
+
* @returns {void}
|
|
328
329
|
*
|
|
329
330
|
* @private
|
|
330
331
|
*/
|
|
@@ -343,6 +344,7 @@ Cesium3DTileContent.prototype.applyStyle = function (style) {
|
|
|
343
344
|
*
|
|
344
345
|
* @param {Cesium3DTileset} tileset The tileset containing this tile.
|
|
345
346
|
* @param {FrameState} frameState The frame state.
|
|
347
|
+
* @returns {void}
|
|
346
348
|
*
|
|
347
349
|
* @private
|
|
348
350
|
*/
|
|
@@ -403,6 +405,8 @@ Cesium3DTileContent.prototype.isDestroyed = function () {
|
|
|
403
405
|
*
|
|
404
406
|
* @see Cesium3DTileContent#isDestroyed
|
|
405
407
|
*
|
|
408
|
+
* @returns {void}
|
|
409
|
+
*
|
|
406
410
|
* @private
|
|
407
411
|
*/
|
|
408
412
|
Cesium3DTileContent.prototype.destroy = function () {
|
|
@@ -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 VectorGltf3DTileContent from "./VectorGltf3DTileContent.js";
|
|
7
8
|
import GaussianSplat3DTileContent from "./GaussianSplat3DTileContent.js";
|
|
8
9
|
import RuntimeError from "../Core/RuntimeError.js";
|
|
9
10
|
|
|
@@ -100,6 +101,10 @@ const Cesium3DTileContentFactory = {
|
|
|
100
101
|
return GaussianSplat3DTileContent.fromGltf(tileset, tile, resource, glb);
|
|
101
102
|
}
|
|
102
103
|
|
|
104
|
+
if (tileset.isGltfExtensionUsed("CESIUM_mesh_vector")) {
|
|
105
|
+
return VectorGltf3DTileContent.fromGltf(tileset, tile, resource, glb);
|
|
106
|
+
}
|
|
107
|
+
|
|
103
108
|
return Model3DTileContent.fromGltf(tileset, tile, resource, glb);
|
|
104
109
|
},
|
|
105
110
|
gltf: function (tileset, tile, resource, json) {
|
|
@@ -109,6 +114,10 @@ const Cesium3DTileContentFactory = {
|
|
|
109
114
|
return GaussianSplat3DTileContent.fromGltf(tileset, tile, resource, json);
|
|
110
115
|
}
|
|
111
116
|
|
|
117
|
+
if (tileset.isGltfExtensionUsed("CESIUM_mesh_vector")) {
|
|
118
|
+
return VectorGltf3DTileContent.fromGltf(tileset, tile, resource, json);
|
|
119
|
+
}
|
|
120
|
+
|
|
112
121
|
return Model3DTileContent.fromGltf(tileset, tile, resource, json);
|
|
113
122
|
},
|
|
114
123
|
geoJson: function (tileset, tile, resource, json) {
|
|
@@ -74,6 +74,9 @@ function Cesium3DTileStyle(style) {
|
|
|
74
74
|
this._labelVerticalOrigin = undefined;
|
|
75
75
|
this._meta = undefined;
|
|
76
76
|
|
|
77
|
+
// Vector Tiles in 3D Tiles 2.0.
|
|
78
|
+
this._lineWidth = undefined;
|
|
79
|
+
|
|
77
80
|
this._colorShaderFunction = undefined;
|
|
78
81
|
this._showShaderFunction = undefined;
|
|
79
82
|
this._pointSizeShaderFunction = undefined;
|
|
@@ -117,6 +120,9 @@ function setup(that, styleJson) {
|
|
|
117
120
|
that.labelHorizontalOrigin = styleJson.labelHorizontalOrigin;
|
|
118
121
|
that.labelVerticalOrigin = styleJson.labelVerticalOrigin;
|
|
119
122
|
|
|
123
|
+
// Vector Tiles in 3D Tiles 2.0.
|
|
124
|
+
that.lineWidth = styleJson.lineWidth;
|
|
125
|
+
|
|
120
126
|
const meta = {};
|
|
121
127
|
if (defined(styleJson.meta)) {
|
|
122
128
|
const defines = styleJson.defines;
|
|
@@ -1284,6 +1290,22 @@ Object.defineProperties(Cesium3DTileStyle.prototype, {
|
|
|
1284
1290
|
},
|
|
1285
1291
|
},
|
|
1286
1292
|
|
|
1293
|
+
/**
|
|
1294
|
+
* Internal-only, supported in Vector Tiles with 3D Tiles 2.0.
|
|
1295
|
+
* @memberof Cesium3DTileStyle.prototype
|
|
1296
|
+
* @type {StyleExpression}
|
|
1297
|
+
* @ignore
|
|
1298
|
+
*/
|
|
1299
|
+
lineWidth: {
|
|
1300
|
+
get: function () {
|
|
1301
|
+
return this._lineWidth;
|
|
1302
|
+
},
|
|
1303
|
+
set: function (value) {
|
|
1304
|
+
this._lineWidth = getExpression(this, value);
|
|
1305
|
+
this._style.lineWidth = getJsonFromExpression(this._lineWidth);
|
|
1306
|
+
},
|
|
1307
|
+
},
|
|
1308
|
+
|
|
1287
1309
|
/**
|
|
1288
1310
|
* Gets or sets the object containing application-specific expression that can be explicitly
|
|
1289
1311
|
* evaluated, e.g., for display in a UI.
|
|
@@ -3674,6 +3674,7 @@ Cesium3DTileset.supportedExtensions = {
|
|
|
3674
3674
|
"3DTILES_bounding_volume_S2": true,
|
|
3675
3675
|
"3DTILES_batch_table_hierarchy": true,
|
|
3676
3676
|
"3DTILES_draco_point_compression": true,
|
|
3677
|
+
CESIUM_mesh_vector: true,
|
|
3677
3678
|
MAXAR_content_geojson: true,
|
|
3678
3679
|
};
|
|
3679
3680
|
|