1. A concise explanation of the problem you’re experiencing.
I can load gltf from local storage, it show in cesium correctly, but if i put the model into server, access by net address, it coould not find the model successfully
2. A minimal code example. If you’ve found a bug, this helps us reproduce and repair it.
createModel(‘https://chinaxf.njzycn.com/resource/download?fileId=model/cgki7rjk986ukei2rnr72epggo9wtiri/’,3500)
function createModel(url, height) {
viewer.entities.removeAll();
var position = Cesium.Cartesian3.fromDegrees(-123.0744619, 44.0503706, height);
var heading = Cesium.Math.toRadians(135);
var pitch = 0;
var roll = 0;
var hpr = new Cesium.HeadingPitchRoll(heading, pitch, roll);
var orientation = Cesium.Transforms.headingPitchRollQuaternion(position, hpr);
var entity = viewer.entities.add({
name : url+‘UnityToGLTF.gltf’,
position : position,
orientation : orientation,
model : {
uri : url+‘UnityToGLTF.gltf’,
minimumPixelSize : 300,
maximumScale : 20000
}
});
viewer.trackedEntity = entity;
}
3. Context. Why do you need to do this? We might know a better way to accomplish your goal.
i trying to load model dynam dynamically with daemon
4. The Cesium version you’re using, your operating system and browser.
Windows 10 + Chrome and Cesium 1.71