1. A concise explanation of the problem you're experiencing.
I've downloaded the latest version of cesium and am trying to get the 3D model tutorial to work in sandcastle but no matter which model I try to load in, nothing works. The .dae file from the milktruck loads fine into visual studio so that doesn't seem to be the issue. The code is copy pasted from the tutorial and I've just tried modifying the url to try the different examples.
Thanks in advance for any ideas on why this is happening
2. A minimal code example. If you've found a bug, this helps us reproduce and repair it.
The code from the tutorial
3. Context. Why do you need to do this? We might know a better way to accomplish your goal.
I'm just trying to load in the 3D example models
4. The Cesium version you're using, your operating system and browser.
Latest version of cesium
Latest version of chrome
Windowss 10
I have managed to load in 3D models by scavenging the sandcastle gallery example but the tutorial still doesn't seem to work. I can make do with this but it could be interesting to look into if other people have issues
The location of the GroundVehicle 3D model has changed. I got the first part of the tutorial to work by using this code instead (notice the new url):
var viewer = new Cesium.Viewer(‘cesiumContainer’);
var scene = viewer.scene;
var modelMatrix = Cesium.Transforms.eastNorthUpToFixedFrame(
Cesium.Cartesian3.fromDegrees(-75.62898254394531, 40.02804946899414, 0.0));
var model = scene.primitives.add(Cesium.Model.fromGltf({
url : ‘…/…/…/…/Apps/SampleData/models/GroundVehicle/GroundVehicle.glb’,
modelMatrix : modelMatrix,
scale : 200.0
}));
``
See it live on this sandcastle. You should now be able to continue following the tutorial normally. Go ahead and zoom to Exton, PA to see the truck.
I see what you mean about parts of the tutorial not working. Since the cesium viewer starts with the clock paused by default, the animation won’t run into you hit the play button in the lower left corner.
You can also initialize the viewer like this to start the clock going from the get go:
var viewer = new Cesium.Viewer(‘cesiumContainer’, {
shouldAnimate : true
});