我想请问下,加载gltf数据报这个错,这个是什么问题? message: "Failed to load model: ./CesiumMilkTruck.gltf↵Unexpected token < in JSON at position 0" name: "RuntimeError" stack: "Error↵ at new RuntimeError (http://localhost:8080/js/about.js:72566:19)↵ at http://localhost:80
代码: var viewer = new Cesium.Viewer('cesiumContainer', {
geocoder: false,
homeButton: false,
sceneModePicker: false,
baseLayerPicker: false,
fullscreenButton: false,
scene3DOnly: true, //如果设置为true,则所有几何图形以3D模式绘制以节约GPU资源
navigationInstructionsInitiallyVisible: false,
navigationHelpButton: false,
animation: false,
timeline: false,
fulllscreenButtond: false,
vrButton: false,
infoBox: false
});
//加载gltf格式数据到cesium
var scene = viewer.scene;
var position = Cesium.Cartesian3.fromDegrees(123.2856, 41.76692, 0);
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({
position: position,
orientation: orientation,
model: {
uri: "./CesiumMilkTruck.gltf",
minimumPixelSize: 128,
maximumScale: 20000
}
});
viewer.trackedEntity = entity;