搜索引擎中注册网站,杭州网站建设文章,建设部资质上报系统网站,找附近工作招聘信息Cesium支持什么格式#xff1f; Cesium支持的格式包括#xff1a;3D模型格式#xff08;如COLLADA、gITF、OBJ#xff09;、影像格式#xff08;如JPEG、PNG、GeoTIFF#xff09;、地形格式#xff08;如STL、Heightmap#xff09;、矢量数据格式#xff08;如GeoJSON…Cesium支持什么格式 Cesium支持的格式包括3D模型格式如COLLADA、gITF、OBJ、影像格式如JPEG、PNG、GeoTIFF、地形格式如STL、Heightmap、矢量数据格式如GeoJSON、KMZ、时间动态数据格式如CZML以及其他各种数据格式。此外Cesium还通过插件支持其他特定格式。
Cesium加载Gltf模型 const position Cesium.Cartesian3.fromDegrees(91.18062333588327,29.64956,3640.0);viewer.scene.globe.depthTestAgainstTerrain true;const heading Cesium.Math.toRadians(90); //135度转弧度const pitch Cesium.Math.toRadians(0);const roll 0;const hpr new Cesium.HeadingPitchRoll(heading, pitch, roll);const orientation Cesium.Transforms.headingPitchRollQuaternion(position,hpr);const entity viewer.entities.add({position: position,orientation: orientation,model: {uri: ./assets/cesium_gltf/GLTF/M_BWG.gltf, //注意entitits.add方式加载gltf文件时这里是uri不是url并且这种方式只能加载.glb格式的文件scale: 1.0, //缩放比例minimumPixelSize: 128, //最小像素大小可以避免太小看不见maximumScale: 20000, //模型的最大比例尺大小。minimumPixelSize的上限incrementallyLoadTextures: true, //加载模型后纹理是否可以继续流入runAnimations: true, //是否启动模型中制定的gltf动画clampAnimations: true, //制定gltf动画是否在没有关键帧的持续时间内保持最后一个姿势// shadows: Cesium.ShadowMode.ENABLED,heightReference: Cesium.HeightReference.NONE,},});viewer.trackedEntity entity; // 聚焦模型viewer.flyTo(entity);
效果图