wgge 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/core/ActivatedTreeNode.js +187 -0
- package/core/Collection.js +156 -0
- package/core/Dictionary.js +83 -0
- package/core/animation/3d/AnimatedVector3.js +35 -0
- package/core/animation/3d/AnimationHelper.js +103 -0
- package/core/animation/3d/ProgressVector3.js +26 -0
- package/core/animation/AnimatedRotation.js +44 -0
- package/core/animation/AnimatedValue.js +33 -0
- package/core/animation/AnimatedVector2.js +35 -0
- package/core/animation/ProgressRotation.js +40 -0
- package/core/animation/ProgressValue.js +27 -0
- package/core/animation/ProgressVector2.js +23 -0
- package/core/audio/AudioModel.js +36 -0
- package/core/audio/AudioRenderer.js +120 -0
- package/core/audio/global/GlobalAudioModel.js +88 -0
- package/core/audio/global/GlobalAudioRenderer.js +108 -0
- package/core/controller/AnimationController.js +37 -0
- package/core/controller/AnimationFloatController.js +39 -0
- package/core/controller/AnimationVector2Controller.js +39 -0
- package/core/controller/CollectionController.js +47 -0
- package/core/controller/ConditionalNodeController.js +51 -0
- package/core/controller/ControllerBase.js +64 -0
- package/core/controller/ControllerWithSaveGame.js +27 -0
- package/core/controller/ControllerWithTimeout.js +10 -0
- package/core/controller/NullableNodeController.js +35 -0
- package/core/controller/TimeoutController.js +26 -0
- package/core/helper/ArrayHelper.js +19 -0
- package/core/helper/DOMHelper.js +167 -0
- package/core/helper/GUIHelper.js +53 -0
- package/core/helper/HttpHelper.js +33 -0
- package/core/helper/ImageHelper.js +36 -0
- package/core/helper/NumberHelper.js +28 -0
- package/core/helper/ObjectHelper.js +10 -0
- package/core/helper/StringHelper.js +59 -0
- package/core/model/ModelBase.js +91 -0
- package/core/model/ObjectModel.js +97 -0
- package/core/model/collection/ModelNodeCollection.js +232 -0
- package/core/model/collection/table/IdentifiedModelNode.js +24 -0
- package/core/model/collection/table/ModelNodeTable.js +53 -0
- package/core/model/event/ChangeEvent.js +24 -0
- package/core/model/event/EventManager.js +44 -0
- package/core/model/event/NodeWithEvents.js +32 -0
- package/core/model/template/TemplateNode.js +45 -0
- package/core/model/value/BoolValue.js +17 -0
- package/core/model/value/CapacityValue.js +49 -0
- package/core/model/value/DirtyValue.js +66 -0
- package/core/model/value/FloatValue.js +8 -0
- package/core/model/value/IntValue.js +20 -0
- package/core/model/value/NullableNode.js +66 -0
- package/core/model/value/StringValue.js +21 -0
- package/core/model/vector/Quaternion.js +82 -0
- package/core/model/vector/Rotation.js +61 -0
- package/core/model/vector/Vector2.js +177 -0
- package/core/model/vector/Vector3.js +98 -0
- package/core/renderer/RendererBase.js +46 -0
- package/core/renderer/canvas/CanvasRenderer.js +60 -0
- package/core/renderer/canvas/ImageToCanvasRenderer.js +94 -0
- package/core/renderer/dom/DirtyValueRenderer.js +36 -0
- package/core/renderer/dom/DomRenderer.js +32 -0
- package/core/renderer/dom/ImageRenderer.js +41 -0
- package/core/renderer/dom/Vector2Renderer.js +37 -0
- package/core/renderer/generic/CollectionRenderer.js +50 -0
- package/core/renderer/generic/ConditionalNodeRenderer.js +57 -0
- package/core/renderer/generic/NullableNodeRenderer.js +43 -0
- package/core/renderer/svg/SvgRenderer.js +130 -0
- package/editor/EditorController.js +135 -0
- package/editor/EditorModel.js +38 -0
- package/editor/EditorRenderer.js +116 -0
- package/editor/form/NodeFormRenderer.js +180 -0
- package/editor/material/MaterialPreviewRenderer.js +136 -0
- package/editor/table/TableRenderer.js +123 -0
- package/editor/table/lookup/TableLookupRenderer.js +120 -0
- package/editor/table/row/TableRowRenderer.js +97 -0
- package/game/GameController.js +144 -0
- package/game/GameModel.js +73 -0
- package/game/GameRenderer.js +108 -0
- package/game/controls/ControlsController.js +104 -0
- package/game/controls/ControlsModel.js +60 -0
- package/game/menu/MenuModel.js +25 -0
- package/game/menu/MenuRenderer.js +37 -0
- package/game/menu/item/MenuItemModel.js +31 -0
- package/game/menu/item/MenuItemRenderer.js +40 -0
- package/game/resources/3d/3DModel.js +30 -0
- package/game/resources/ResourcesModel.js +26 -0
- package/game/resources/assets/AssetCache.js +193 -0
- package/game/resources/assets/loader/AssetLoader.js +56 -0
- package/game/resources/assets/loader/AudioLoader.js +15 -0
- package/game/resources/assets/loader/GlbLoader.js +16 -0
- package/game/resources/assets/loader/ImageLoader.js +15 -0
- package/game/resources/assets/loader/MaterialLoader.js +49 -0
- package/game/resources/assets/loader/Model3dLoader.js +21 -0
- package/game/resources/assets/loader/SpriteLoader.js +40 -0
- package/game/resources/image/DualImageModel.js +34 -0
- package/game/resources/image/ImageModel.js +43 -0
- package/game/resources/material/MaterialModel.js +69 -0
- package/game/save/SaveGameController.js +21 -0
- package/game/save/SaveGameModel.js +5 -0
- package/game/save/SaveGameRenderer.js +17 -0
- package/game/save/editor/SaveGameEditorRenderer.js +17 -0
- package/index.html +42 -0
- package/index.js +73 -0
- package/package.json +35 -0
- package/style/basic/editor.less +290 -0
- package/style/basic/game.less +149 -0
- package/style/basic/utilities.less +215 -0
- package/style/style.less +3 -0
- package/webpack.config.js +29 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import DomRenderer from "../../core/renderer/dom/DomRenderer";
|
|
2
|
+
|
|
3
|
+
export default class SaveGameRenderer extends DomRenderer {
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @type SaveGameModel
|
|
7
|
+
*/
|
|
8
|
+
model;
|
|
9
|
+
|
|
10
|
+
constructor(game, model, dom) {
|
|
11
|
+
super(game, model, dom);
|
|
12
|
+
|
|
13
|
+
this.model = model;
|
|
14
|
+
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import DomRenderer from "../../../core/renderer/dom/DomRenderer";
|
|
2
|
+
|
|
3
|
+
export default class SaveGameEditorRenderer extends DomRenderer {
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* @type SaveGameModel
|
|
7
|
+
*/
|
|
8
|
+
model;
|
|
9
|
+
|
|
10
|
+
constructor(game, model, dom) {
|
|
11
|
+
super(game, model, dom);
|
|
12
|
+
|
|
13
|
+
this.model = model;
|
|
14
|
+
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
}
|
package/index.html
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
|
6
|
+
<title>Web GL Game Engine</title>
|
|
7
|
+
<link rel="preload" as="style" href="style.css" onload="this.onload=null;this.rel='stylesheet'">
|
|
8
|
+
<script defer src="index.bundle.js"></script>
|
|
9
|
+
<style>
|
|
10
|
+
|
|
11
|
+
html, body {
|
|
12
|
+
margin: 0;
|
|
13
|
+
padding: 0;
|
|
14
|
+
height: 100%;
|
|
15
|
+
background-color: #000;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
#initial_loading {
|
|
19
|
+
height: 100%;
|
|
20
|
+
display: flex;
|
|
21
|
+
flex-direction: column;
|
|
22
|
+
align-items: center;
|
|
23
|
+
justify-content: center;
|
|
24
|
+
color: #fff;
|
|
25
|
+
font-size: 2rem;
|
|
26
|
+
animation-name: loadanim;
|
|
27
|
+
animation-duration: 2s;
|
|
28
|
+
animation-direction: alternate;
|
|
29
|
+
animation-iteration-count: infinite;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@keyframes loadanim {
|
|
33
|
+
from {color: #0a0a0a;}
|
|
34
|
+
to {color: #f0f0f0;}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
</style>
|
|
38
|
+
</head>
|
|
39
|
+
<body>
|
|
40
|
+
<div id="initial_loading"><div>Loading...</div></div>
|
|
41
|
+
</body>
|
|
42
|
+
</html>
|
package/index.js
ADDED
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import Stats from 'three/examples/jsm/libs/stats.module'
|
|
2
|
+
import DOMHelper from "./core/helper/DOMHelper";
|
|
3
|
+
|
|
4
|
+
export default class Wgge {
|
|
5
|
+
|
|
6
|
+
enabled = false;
|
|
7
|
+
lastTime = 0;
|
|
8
|
+
|
|
9
|
+
maxDelta;
|
|
10
|
+
debugModeEnabled;
|
|
11
|
+
showStats;
|
|
12
|
+
|
|
13
|
+
constructor(
|
|
14
|
+
controller,
|
|
15
|
+
renderer,
|
|
16
|
+
maxDelta = 100,
|
|
17
|
+
debugModeEnabled = true,
|
|
18
|
+
showStats = false
|
|
19
|
+
) {
|
|
20
|
+
this.controller = controller;
|
|
21
|
+
this.renderer = renderer;
|
|
22
|
+
this.maxDelta = maxDelta;
|
|
23
|
+
this.debugModeEnabled = debugModeEnabled;
|
|
24
|
+
this.showStats = showStats;
|
|
25
|
+
this.stats = null;
|
|
26
|
+
|
|
27
|
+
this.updateLoopHandler = () => this.updateLoop();
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
start() {
|
|
31
|
+
if (this.debugModeEnabled) {
|
|
32
|
+
window['wegge'] = this;
|
|
33
|
+
}
|
|
34
|
+
if (this.showStats) {
|
|
35
|
+
this.stats = new Stats();
|
|
36
|
+
document.body.appendChild(this.stats.dom);
|
|
37
|
+
}
|
|
38
|
+
this.enabled = true;
|
|
39
|
+
this.controller.activate();
|
|
40
|
+
this.renderer.activate();
|
|
41
|
+
this.lastTime = performance.now();
|
|
42
|
+
this.updateLoop();
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
stop() {
|
|
46
|
+
this.enabled = false;
|
|
47
|
+
this.controller.deactivate();
|
|
48
|
+
this.renderer.deactivate();
|
|
49
|
+
if (this.stats) {
|
|
50
|
+
DOMHelper.destroyElement(this.stats.dom);
|
|
51
|
+
this.stats = null;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
updateLoop() {
|
|
56
|
+
if (!this.enabled) return;
|
|
57
|
+
|
|
58
|
+
const time = performance.now();
|
|
59
|
+
const delta = time - this.lastTime;
|
|
60
|
+
this.lastTime = time;
|
|
61
|
+
|
|
62
|
+
if (delta < this.maxDelta) {
|
|
63
|
+
this.controller.update(delta);
|
|
64
|
+
this.renderer.render();
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if (this.showStats && this.stats) {
|
|
68
|
+
this.stats.update();
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
requestAnimationFrame(this.updateLoopHandler);
|
|
72
|
+
}
|
|
73
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "wgge",
|
|
3
|
+
"version": "0.0.1",
|
|
4
|
+
"description": "Web GL Game Engine",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"dependencies": {
|
|
7
|
+
"localforage": "^1.10.0",
|
|
8
|
+
"three": "^0.139.2",
|
|
9
|
+
"@svgdotjs/svg.filter.js": "^3.0.7",
|
|
10
|
+
"@svgdotjs/svg.js": "^3.1.1"
|
|
11
|
+
},
|
|
12
|
+
"devDependencies": {
|
|
13
|
+
"concurrently": "^7.6.0",
|
|
14
|
+
"copy-webpack-plugin": "^9.0.1",
|
|
15
|
+
"express": "^4.18.2",
|
|
16
|
+
"cors": "^2.8.5",
|
|
17
|
+
"html-webpack-plugin": "^5.3.2",
|
|
18
|
+
"http-server": "^13.0.2",
|
|
19
|
+
"less": "^4.1.3",
|
|
20
|
+
"webpack": "^5.76.0",
|
|
21
|
+
"webpack-cli": "^4.8.0",
|
|
22
|
+
"webpack-dev-server": "^3.11.2",
|
|
23
|
+
"workbox-webpack-plugin": "^6.3.0"
|
|
24
|
+
},
|
|
25
|
+
"scripts": {
|
|
26
|
+
"test": "echo \"Error: no test specified\" && exit 1",
|
|
27
|
+
"build-less": "lessc style/style.less build/style.css",
|
|
28
|
+
"build-webpack": "webpack",
|
|
29
|
+
"build": "npm run build-less && npm run build-webpack",
|
|
30
|
+
"debug-serve-webpack": "webpack serve --open",
|
|
31
|
+
"debug-watch-less": "less-watch-compiler style build style.less",
|
|
32
|
+
"debug": "concurrently \"npm:debug-*\""
|
|
33
|
+
},
|
|
34
|
+
"author": "Karel Zavadil"
|
|
35
|
+
}
|
|
@@ -0,0 +1,290 @@
|
|
|
1
|
+
.instant-editor {
|
|
2
|
+
display: block;
|
|
3
|
+
position: static;
|
|
4
|
+
padding: 1px;
|
|
5
|
+
margin: 1px;
|
|
6
|
+
|
|
7
|
+
input[type=text],
|
|
8
|
+
textarea {
|
|
9
|
+
display: block;
|
|
10
|
+
width: 100%;
|
|
11
|
+
margin: auto;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
.table-lookup {
|
|
16
|
+
background-color: black;
|
|
17
|
+
color: gray;
|
|
18
|
+
|
|
19
|
+
.buttons {
|
|
20
|
+
input {
|
|
21
|
+
margin: 2px !important;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
button {
|
|
25
|
+
background-color: gray !important;
|
|
26
|
+
color: black !important;
|
|
27
|
+
font-weight: normal !important;
|
|
28
|
+
box-shadow: none !important;
|
|
29
|
+
border-radius: 2px !important;
|
|
30
|
+
padding: 2px !important;
|
|
31
|
+
margin: 2px !important;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.scroll {
|
|
36
|
+
overflow-y: auto;
|
|
37
|
+
overflow-x: hidden;
|
|
38
|
+
max-height: 400px;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
.row {
|
|
42
|
+
display: flex !important;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
tr.active {
|
|
46
|
+
color: white;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.force-foreground {
|
|
51
|
+
position: fixed;
|
|
52
|
+
z-index: 9999999;
|
|
53
|
+
top: 20%;
|
|
54
|
+
left: 40%;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.editor-section {
|
|
58
|
+
background-color: black;
|
|
59
|
+
color: gray;
|
|
60
|
+
|
|
61
|
+
button {
|
|
62
|
+
background-color: gray !important;
|
|
63
|
+
color: black !important;
|
|
64
|
+
font-weight: normal !important;
|
|
65
|
+
box-shadow: none !important;
|
|
66
|
+
border-radius: 2px !important;
|
|
67
|
+
padding: 2px !important;
|
|
68
|
+
margin: 2px !important;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.editor-layer {
|
|
73
|
+
font-family: monospace;
|
|
74
|
+
position: absolute;
|
|
75
|
+
top: 0;
|
|
76
|
+
left: 0;
|
|
77
|
+
max-height: 100%;
|
|
78
|
+
overflow: hidden;
|
|
79
|
+
cursor: default;
|
|
80
|
+
|
|
81
|
+
.editor {
|
|
82
|
+
background-color: transparent;
|
|
83
|
+
font-size: 10pt;
|
|
84
|
+
position: fixed;
|
|
85
|
+
|
|
86
|
+
.bg {
|
|
87
|
+
background-color: black;
|
|
88
|
+
color: gray;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
ul.menu {
|
|
92
|
+
padding: 0;
|
|
93
|
+
margin: 0;
|
|
94
|
+
|
|
95
|
+
a:hover {
|
|
96
|
+
color: lightblue;
|
|
97
|
+
cursor: pointer;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.active {
|
|
101
|
+
color: white;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
li {
|
|
105
|
+
padding: 4px;
|
|
106
|
+
list-style: none;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
.buttons {
|
|
111
|
+
display: flex;
|
|
112
|
+
flex-direction: row;
|
|
113
|
+
justify-content: space-between;
|
|
114
|
+
|
|
115
|
+
& > div {
|
|
116
|
+
display: flex;
|
|
117
|
+
flex-direction: row;
|
|
118
|
+
justify-content: start;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
input {
|
|
122
|
+
margin: @m-1;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
button {
|
|
127
|
+
background-color: gray;
|
|
128
|
+
color: black;
|
|
129
|
+
border: 0;
|
|
130
|
+
border-radius: 5px;
|
|
131
|
+
cursor: pointer;
|
|
132
|
+
margin: @m-1;
|
|
133
|
+
|
|
134
|
+
&.active {
|
|
135
|
+
background-color: black;
|
|
136
|
+
color: white;
|
|
137
|
+
border: 1px white solid;
|
|
138
|
+
cursor: default;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
&:hover {
|
|
142
|
+
background-color: lightblue;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
&.special {
|
|
146
|
+
background-color: @light-brown;
|
|
147
|
+
color: @dark-brown;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
&.red {
|
|
151
|
+
background-color: red;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
&.blue {
|
|
155
|
+
background-color: lightblue;
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
.dock {
|
|
160
|
+
width: 100%;
|
|
161
|
+
display: flex;
|
|
162
|
+
flex-direction: row;
|
|
163
|
+
align-items: flex-start;
|
|
164
|
+
justify-content: space-between;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
.table,
|
|
168
|
+
form,
|
|
169
|
+
.item-def {
|
|
170
|
+
border: 1px gray solid;
|
|
171
|
+
border-radius: 5px;
|
|
172
|
+
margin: 10px;
|
|
173
|
+
padding: 10px;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
.grab-icon {
|
|
177
|
+
cursor: move;
|
|
178
|
+
opacity: 0.5;
|
|
179
|
+
|
|
180
|
+
&::after {
|
|
181
|
+
content: "■";
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.table .scroll,
|
|
186
|
+
form .scroll {
|
|
187
|
+
display: block;
|
|
188
|
+
overflow-y: auto;
|
|
189
|
+
overflow-x: hidden;
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
.table .scroll {
|
|
193
|
+
max-height: 200px;
|
|
194
|
+
max-width: 700px;
|
|
195
|
+
overflow-x: auto;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
form .scroll {
|
|
199
|
+
max-height: 563px;
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
table {
|
|
203
|
+
margin-right: 20px;
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
table td {
|
|
207
|
+
border-left: 1px gray solid;
|
|
208
|
+
white-space: nowrap;
|
|
209
|
+
max-height: 1em;
|
|
210
|
+
overflow: hidden;
|
|
211
|
+
text-overflow: ellipsis;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
table td:last-of-type {
|
|
215
|
+
border-right: 1px gray solid;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
table tr:hover > td {
|
|
219
|
+
color: lightblue;
|
|
220
|
+
cursor: pointer;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
table tr.active > td {
|
|
224
|
+
color: white;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
form .fields .row {
|
|
228
|
+
display: grid;
|
|
229
|
+
grid-template-columns: 1fr 4fr;
|
|
230
|
+
gap: 10px;
|
|
231
|
+
margin-bottom: @m-1;
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
form .fields .row .field {
|
|
235
|
+
display: flex;
|
|
236
|
+
align-content: stretch;
|
|
237
|
+
flex-direction: column;
|
|
238
|
+
}
|
|
239
|
+
|
|
240
|
+
form .fields .row .field.with-lookup {
|
|
241
|
+
flex-direction: row;
|
|
242
|
+
align-items: center;
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
form .fields .row .field.with-lookup .lookup-button {
|
|
246
|
+
margin: 0;
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
form .fields .row input {
|
|
250
|
+
display: block;
|
|
251
|
+
width: auto;
|
|
252
|
+
margin-right: 10px;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
form .fields .row input[type=checkbox] {
|
|
256
|
+
align-self: start;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
form .fields .row .vector {
|
|
260
|
+
flex-direction: row;
|
|
261
|
+
}
|
|
262
|
+
|
|
263
|
+
form .fields .row .vector input {
|
|
264
|
+
width: 100px;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
.battle-menu {
|
|
268
|
+
position: fixed;
|
|
269
|
+
right: 20px;
|
|
270
|
+
top: 20px;
|
|
271
|
+
padding: @m-2;
|
|
272
|
+
|
|
273
|
+
input[type=text] {
|
|
274
|
+
width: 50px;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
input[type=radio] {
|
|
278
|
+
margin: 0;
|
|
279
|
+
padding: @m-1;
|
|
280
|
+
display: inline-block;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
label {
|
|
284
|
+
padding: @m-1;
|
|
285
|
+
display: inline-block;
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
|
|
289
|
+
}
|
|
290
|
+
}
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
@dark-brown: #311a0a;
|
|
2
|
+
@medium-brown: #885f32;
|
|
3
|
+
@light-brown: #ad9475;
|
|
4
|
+
|
|
5
|
+
@orange: sandybrown;
|
|
6
|
+
@gold: #e0b050;
|
|
7
|
+
@red: darkred;
|
|
8
|
+
@white: #e0e0e0;
|
|
9
|
+
@black: rgb(0, 0, 0);
|
|
10
|
+
@transparent-black: rgba(0, 0, 0, 0.7);
|
|
11
|
+
|
|
12
|
+
@font-size-extra-small: 10pt;
|
|
13
|
+
@font-size-small: 16pt;
|
|
14
|
+
@font-size-medium: 22pt;
|
|
15
|
+
@font-size-large: 32pt;
|
|
16
|
+
@font-size-extra-large: 65pt;
|
|
17
|
+
|
|
18
|
+
html, body {
|
|
19
|
+
margin: 0;
|
|
20
|
+
padding: 0;
|
|
21
|
+
overflow: hidden;
|
|
22
|
+
height: 100%;
|
|
23
|
+
min-height: 100%;
|
|
24
|
+
background-color: #000;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
img {
|
|
28
|
+
-webkit-user-drag: none;
|
|
29
|
+
-khtml-user-drag: none;
|
|
30
|
+
-moz-user-drag: none;
|
|
31
|
+
-o-user-drag: none;
|
|
32
|
+
user-drag: none;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
h1, h2, h3, h4 {
|
|
36
|
+
margin: 0;
|
|
37
|
+
padding: 0;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.no-text-select {
|
|
41
|
+
-webkit-user-select: none;
|
|
42
|
+
-khtml-user-select: none;
|
|
43
|
+
-moz-user-select: none;
|
|
44
|
+
-o-user-select: none;
|
|
45
|
+
user-select: none;
|
|
46
|
+
-webkit-touch-callout: none;
|
|
47
|
+
-ms-user-select: none;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.normal-text {
|
|
51
|
+
.no-text-select();
|
|
52
|
+
|
|
53
|
+
font-family: "Droid Sans Mono Dotted", monospace;
|
|
54
|
+
font-size: @font-size-small;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
.decor-text {
|
|
58
|
+
.normal-text();
|
|
59
|
+
|
|
60
|
+
font-size: @font-size-medium;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.small-text {
|
|
64
|
+
.normal-text();
|
|
65
|
+
|
|
66
|
+
font-size: @font-size-extra-small;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.default-cursor {
|
|
70
|
+
//cursor: uri('img/cursor/cursor.png'), default;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.info-float {
|
|
74
|
+
position: fixed;
|
|
75
|
+
right: @m-2;
|
|
76
|
+
top: @m-2;
|
|
77
|
+
background-color: @black;
|
|
78
|
+
color: @white;
|
|
79
|
+
padding: @m-2;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.loading {
|
|
83
|
+
.decor-text();
|
|
84
|
+
|
|
85
|
+
position: fixed;
|
|
86
|
+
top: 0;
|
|
87
|
+
left: 0;
|
|
88
|
+
right: 0;
|
|
89
|
+
bottom: 0;
|
|
90
|
+
display: flex;
|
|
91
|
+
align-items: center;
|
|
92
|
+
justify-content: center;
|
|
93
|
+
z-index: 2000;
|
|
94
|
+
pointer-events: none;
|
|
95
|
+
background-repeat: no-repeat;
|
|
96
|
+
background-size: cover;
|
|
97
|
+
background-position: center center;
|
|
98
|
+
|
|
99
|
+
color: @white;
|
|
100
|
+
|
|
101
|
+
div {
|
|
102
|
+
border-radius: @m-2;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.progress-wrapper {
|
|
106
|
+
border-width: 1px;
|
|
107
|
+
padding: 1px;
|
|
108
|
+
border-style: solid;
|
|
109
|
+
border-color: @white;
|
|
110
|
+
|
|
111
|
+
div {
|
|
112
|
+
height: @m-2;
|
|
113
|
+
background-color: @white;
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
.main-menu-layer {
|
|
119
|
+
.default-cursor();
|
|
120
|
+
position: fixed;
|
|
121
|
+
top: 0;
|
|
122
|
+
left: 0;
|
|
123
|
+
right: 0;
|
|
124
|
+
bottom: 0;
|
|
125
|
+
display: flex;
|
|
126
|
+
align-items: center;
|
|
127
|
+
justify-content: center;
|
|
128
|
+
background-color: @transparent-black;
|
|
129
|
+
|
|
130
|
+
.main-menu {
|
|
131
|
+
.decor-text();
|
|
132
|
+
border-radius: @m-2;
|
|
133
|
+
text-align: center;
|
|
134
|
+
color: @white;
|
|
135
|
+
|
|
136
|
+
.item {
|
|
137
|
+
&:hover {
|
|
138
|
+
color: @red;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
.savegame-layer {
|
|
145
|
+
.default-cursor();
|
|
146
|
+
.normal-text();
|
|
147
|
+
color: @dark-brown;
|
|
148
|
+
|
|
149
|
+
}
|