-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain-scene.js
29 lines (20 loc) · 1.18 KB
/
main-scene.js
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
import {defs, tiny} from './examples/common.js';
import {GameScene} from "./game-scene.js"
// Pull these names into this module's scope for convenience:
const {
Vector, Vector3, vec, vec3, vec4, color, Matrix, Mat4, Light, Shape, Material, Shader, Texture, Scene,
Canvas_Widget, Code_Widget, Text_Widget
} = tiny;
// Now we have loaded everything in the files tiny-graphics.js, tiny-graphics-widgets.js, and common.js.
// This yielded "tiny", an object wrapping the stuff in the first two files, and "defs" for wrapping all the rest.
// ******************** Extra step only for when executing on a local machine:
// Load any more files in your directory and copy them into "defs."
// (On the web, a server should instead just pack all these as well
// as common.js into one file for you, such as "dependencies.js")
const Minimal_Webgl_Demo = defs.Minimal_Webgl_Demo;
Object.assign(defs, {GameScene});
// ******************** End extra step
// (Can define Main_Scene's class here)
const Main_Scene = GameScene;
const Additional_Scenes = [];
export {Main_Scene, Additional_Scenes, Canvas_Widget, Code_Widget, Text_Widget, defs}