cesium加载glb格式的3d模型

时间:2025-05-12 10:34:10
<template> <div style="height: 100vh"> <div /> </div> </template> <script> export default { name: "test", data() { return {}; }, mounted() { const viewer = new ("cesiumContainer", { infoBox: false, selectionIndicator: false, //关闭选择指示器 shadows: true, shouldAnimate: true, //模型显示动画 }); (); const position = Cesium.( -123.0744619, 44.0503706, 5000.0 ); const heading = (135); const pitch = 0; const roll = 0; const hpr = new (heading, pitch, roll); const orientation = ( position, hpr ); const entity = ({ name: "Cesium_Air", position: position, orientation: orientation, model: { uri: "Cesium_Air.glb", minimumPixelSize: 128, maximumScale: 20000, }, }); = entity; }, }; </script>