跳至主要內容

Earth

2024年2月7日小于 1 分钟

Earth

地球体,使用Sphere构建,添加了坐标转换方法,和三维GIS中的地球体不同,仅用于在地球体显示时使用。继承自Thing对象,拥有ThingTHREE.Object3D一切属性和方法。

构造器

new VT.Earth({
    geometry: {
        radius: 0.5,
        widthSegments: 60,
        heightSegments: 60,
    },
    material: {
        side: 2,
        map: {
            image: "sdk:resources/texture/earth/AlbedoChina.jpg",
        }
    }
})

属性成员

type

  • 类型: {String} Earth,是,不可修改

isEarth

  • 类型: {Boolean} 是否Earth,是,不可修改

face

  • 类型: {VT.Sphere} 地球几何对象

方法

transformPosition

将经纬度坐标转换为三维场景世界坐标

  • 类型: Function
  • 参数:
    • {Number} lng 经度
    • {Number} lat 纬度
  • 返回值:{THREE.Vector3} 世界坐标
上次编辑于: 2024/2/6 17:10:07
贡献者: dashun