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

对于调用方式 这里使用vue来调用

  • <template>
  • <div >
  • <canvas id="renderCanvas" touch-action="none"></canvas>
  • </div>
  • </template>
  •  
  • <script type="text/ecmascript-6">
  • const BABYLON = require('babylonjs');
  • import {CameraControl} from './CameraControl';
  • import {EarthControl} from './EarthControl';
  •  
  • export default {
  • components: {},
  • data() {
  • return {}
  • },
  • props: {},
  • methods: {},
  • computed: {},
  • mounted() {
  •  
  • var canvas = document.getElementById("renderCanvas"); // Get the canvas element
  • var engine = new BABYLON.Engine(canvas, true); // Generate the BABYLON 3D engine
  •  
  • /******* Add the create scene function ******/
  • var createScene = function () {

更多参考Babylon.js 构建 地球,支持切片地图 (七) - 小专栏 (xiaozhuanlan.com)

posted @ 2022-01-21 09:33  haibalai  阅读(171)  评论(0编辑  收藏  举报