美文网首页
Babylon.js 构建 地球,支持切片地图 (二)

Babylon.js 构建 地球,支持切片地图 (二)

作者: haibalai | 来源:发表于2022-09-29 10:30 被阅读0次

首先babylonjs 相机我们要改造

对于相机改造类图如下

针对EarthCamera类

const BABYLON = require('babylonjs');

export class EarthCamera extends BABYLON.ArcRotateCamera {

constructor(e, t, i, n, r, o, s) {

super(e, t, i, n, r, o),

this.isDirty = true,

this.diffAlpha = 0,

this.diffBeta = 0,

this.diffRadius = 0,

this.latLonAtmouse = new BABYLON.Vector2

}

}

针对CameraControl

```javascript

 更多参考 https://xiaozhuanlan.com/topic/2173489065

相关文章

网友评论

      本文标题:Babylon.js 构建 地球,支持切片地图 (二)

      本文链接:https://www.haomeiwen.com/subject/uvmlartx.html