JSFiddle - React, Tailwind, and code Playground
HTML
<script src="https://cdn.babylonjs.com/babylon.js"></script>
<canvas id="render-canvas">
</canvas>
CSS
canvas {
width: 100%;
height: 100%
}
JavaScript
(function () {
// your page initialization code here
// the DOM will be available here
const canvas = document.getElementById("render-canvas");
const engine = new BABYLON.Engine(canvas);
const scene = new BABYLON.Scene(engine);
const vrHelper = scene.createDefaultVRExperience();
function renderLoop() {
scene.render();
}
engine.runRenderLoop(renderLoop);
var ground = BABYLON.Mesh.CreateGround("ground1", 6, 6, 2, scene);
})();