Skip to content

Commit

Permalink
Merge pull request #11692 from CesiumGS/update-sandcastle-3dtiles-next
Browse files Browse the repository at this point in the history
Update sandcastle examples to 3DTiles 1.1
  • Loading branch information
ggetz committed Dec 13, 2023
2 parents b5580fc + d88321b commit 8bff099
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
/>
<meta
name="description"
content="Load a 3D Tile Next tileset converted from CDB."
content="Load a 3D Tiles 1.1 tileset converted from CDB."
/>
<meta name="cesium-sandcastle-labels" content="3D Tiles Next" />
<meta name="cesium-sandcastle-labels" content="3D Tiles" />
<title>Cesium Demo</title>
<script type="text/javascript" src="../Sandcastle-header.js"></script>
<script
Expand Down Expand Up @@ -383,13 +383,13 @@
}

try {
// 3D Tiles Next converted from CDB of Aden, Yemen (CDB provided by Presagis)
// 3D Tiles 1.1 converted from CDB of Aden, Yemen (CDB provided by Presagis)
const terrainTileset = await Cesium.Cesium3DTileset.fromIonAssetId(
667809
2389063
);
viewer.scene.primitives.add(terrainTileset);
const buildingsTileset = await Cesium.Cesium3DTileset.fromIonAssetId(
666747,
2389064,
{
maximumScreenSpaceError: 12,
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
name="description"
content="Load a photogrammetry dataset with feature ID textures from EXT_mesh_features."
/>
<meta name="cesium-sandcastle-labels" content="3D Tiles Next" />
<meta name="cesium-sandcastle-labels" content="3D Tiles" />
<title>Cesium Demo</title>
<script type="text/javascript" src="../Sandcastle-header.js"></script>
<script
Expand Down Expand Up @@ -65,7 +65,7 @@

let tileset;
try {
tileset = await Cesium.Cesium3DTileset.fromIonAssetId(775877);
tileset = await Cesium.Cesium3DTileset.fromIonAssetId(2333904);

const translation = new Cesium.Cartesian3(
-1.398521324920626,
Expand Down Expand Up @@ -120,10 +120,10 @@
const int PILLARS = 9;
const int STREET_LIGHT = 10;
const int TRAFFIC_LIGHT = 11;
void fragmentMain(FragmentInput fsInput, inout czm_modelMaterial material) {
int featureId = fsInput.featureIds.featureId_0;
if (featureId == CLOCK) {
// Shiny brass
material.specular = vec3(0.98, 0.90, 0.59);
Expand Down Expand Up @@ -169,7 +169,7 @@
const int NOTHING_SELECTED = 12;
void fragmentMain(FragmentInput fsInput, inout czm_modelMaterial material) {
int featureId = fsInput.featureIds.featureId_0;
if (u_selectedFeature < NOTHING_SELECTED && featureId == u_selectedFeature) {
material.specular = vec3(1.00, 0.85, 0.57);
material.roughness = 0.1;
Expand All @@ -193,16 +193,16 @@
const vec3 PURPLE = vec3(0.5, 0.0, 1.0);
const vec3 YELLOW = vec3(1.0, 1.0, 0.0);
const vec3 NO_TINT = vec3(1.0);
void fragmentMain(FragmentInput fsInput, inout czm_modelMaterial material) {
int featureId0 = fsInput.featureIds.featureId_0; // fine features
int featureId1 = fsInput.featureIds.featureId_1; // coarse features
// use both feature ID sets to determine where the features are
float isWindow = float(featureId0 == IDS0_WINDOW);
float isFacade = float(featureId1 == IDS1_FACADE);
float isRoof = float(featureId1 == IDS1_ROOF);
// Tint the roof windows yellow and facade windows purple
vec3 tint = NO_TINT;
tint = mix(tint, YELLOW, isWindow * isRoof);
Expand Down
2 changes: 1 addition & 1 deletion Apps/Sandcastle/gallery/3D Tiles 1.1 Photogrammetry.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
name="description"
content="Performance comparison of photogrammetry using 3D Tiles 1.0 vs 3D Tiles 1.1 with KTX2 texture compression. Most notably, KTX2 textures provide significant GPU memory savings"
/>
<meta name="cesium-sandcastle-labels" content="3D Tiles Next" />
<meta name="cesium-sandcastle-labels" content="3D Tiles" />
<title>3D Tiles 1.1 Photogrammetry</title>
<script type="text/javascript" src="../Sandcastle-header.js"></script>
<script
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
/>
<meta
name="description"
content="Load a global scale 3D Tiles Next tileset that uses 3DTILES_bounding_volume_S2."
content="Load a global scale 3D Tiles 1.1 tileset that uses 3DTILES_bounding_volume_S2."
/>
<meta name="cesium-sandcastle-labels" content="3D Tiles Next" />
<meta name="cesium-sandcastle-labels" content="3D Tiles" />
<title>Cesium Demo</title>
<script type="text/javascript" src="../Sandcastle-header.js"></script>
<script
Expand Down Expand Up @@ -77,7 +77,7 @@
let tileset;
try {
// MAXAR OWT WFF 1.2 Base Globe
tileset = await Cesium.Cesium3DTileset.fromIonAssetId(691510, {
tileset = await Cesium.Cesium3DTileset.fromIonAssetId(1208297, {
maximumScreenSpaceError: 4,
});
scene.primitives.add(tileset);
Expand Down
2 changes: 1 addition & 1 deletion Apps/Sandcastle/gallery/Custom Shaders 3D Tiles.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no"
/>
<meta name="description" content="Create 3D models using glTF." />
<meta name="cesium-sandcastle-labels" content="3D Tiles Next" />
<meta name="cesium-sandcastle-labels" content="3D Tiles" />
<title>Cesium Demo</title>
<script type="text/javascript" src="../Sandcastle-header.js"></script>
<script
Expand Down
4 changes: 2 additions & 2 deletions Apps/Sandcastle/gallery/Custom Shaders Models.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no"
/>
<meta name="description" content="Create 3D models using glTF." />
<meta name="cesium-sandcastle-labels" content="3D Tiles Next" />
<meta name="cesium-sandcastle-labels" content="3D Tiles" />
<title>Cesium Demo</title>
<script type="text/javascript" src="../Sandcastle-header.js"></script>
<script
Expand Down Expand Up @@ -152,7 +152,7 @@
value: checkerboardTexture,
},
},
fragmentShaderText: `
fragmentShaderText: `
void fragmentMain(FragmentInput fsInput, inout czm_modelMaterial material)
{
vec2 texCoord = fsInput.attributes.texCoord_0;
Expand Down
4 changes: 2 additions & 2 deletions Apps/Sandcastle/gallery/Custom Shaders Property Textures.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no"
/>
<meta name="description" content="Create 3D models using glTF." />
<meta name="cesium-sandcastle-labels" content="3D Tiles Next" />
<meta name="cesium-sandcastle-labels" content="3D Tiles" />
<title>Cesium Demo</title>
<script type="text/javascript" src="../Sandcastle-header.js"></script>
<script
Expand Down Expand Up @@ -52,7 +52,7 @@
try {
// MAXAR OWT Muscatatuk photogrammetry dataset with property textures
// containing horizontal and vertical uncertainty
tileset = await Cesium.Cesium3DTileset.fromIonAssetId(905848);
tileset = await Cesium.Cesium3DTileset.fromIonAssetId(2342602);
viewer.scene.primitives.add(tileset);
viewer.zoomTo(tileset);
} catch (error) {
Expand Down

0 comments on commit 8bff099

Please sign in to comment.