Hello,
I’m trying to replicate this example in my app https://sandcastle.cesium.com/?src=Imagery%20Layers%20Split.html
The code of my sandcastle is:
// Grant CesiumJS access to your ion assets
Cesium.Ion.defaultAccessToken = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJkZDg0MDZjYy00MzJlLTQzM2UtOTg3OS1kNjA0ODZmMDA3YmEiLCJpZCI6MzQzOTUsImlhdCI6MTYwMDI0Nzc0NX0.U1eekATx6rZllZj6XO8gHtEQyWnMwayyazZek2tWdvs";
const viewer = new Cesium.Viewer("cesiumContainer", {
terrainProvider: new Cesium.CesiumTerrainProvider({
url: Cesium.IonResource.fromAssetId(1),
}),
});
viewer.scene.globe.depthTestAgainstTerrain = true;
const tileset = viewer.scene.primitives.add(
new Cesium.Cesium3DTileset({
url: Cesium.IonResource.fromAssetId(152576),
})
);
tileset.splitDirection = Cesium.SplitDirection.RIGHT;
(async () => {
try {
await tileset.readyPromise;
await viewer.zoomTo(tileset);
// Apply the default style if it exists
var extras = tileset.asset.extras;
if (
Cesium.defined(extras) &&
Cesium.defined(extras.ion) &&
Cesium.defined(extras.ion.defaultStyle)
) {
tileset.style = new Cesium.Cesium3DTileStyle(extras.ion.defaultStyle);
}
} catch (error) {
console.log(error);
}
})();
But I get this error:
Uncaught TypeError: Cesium.SplitDirection.RIGHT
Can someone help me?
Thank you