basic babylonjs html file

html - May 23, 2016 - 09:33
  template par défaut d''une scàne babylonJS
<!doctype html>
<html>
<head>
    <title>default</title>
	<meta charset="UTF-8">
    <script src="https://preview.babylonjs.com/babylon.js"></script>
    <style>
      html, body {
        overflow: hidden;
        width: 100%;
        height: 100%;
        margin: 0;
        padding: 0;
      }

      #canvas {
        width: 100%;
        height: 100%;
        touch-action: none;
      }
</style>
</head>

<body>
    <canvas id=''canvas''></canvas>
    <script type=''text/javascript''>
        var canvas = document.getElementById(''canvas'');
        var engine = new BABYLON.Engine(canvas, true);
        BABYLON.SceneLoader.Load('''', ''scene.babylon'', engine, function (myScene) {
		
			//camera parameters
            myScene.activeCamera.attachControl(canvas);
			//myScene.activeCamera.fov=1;
			//myScene.activeCamera.setPosition(new BABYLON.Vector3(6, 5, -4));
			
			//myScene.clearColor = new BABYLON.Color3(1, 1, 1);
			//myScene.ambientColor = new BABYLON.Color3(.5,.5,.5);
			
            engine.runRenderLoop(function() {
                myScene.render();
            });

            window.addEventListener(''resize'', function () {
                engine.resize();
            });
        });
    </script>
</body>
</html>