0

I'm trying to load and display my 3D tiles file with CesiumJS on my Window Station and Chrome web browser. Cesium server seems to running fine locally. When I type the 'npm start` command via one Windows prompt command, it appears:

 > *C:\LAURENT\GESTION_PROJET\AMOAIGN-2020-MNS_TEXTURES\Cesium-1.72>npm start*
 > >node server.cjs
 > *Cesium development server running locally.  Connect to http://localhost:8080/*

Indeed, browse to http://localhost:8080/ is displaying well. But I have a problem in order to read with Cesium my 3Dtiles tileset. In another Windows prompt command, I type this following command:

*C:\Users\lcelati>python -m http.server*
*Serving HTTP on :: port 8000 (http://[::]:8000/)* 

I paste below my Sandcastle JavaScript:

var viewer = new Cesium.Viewer("cesiumContainer", {
});


var tileset = new Cesium.Cesium3DTileset({
  url: 'http://localhost/3D-Tiles/tileset.json'
});


viewer.scene.primitives.add(tileset);


tileset.readyPromise.then(function (tileset) {
  viewer.scene.camera.setView({

    destination: tileset.root.boundingVolume.rectangle,
  });
});

When I run the code, nothing appears with no error message within the console. According to me, the problem would be come from my tileset path. Could you tell me where I should store my 3Dtiles dataset? Within my Python path? Cesium path? Should I add some lines within my JavaScript Sandcastle file regarding the Python server?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.