forked from BabylonJS/Editor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index-local.html
112 lines (101 loc) · 5.49 KB
/
index-local.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Babylon.js Editor</title>
<script src="./node_modules/es6-promise/dist/es6-promise.auto.js" type="text/javascript"></script>
<script src="./node_modules/systemjs/dist/system.src.js" type="text/javascript"></script>
<script src="./node_modules/jquery/dist/jquery.js" type="text/javascript"></script>
<script src="./node_modules/w2ui/w2ui.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="./node_modules/w2ui/w2ui.css" />
<link rel="stylesheet" type="text/css" href="./node_modules/jstree/dist/themes/default/style.min.css" />
<link rel="stylesheet" type="text/css" href="./css/editor.css" />
</head>
<body>
<div id="LOADING-DIV" style="width: 100%; height: 100%;"></div>
<script type="text/javascript">
System.config({
paths: {
"babylonjs": "./node_modules/babylonjs/babylon.max.js",
"babylonjs-gui": "./node_modules/babylonjs-gui/babylon.gui.min.js",
"babylonjs-materials": "./node_modules/babylonjs-materials/babylonjs.materials.js",
"babylonjs-loaders": "./node_modules/babylonjs-loaders/babylonjs.loaders.js",
"babylonjs-serializers": "./node_modules/babylonjs-serializers/babylonjs.serializers.js",
"babylonjs-procedural-textures": "./node_modules/babylonjs-procedural-textures/babylonjs.proceduralTextures.js",
"babylonjs-post-process": "./node_modules/babylonjs-post-process/babylonjs.postProcess.js",
"babylonjs-node-editor": "./node_modules/babylonjs-node-editor/babylon.nodeEditor.max.js",
"cannon": "./node_modules/cannon/build/cannon.js",
"spectorjs": "./node_modules/spectorjs/dist/spector.bundle.js",
"dat-gui": "./node_modules/dat.gui/build/dat.gui.js",
"raphael": "./node_modules/raphael/raphael.js",
"socket.io-client": "./node_modules/socket.io-client/dist/socket.io.js",
"earcut": "./node_modules/earcut/dist/earcut.min.js",
"oimo": "./node_modules/babylonjs/Oimo.js",
"jstree": "./node_modules/jstree/dist/jstree.js",
"golden-layout": "./node_modules/golden-layout/dist/goldenlayout.js",
"javascript-astar": "./node_modules/javascript-astar/astar.js",
"typescript": "./node_modules/typescript/lib/typescript.js",
"litegraph.js": "./node_modules/litegraph.js/build/litegraph.js",
// Editor's modules paths
"babylonjs-editor": "./build/src/index.js",
"babylonjs-editor-extensions": "./build/src/extensions/index.js",
"animation-editor": "./build/src/tools/animations/editor.js",
"material-viewer": "./build/src/tools/materials/viewer.js",
"behavior-editor": "./build/src/tools/code-behavior/code.js",
"graph-editor": "./build/src/tools/graph-behavior/graph.js",
"texture-viewer": "./build/src/tools/textures/viewer.js",
"material-editor": "./build/src/tools/material-editor/index.js",
"post-process-editor": "./build/src/tools/post-process-editor/index.js",
"play-game": "./build/src/tools/play-game/index.js",
"path-finder": "./build/src/tools/path-finder/index.js",
"particles-creator": "./build/src/tools/particles-creator/index.js",
"metadatas": "./build/src/tools/metadata/editor.js",
"notes": "./build/src/tools/notes/notes.js",
"prefab-editor": "./build/src/tools/prefabs/editor.js",
"post-processes": "./build/src/extensions/post-process/post-processes.js"
},
packages: {
"./build/src/": {
defaultExtension: "js"
},
"./node_modules/babylonjs-loaders/": {
main: "babylonjs.loaders.js",
format: "global"
}
},
map: {
css: "./node_modules/systemjs-plugin-css/css.js"
},
meta: {
"*.css": { loader: "css" },
"cannon": { format: "global" },
"javascript-astar": { format: "global" },
"typescript": { format: "global", exports: "ts" },
"litegraph.js": { format: "global" }
},
pluginFirst: true
});
// Define modules
System.set('jquery', System.newModule({ __useDefault: $ }));
// Lock and import
var loadingDiv = document.getElementById('LOADING-DIV');
w2utils.lock(loadingDiv, 'Loading Editor...', true);
System.import("babylonjs-editor").then(function (e) {
// Unlock and remove loading div
w2utils.unlock(loadingDiv);
loadingDiv.remove();
// Run editor
var editor = window.editor = new e.default();
editor.run();
});
</script>
<!-- REQUIRE MONACO EDITOR -->
<script src="./node_modules/monaco-editor/min/vs/loader.js" type="text/javascript"></script>
<script type="text/javascript">
require.config({ paths: { "vs": "./node_modules/monaco-editor/min/vs" }});
require(["vs/editor/editor.main"], function() {
// Empty
});
</script>
</body>
</html>