-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
27 lines (26 loc) · 1.15 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
<!-- Graphics Example Code.
index.html - The web page document containing the canvas (drawing surface). It launches your JavaScript files.
-->
<!DOCTYPE html>
<html lang="En">
<head>
<meta charset="UTF-8"/>
<link href="assets/fav.ico" rel="icon">
<title>Tiny Graphics</title>
</head>
<body style="background: White">
<!-- Begin typing your web page here. -->
<!-- The following code embeds a WebGL canvas panel, loads certain scene(s), and displays panel(s) of their controls.-->
<div class="canvas-widget" id="main-canvas"></div>
<script type=module>
// ********************* THE ENTRY POINT OF YOUR WHOLE PROGRAM STARTS HERE *********************
// Indicate which element on the page you want the Canvas_Widget to replace with a 3D WebGL area:
const element_to_replace = document.querySelector("#main-canvas");
import {Main_Scene, Canvas_Widget} from './main_scene.js'; // Additional_Scenes
// Import the file that defines a scene.
const scenes = [Main_Scene].map(scene => new scene()); // removed "...Additional_Scenes"
// This line creates your scene.
new Canvas_Widget(element_to_replace, scenes);
</script>
</body>
</html>