对于调用方式 这里使用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 () {
网友评论