0
点赞
收藏
分享

微信扫一扫

Cesium 与 Babylon.js 可视化 添加地形


我决定不从Babylonjs 基础来讲了 直接整合cesium与babylonjs可视化来讲

我整合一个类库 后续不断更新中

npm i @haibalai/cesium-babylonjs

初始化cesium-babylonjs 类库, viewer 是 Cesium 的 viewer对象

import { BabylonMapManager } from “@haibalai/cesium-babylonjs”;
BabylonMapManager.init(viewer);

添加正方体

import { BabylonMapManager } from “@haibalai/cesium-babylonjs”;
const largeGroundMat = new BABYLON.StandardMaterial(“largeGroundMat”);
largeGroundMat.diffuseTexture = new BABYLON.Texture(“https://assets.babylonjs.com/environments/valleygrass.png”);
largeGroundMat.backFaceCulling = false;
const largeGround = BABYLON.MeshBuilder.CreateGroundFromHeightMap(“largeGround”,
Cesium 与 Babylon.js 可视化 添加地形 - 小专栏


举报

相关推荐

0 条评论