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,215 @@
|
|
|
1
|
+
@m-1: 5px;
|
|
2
|
+
@m-2: 10px;
|
|
3
|
+
@m-3: 20px;
|
|
4
|
+
|
|
5
|
+
.d-none, .hidden {
|
|
6
|
+
display: none !important;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.picture img {
|
|
10
|
+
display: block;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
.row {
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: row;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.row-reverse {
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-direction: row-reverse;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.col, .column {
|
|
24
|
+
display: flex;
|
|
25
|
+
flex-direction: column;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.col-rev, .column-reverse {
|
|
29
|
+
display: flex;
|
|
30
|
+
flex-direction: column-reverse;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.stretch {
|
|
34
|
+
align-items: stretch;
|
|
35
|
+
justify-content: stretch;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.flex-1 {
|
|
39
|
+
flex: 1;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.overflow-hidden {
|
|
43
|
+
overflow: hidden;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.space-between {
|
|
47
|
+
justify-content: space-between;
|
|
48
|
+
align-content: space-between;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
.space-around {
|
|
52
|
+
justify-content: space-around;
|
|
53
|
+
align-content: space-around;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.center {
|
|
57
|
+
text-align: center;
|
|
58
|
+
align-items: center;
|
|
59
|
+
align-content: center;
|
|
60
|
+
justify-items: center;
|
|
61
|
+
justify-content: center;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.center-vertical {
|
|
65
|
+
justify-content: center;
|
|
66
|
+
vertical-align: middle;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.left {
|
|
70
|
+
text-align: left;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
.small {
|
|
74
|
+
font-size: 75%;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
.container-host {
|
|
78
|
+
position: relative;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
.container-host > .container {
|
|
82
|
+
position: absolute !important;
|
|
83
|
+
top: 0;
|
|
84
|
+
left: 0;
|
|
85
|
+
bottom: 0;
|
|
86
|
+
right: 0;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.m-0, .mt-0, .my-0 {
|
|
90
|
+
margin-top: 0;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
.m-0, .ml-0, .mx-0 {
|
|
94
|
+
margin-left: 0;
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.m-0, .mb-0, .my-0 {
|
|
98
|
+
margin-bottom: 0;
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.m-0, .mr-0, .mx-0 {
|
|
102
|
+
margin-right: 0;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.p-0, .pt-0, .py-0 {
|
|
106
|
+
padding-top: 0;
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
.p-0, .pl-0, .px-0 {
|
|
110
|
+
padding-left: 0;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.p-0, .pb-0, .py-0 {
|
|
114
|
+
padding-bottom: 0;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
.p-0, .pr-0, .px-0 {
|
|
118
|
+
padding-right: 0;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
.m-1, .mt-1, .my-1 {
|
|
122
|
+
margin-top: @m-1;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
.m-1, .ml-1, .mx-1 {
|
|
126
|
+
margin-left: @m-1;
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
.m-1, .mb-1, .my-1 {
|
|
130
|
+
margin-bottom: @m-1;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
.m-1, .mr-1, .mx-1 {
|
|
134
|
+
margin-right: @m-1;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
.p-1, .pt-1, .py-1 {
|
|
138
|
+
padding-top: @m-1;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
.p-1, .pl-1, .px-1 {
|
|
142
|
+
padding-left: @m-1;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
.p-1, .pb-1, .py-1 {
|
|
146
|
+
padding-bottom: @m-1;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
.p-1, .pr-1, .px-1 {
|
|
150
|
+
padding-right: @m-1;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
.m-2, .mt-2, .my-2 {
|
|
154
|
+
margin-top: @m-2;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
.m-2, .ml-2, .mx-2 {
|
|
158
|
+
margin-left: @m-2;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
.m-2, .mb-2, .my-2 {
|
|
162
|
+
margin-bottom: @m-2;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.m-2, .mr-2, .mx-2 {
|
|
166
|
+
margin-right: @m-2;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
.p-2, .pt-2, .py-2 {
|
|
170
|
+
padding-top: @m-2;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.p-2, .pl-2, .px-2 {
|
|
174
|
+
padding-left: @m-2;
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.p-2, .pb-2, .py-2 {
|
|
178
|
+
padding-bottom: @m-2;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
.p-2, .pr-2, .px-2 {
|
|
182
|
+
padding-right: @m-2;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.m-3, .mt-3, .my-3 {
|
|
186
|
+
margin-top: @m-3;
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
.m-3, .ml-3, .mx-3 {
|
|
190
|
+
margin-left: @m-3;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
.m-3, .mb-3, .my-3 {
|
|
194
|
+
margin-bottom: @m-3;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.m-3, .mr-3, .mx-3 {
|
|
198
|
+
margin-right: @m-3;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.p-3, .pt-3, .py-3 {
|
|
202
|
+
padding-top: @m-3;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.p-3, .pl-3, .px-3 {
|
|
206
|
+
padding-left: @m-3;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.p-3, .pb-3, .py-3 {
|
|
210
|
+
padding-bottom: @m-3;
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
.p-3, .pr-3, .px-3 {
|
|
214
|
+
padding-right: @m-3;
|
|
215
|
+
}
|
package/style/style.less
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
const path = require('path');
|
|
2
|
+
const CopyWebpackPlugin = require('copy-webpack-plugin');
|
|
3
|
+
|
|
4
|
+
module.exports = {
|
|
5
|
+
mode: 'development',
|
|
6
|
+
entry: {
|
|
7
|
+
index: './index.js'
|
|
8
|
+
},
|
|
9
|
+
devtool: 'inline-source-map',
|
|
10
|
+
devServer: {
|
|
11
|
+
contentBase: './build',
|
|
12
|
+
port: 8000
|
|
13
|
+
},
|
|
14
|
+
plugins: [
|
|
15
|
+
|
|
16
|
+
new CopyWebpackPlugin({
|
|
17
|
+
patterns: [
|
|
18
|
+
{from: './index.html', to: ''}
|
|
19
|
+
]
|
|
20
|
+
})
|
|
21
|
+
|
|
22
|
+
],
|
|
23
|
+
output: {
|
|
24
|
+
filename: 'wgge.js',
|
|
25
|
+
path: path.resolve(__dirname, 'build'),
|
|
26
|
+
clean: true,
|
|
27
|
+
},
|
|
28
|
+
module: {}
|
|
29
|
+
};
|