cesium加载飞机模型,entity方式和primitive方式加载,缩放至模型处




    
    
    
    
    
    
    Hello World!
    
    


//primitive方式加载 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/CesiumAir/Cesium_Air.gltf', modelMatrix : modelMatrix, scale : 200.0, })); // Cesium.when(model.readyPromise).then(function(model) { // model.activeAnimations.addAll({ // loop : Cesium.ModelAnimationLoop.REPEAT // }); // }); //通过viewer设置镜头,飞行至实体位置 viewer.camera.setView({ destination : Cesium.Cartesian3.fromDegrees(-75.62898254394531, 40.02804946899414, 0.0) }); //viewer.zoomTo([-75.62898254394531, 40.02804946899414,0]);

你可能感兴趣的:(cesium)