Babylon.js 构建 地球,支持切片地图 (七)
2022-11-22 本文已影响0人
haibalai
对于调用方式 这里使用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 () {