-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patheditor.html
More file actions
248 lines (242 loc) · 8.35 KB
/
editor.html
File metadata and controls
248 lines (242 loc) · 8.35 KB
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
<!DOCTYPE html>
<html>
<head>
<title>Glunzunk Engine</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link rel="stylesheet" href="loading.css">
<link rel="stylesheet" href="assets/css/satoshi.css">
<link rel="stylesheet" href="assets/fonts/web/inter.css">
<link rel="stylesheet" href="assets/fonts/roboto/style.css">
<link rel="stylesheet" href="libs/winbox.min.css">
<link rel="stylesheet" href="editor.css">
<link rel="stylesheet" href="window.css">
<script src="scripts/editor/dropdown.js"></script>
<!-- Code Editor -->
<script src="libs/codemirror/codemirror.js"></script>
<link rel="stylesheet" href="libs/codemirror/codemirror.css">
<link rel="stylesheet" href="libs/codemirror/glunzunk.css">
<script src="libs/codemirror/javascript.js"></script> <!-- Syntax Highlighting -->
<!-- ZIP Library -->
<!-- <script src="libs/fflate.0.8.2.js"></script> -->
<script src="libs/jszip.min.js"></script>
<script src="libs/winbox.min.js"></script>
<script src="libs/jquery.min.js"></script>
<script src="libs/azuos.sdk.js"></script>
<meta http-equiv="Content-type" content="text/html;charset=UTF-8">
<style>
#renderCanvas {
position: fixed;
top: 0;
z-index: -5;
width: 100%;
height: 100%;
touch-action: none;
}
#canvasStats {
position: fixed;
top: 90px;
margin: 10px;
display: flex;
flex-direction: row;
gap: 5px;
font-family: 'Roboto Monospace';
font-size: 12px;
text-shadow: 0px 2px 7px #000000cc;
pointer-events: none;
}
</style>
<script type="importmap">
{
"imports": {
"three": "./libs/threejs/three.module.min.js",
"three/addons/": "./libs/threejs/jsm-addons/",
"three/external-shaders/": "./libs/threejs/external-shaders/"
}
}
</script>
<script src="scripts/engine/glunzunk.js" type=module></script>
<script src="scripts/editor/init.js" type=module></script>
<script src="scripts/editor/windows.js" type=module></script>
<script src="scripts/editor/inspector.js" type=module></script>
<script src="scripts/editor/materialeditor.js" type=module></script>
<script src="scripts/editor/deleteObject.js" type=module></script>
<script src="scripts/editor/camera.js" type=module></script>
<script src="scripts/editor/loadproject.js" type=module></script>
<script src="scripts/editor/saveproject.js" type=module></script>
<script src="scripts/editor/resourcespanel.js" type=module></script>
<script src="scripts/editor/exportpanel.js" type=module></script>
<script src="scripts/editor/buildgame.js" type=module></script>
<!-- <script src="scripts/editor/gizmo.js" type=module></script> -->
<!-- <script src="scripts/default-project.js" type=module></script> -->
<script src="scripts/editor/preview.js" type=module></script>
<script src="scripts/editor/render.js" type=module></script>
<script src="scripts/editor/canvasstats.js" type=module></script>
</head>
<body>
<div class=loading-screen id=loading-screen>
<svg class="spinner" id=loading viewBox="0 0 16 16" width="29" height="29" xmlns="http://www.w3.org/2000/svg">
<style>
path {
animation: spinner 3s ease-in-out infinite;
stroke-dasharray: 1, 200;
stroke-dashoffset: 0;
fill: none;
stroke-width: 2;
stroke-miterlimit: 10;
stroke-linecap: round;
transform-origin: 50% 50%;
stroke: #e7e9ec;
}
@keyframes spinner {
0% {
stroke-dasharray: 0, 200;
stroke-dashoffset: 0;
transform: rotate(0deg);
}
100% {
stroke-dasharray: 130, 200;
stroke-dashoffset: -43.9;
transform: rotate(-360deg);
}
}
</style>
<path d="M8 1A1 1 0 008 15 1 1 0 008 1"></path>
</svg>
<p id=loading-message>Message</p>
</div>
<div class=titlebar>
<img width=50px src=assets/ui/gzlogo.png>
<p class=projectname id=projectname>Project Name</p>
<!-- <button onclick="gzjs.object('table').x = 50">testt</button> -->
<div class=titlebar-right>
<a class=titlebar-a onclick='toggleDropdown("scene")'>
<img width=24 src=assets/icons/scene.svg>
</a>
<a class=titlebar-a onclick='exportPanel("toggle")'>
<img width=24 src=assets/icons/build.svg>
</a>
<a class=titlebar-a onclick='beginPreview()'>
<img width=24 src=assets/icons/play.svg>
</a>
<a class=titlebar-a onclick='codeEditor("toggle")'>
<img width=24 src=assets/icons/code.svg>
</a>
<a class=titlebar-a onclick='toggleDropdown("quick-settings")'>
<img width=24 src=assets/icons/menu.svg>
</a>
</div>
</div>
<div class=dropdown>
<div class=titlebar-dropdown id=scene-select>
</div>
<div class=titlebar-dropdown id=quick-settings>
<button onclick="saveProject()">Save Project</button>
<button onclick="resourcesPanel('toggle')">Resources</button>
<button>Project Properties</button>
<button>Close Project</button>
<button>Exit Engine</button>
</div>
<div class=titlebar-dropdown id=environment-settings>
<p>Unimplemented</p>
</div>
</div>
<div class=resources-panel id=resources-panel>
<div class=panel>
<h1>Global Resources</h1>
<hr>
<div class=resources-list id=resources-list>
<!-- <div class=resource-item>
<img height=120 src='assets/textures/checkerboard.png'>
<p>Name</p>
<p class=resource-item-type>Type</p>
</div> -->
</div>
<div class=resources-btns>
<style>
#importResource {
display: none;
}
</style>
<button onclick='importResource()'>Add Resource</button>
<button>Edit Resource</button>
<button>Delete Resource</button>
<input id=importResource type=file accept='image/*'>
</div>
</div>
</div>
<div class=export-panel id=export-panel>
<div class=panel>
<h1 id=export-platform-title>Export your Game</h1>
<hr>
<div class=export-list id=export-list>
<a class='export-option web-export'>
<img height=70 src='assets/textures/checkerboard.png'>
<p class=platform-name>Web Build</p>
</a>
<a class='export-option windows-export'>
<img height=70 src='assets/textures/checkerboard.png'>
<p class=platform-name>Windows</p>
</a>
<a class='export-option linux-export'>
<img height=70 src='assets/textures/checkerboard.png'>
<p class=platform-name>Linux</p>
</a>
<a class='export-option android-export'>
<img height=70 src='assets/textures/checkerboard.png'>
<p class=platform-name>Android</p>
</a>
</div>
<div class=export-parameters id=web-export-panel>
<h2>Export a Web Build</h2>
<p>Select your parameters for the build</p>
<label>
<input type="checkbox">
Enable PWA Installation
</label>
<label>
<input type="checkbox">
Cache Game Offline once loaded
</label>
<button id=export-game-btn>Export Game</button>
<button onclick='exportPanel(false)'>Close Menu</button>
</div>
</div>
</div>
<canvas id=renderCanvas></canvas>
<div class=script-editor id=script-editor>
<!-- <div class=script-editor-home>
<h2 class=script-editor-title>Script Editor</h2>
<p>Give your game life through scripting.</p>
<div class=script-editor-buttons>
<button>Create Script</button>
<button>Import Script</button>
</div>
<div class=script-editor-recents></div>
</div> -->
<!-- <div class=scripting-area>
<div class=event>
<div class=event-condition>
<p>Add a Condition</p>
</div>
<div class=event-action>
<p>Add an Acton</p>
</div>
</div>
</div> -->
<textarea placeholder="Write some code :3" wrap="soft"></textarea>
</div>
<div class=gizmo-manager>
<button class='tiny-btn light-color' onclick="showGizmo('position')">
<img width=24 src=assets/icons/position.svg>
</button>
<button class='tiny-btn light-color' onclick="showGizmo('rotation')">
<img width=24 src=assets/icons/rotate.svg>
</button>
<button class='tiny-btn light-color' onclick="showGizmo('scale')">
<img width=24 src=assets/icons/scale.svg>
</button>
</div>
<p id=canvasStats>Canvas Stats ( Loading )</p>
<script src="scripts/editor/scriptEditor.js" type=module></script> <!-- Script Editor -->
</body>
</html>