-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
38 lines (36 loc) · 1.86 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
<!-- Graphics Example Code. index.html - The web page document containing the canvas (drawing surface), that launches your javascript files. //-->
<!DOCTYPE html>
<html lang="En">
<head>
<meta charset="UTF-8"/>
<link rel="icon" href="assets/fav.ico">
<script> window.tiny_graphics = {}; // Store all our JavaScipt code inside of classes here.
window.classes = {}
</script>
<!-- Javascript "include" files. Any code in them gets executed as part of the page loading: //-->
<script src="tiny-graphics.js"></script>
<script src="dependencies.js"></script>
<script src="physics.js"></script>
<script src="main-scene.js"></script>
</head>
<body style="background: DarkGray"> <!-- Begin typing your web page here. //-->
<!-- The following code embeds a WebGL canvas panel widget with certain scenes and their controls. //-->
<div id="main-canvas" class="canvas-widget"></div>
<script> "use strict" // ********************* THE ENTRY POINT OF YOUR WHOLE PROGRAM STARTS HERE *********************
// Use this code to embed a widget into any web page. The widget inclues a 3D WebGL area
// (an HTML canvas) and various panels of controls.
const scenes = ["Ten_Ball_Pool", // First, list the names of scenes we will add to our canvas. These will register
"Global_Info_Table"];
// themselves with this widget's Canvas_Manager so that their code can be called upon
// every time a draw / keyboard / mouse event happens on the web page.
new Canvas_Widget("main-canvas", scenes);
// Use the Canvas_Widget class to display the WebGL demo. Pass in
// the name of the HTML element we are to replace with the widget.
</script>
<!-- The following code embeds a code navigator widget with links to classes. //-->
<div id="main-code" class="code-widget"></div>
<script>
new Code_Widget("main-code", "Ten_Ball_Pool");
</script>
</body>
</html>