-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
63 lines (49 loc) · 2.24 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title>Amy's BabylonJS Physics Playground</title>
<link href="stylesheet.css" rel="stylesheet" type="text/css"/>
<script src="https://cdn.babylonjs.com/babylon.js"></script>
<script src="https://code.jquery.com/pep/0.4.2/pep.min.js"></script>
<script src="https://preview.babylonjs.com/loaders/babylonjs.loaders.js"></script>
<script src="https://preview.babylonjs.com/gui/babylon.gui.min.js"></script>
<script src="https://cdn.babylonjs.com/havok/HavokPhysics_umd.js"></script>
<script src="js/helper.js"></script>
<script src="js/app.js"></script>
<script src="js/GUI.js"></script>
</head>
<body>
<div id="loadingScreen"><div class="lds-roller"><div></div><div></div><div></div><div></div><div></div><div></div><div></div><div></div></div></div>
<canvas id="renderCanvas"></canvas>
<script type = "module">
CANVAS = document.getElementById("renderCanvas");
ENGINE = new BABYLON.Engine(CANVAS, true, {preserveDrawingBuffer: true, stencil: true}, true); // Generate the BABYLON 3D engine
havokInstance = await HavokPhysics();
var loadingScreenDiv = window.document.getElementById("loadingScreen");
function customLoadingScreen() {
//console.log("customLoadingScreen creation")
}
customLoadingScreen.prototype.displayLoadingUI = function () {
//console.log("customLoadingScreen loading")
};
customLoadingScreen.prototype.hideLoadingUI = function () {
//console.log("customLoadingScreen loaded")
loadingScreenDiv.style.display = "none";
};
var loadingScreen = new customLoadingScreen();
ENGINE.loadingScreen = loadingScreen;
ENGINE.displayLoadingUI();
//PIXI_MNGR = new PixiManager();
MAIN_SCENE = delayCreateScene();
ENGINE.runRenderLoop(function () {
MAIN_SCENE.render();
ENGINE.wipeCaches(true);
//PIXI_MNGR.render();
});
window.addEventListener("resize", function () {
ENGINE.resize();
});
</script>
</body>
</html>