Merge branch 'main' into 3d-tiles-terrain

This commit is contained in:
Sean Lilley 2023-01-03 19:11:39 -05:00
commit 1a03cf2bec
4 changed files with 25 additions and 11 deletions

View File

@ -1,12 +1,6 @@
# List of Slack usernames (not GitHub) for the Cesium Concierge Slackbot to send release reminders for.
releaseSchedule:
- ggetz, 2/1/2022
- eli, 3/1/2022
- sam.suhag, 4/1/2022
- ggetz, 5/2/2022
- sam.suhag, 6/1/2022
- ggetz, 7/1/2022
- sam.suhag, 8/1/2022
- ggetz, 9/1/2022
- sam.suhag, 10/3/2022
- ggetz, 11/1/2022
- ggetz, 1/2/2023
- jjhembd, 2/1/2023
- ggetz, 3/1/2023
- jjhembd, 4/3/2023

View File

@ -8,7 +8,7 @@
content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no"
/>
<meta name="description" content="For debugging voxels." />
<meta name="cesium-sandcastle-labels" content="Showcases" />
<meta name="cesium-sandcastle-labels" content="Development" />
<title>Cesium Demo</title>
<script type="text/javascript" src="../Sandcastle-header.js"></script>
<script

View File

@ -14,6 +14,7 @@ import ImplicitSubtree from "./ImplicitSubtree.js";
import ImplicitSubtreeCache from "./ImplicitSubtreeCache.js";
import ImplicitTileCoordinates from "./ImplicitTileCoordinates.js";
import ImplicitTileset from "./ImplicitTileset.js";
import MetadataSemantic from "./MetadataSemantic.js";
import MetadataType from "./MetadataType.js";
import preprocess3DTileContent from "./preprocess3DTileContent.js";
import ResourceCache from "./ResourceCache.js";
@ -144,6 +145,7 @@ function Cesium3DTilesVoxelProvider(options) {
that.dimensions = Cartesian3.unpack(voxel.dimensions);
that.shapeTransform = shapeTransform;
that.globalTransform = globalTransform;
that.maximumTileCount = getTileCount(metadata);
let paddingBefore;
let paddingAfter;
@ -175,6 +177,16 @@ Object.defineProperties(Cesium3DTilesVoxelProvider.prototype, {
},
});
function getTileCount(metadata) {
if (!defined(metadata.tileset)) {
return undefined;
}
return metadata.tileset.getPropertyBySemantic(
MetadataSemantic.TILESET_TILE_COUNT
);
}
function validate(tileset) {
const root = tileset.root;

View File

@ -32,6 +32,14 @@ const MetadataSemantic = {
* @private
*/
DESCRIPTION: "DESCRIPTION",
/**
* The number of tiles in a tileset, stored as a <code>UINT64</code>.
*
* @type {String}
* @constant
* @private
*/
TILESET_TILE_COUNT: "TILESET_TILE_COUNT",
/**
* A bounding box for a tile, stored as an array of 12 <code>FLOAT32</code> or <code>FLOAT64</code> components. The components are the same format as for <code>boundingVolume.box</code> in 3D Tiles 1.0. This semantic is used to provide a tighter bounding volume than the one implicitly calculated in implicit tiling.
*