• vue中cesium添加实例模型


    let fanModel = {
         uri: 'model3D/fan.glb', // glb实例模型
         height: 85,
         scaling: 160.05,
         heading: 90,
         pitch: 90,
         roll: 0
      }
    let position = Cesium.Cartesian3.fromDegrees(longitude, latitude, fanModel.height)
    let fanEntity = new Cesium.Entity({
          id: 'fan' + fan.fanId,
          show: true,
          position: position,
          orientation: Cesium.Transforms.headingPitchRollQuaternion(
              position,
              new Cesium.HeadingPitchRoll(
                Cesium.Math.toRadians(fanModel.heading), // heading 船首向
                Cesium.Math.toRadians(fanModel.pitch), // pitch   左右翻转
                Cesium.Math.toRadians(fanModel.roll) // roll     前后翻转
              )
           ),
           model: {
              uri: fanModel.uri,
              scale: fanModel.scaling,
              runAnimations: true,
              color: Cesium.Color.RED
           },
           label: {
              pixelOffset: new Cesium.Cartesian2(0, -20),
              showBackground: true,
              backgroundColor: new Cesium.Color(0.165, 0.165, 0.165, 0.2),
              scale: 0.6,
              font: '24px SourceHanSansSC-Medium',
              fillColor: fengjiColor,
              text: labelText
            }
        })
     
      this.viewer.entities.add(fanEntity)
  • 相关阅读:
    前端下载(导出)功能实现
    cookie和session
    MySQL常用数据类型
    Spring AOP小结
    Spring IoC小结
    BST、B树、B+树、B*树
    java中的匿名内部类小结
    java中的内部类小结
    Collections类常用方法总结
    Java垃圾回收小结
  • 原文地址:https://www.cnblogs.com/hlweng-0207/p/11912212.html
Copyright © 2020-2023  润新知