|
楼主 |
发表于 2022-6-21 13:37:51
|
显示全部楼层
本帖最后由 tzbm123456 于 2022-6-23 09:55 编辑
5、在Cesium平台中加载各类gltf文件:
//已测试通过
var point = Cesium.Cartesian3.fromDegrees(106.48923,29.56673,0);
var heading = Cesium.Math.toRadians(90);
var pitch = 0;
var roll = 0;
var hpr = new Cesium.HeadingPitchRoll(heading,pitch,roll);
var orientation = Cesium.Transforms.headingPitchRollQuaternion(
point,
hpr
);
entityGltf = viewer.entities.add({
name: 'gltf_Model',
position: point,
orientation: orientation,
model: {
show: true,
uri: './DataSource/TZBM/oj/Dxt_1/dxt_1.gltf',
sclae: 1,
minimumPixelSize: 128,
maximumScale: 1,
incrementallyLoadTextures: true,
runAnimations: true,
clampAnimations: true,
//distanceDisplayCondition : new Cesium.DistanceDisplayCondition ( 1 , 1000 ),
//shadows: Cesium.ShadowMode.ENABLED,
heightReference: Cesium.HeightReference.NONE,
imageBasedLightingFactor : new Cesium.Cartesian2(10.0, 10.0),
//luminanceAtZenith : 0.5,
showOutline : true,
silhouetteColor : Cesium.Color.RED,
},
});
viewer.flyTo(entityGltf);
|
|