brick-engine-js 1.0.5 → 1.0.7
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/dist/app.js +46 -123
- package/dist/app.js.map +1 -1
- package/dist/bootstrap.d.ts +0 -1
- package/dist/brick-engine.js +65 -182
- package/dist/brick-engine.js.map +1 -1
- package/dist/docs/GAME_DEVELOPER_GUIDE.html +1 -1
- package/dist/docs/brick-engine-guide.html +1 -1
- package/dist/docs/getting-started.html +1 -1
- package/dist/docs/jsdoc_standard.html +1 -1
- package/dist/docs/publishing.html +1 -1
- package/dist/docs/reference/interfaces/modules/Session.html +1 -1
- package/dist/docs/reference/modules/GameMenu.html +1 -1
- package/dist/docs/reference/modules/GameSession.html +1 -1
- package/dist/docs/reference/modules/InitialStateSnapshot.html +1 -1
- package/dist/docs/reference/modules/SessionModal.html +1 -1
- package/dist/docs/testing_best_practices.html +1 -1
- package/package.json +1 -1
- package/public/docs/GAME_DEVELOPER_GUIDE.html +1 -1
- package/public/docs/brick-engine-guide.html +1 -1
- package/public/docs/getting-started.html +1 -1
- package/public/docs/jsdoc_standard.html +1 -1
- package/public/docs/publishing.html +1 -1
- package/public/docs/reference/interfaces/modules/Session.html +1 -1
- package/public/docs/reference/modules/GameMenu.html +1 -1
- package/public/docs/reference/modules/GameSession.html +1 -1
- package/public/docs/reference/modules/InitialStateSnapshot.html +1 -1
- package/public/docs/reference/modules/SessionModal.html +1 -1
- package/public/docs/testing_best_practices.html +1 -1
- package/dist/config/styles.d.ts +0 -0
- package/dist/index.test.d.ts +0 -1
package/dist/bootstrap.d.ts
CHANGED
package/dist/brick-engine.js
CHANGED
|
@@ -9,129 +9,12 @@
|
|
|
9
9
|
root["BrickEngine"] = factory(root["p5"]);
|
|
10
10
|
})(self, (__WEBPACK_EXTERNAL_MODULE__991__) => {
|
|
11
11
|
return /******/ (() => { // webpackBootstrap
|
|
12
|
+
/******/ "use strict";
|
|
12
13
|
/******/ var __webpack_modules__ = ({
|
|
13
14
|
|
|
14
|
-
/***/ 902
|
|
15
|
-
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
16
|
-
|
|
17
|
-
"use strict";
|
|
18
|
-
__webpack_require__.r(__webpack_exports__);
|
|
19
|
-
// extracted by mini-css-extract-plugin
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
/***/ },
|
|
23
|
-
|
|
24
|
-
/***/ 35
|
|
25
|
-
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
26
|
-
|
|
27
|
-
"use strict";
|
|
28
|
-
__webpack_require__.r(__webpack_exports__);
|
|
29
|
-
// extracted by mini-css-extract-plugin
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
/***/ },
|
|
33
|
-
|
|
34
|
-
/***/ 287
|
|
35
|
-
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
36
|
-
|
|
37
|
-
"use strict";
|
|
38
|
-
__webpack_require__.r(__webpack_exports__);
|
|
39
|
-
// extracted by mini-css-extract-plugin
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
/***/ },
|
|
43
|
-
|
|
44
|
-
/***/ 949
|
|
45
|
-
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
46
|
-
|
|
47
|
-
"use strict";
|
|
48
|
-
__webpack_require__.r(__webpack_exports__);
|
|
49
|
-
// extracted by mini-css-extract-plugin
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
/***/ },
|
|
53
|
-
|
|
54
|
-
/***/ 545
|
|
55
|
-
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
56
|
-
|
|
57
|
-
"use strict";
|
|
58
|
-
__webpack_require__.r(__webpack_exports__);
|
|
59
|
-
// extracted by mini-css-extract-plugin
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
/***/ },
|
|
63
|
-
|
|
64
|
-
/***/ 623
|
|
65
|
-
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
66
|
-
|
|
67
|
-
"use strict";
|
|
68
|
-
__webpack_require__.r(__webpack_exports__);
|
|
69
|
-
// extracted by mini-css-extract-plugin
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
/***/ },
|
|
73
|
-
|
|
74
|
-
/***/ 839
|
|
75
|
-
(__unused_webpack_module, __webpack_exports__, __webpack_require__) {
|
|
76
|
-
|
|
77
|
-
"use strict";
|
|
78
|
-
__webpack_require__.r(__webpack_exports__);
|
|
79
|
-
// extracted by mini-css-extract-plugin
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
/***/ },
|
|
83
|
-
|
|
84
|
-
/***/ 257
|
|
85
|
-
(__unused_webpack_module, __unused_webpack_exports, __webpack_require__) {
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* Dynamically load all CSS files from the public/style directory.
|
|
89
|
-
* This allows Webpack to bundle them without needing explicit imports for each file.
|
|
90
|
-
*/
|
|
91
|
-
__webpack_require__(881);
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
/***/ },
|
|
95
|
-
|
|
96
|
-
/***/ 881
|
|
97
|
-
(module, __unused_webpack_exports, __webpack_require__) {
|
|
98
|
-
|
|
99
|
-
var map = {
|
|
100
|
-
"./body.css": 902,
|
|
101
|
-
"./buttons.css": 35,
|
|
102
|
-
"./debugger.css": 287,
|
|
103
|
-
"./sessionModal.css": 949,
|
|
104
|
-
"./sourceCodeAndCommands.css": 545,
|
|
105
|
-
"./splash.css": 623,
|
|
106
|
-
"./theme.css": 839
|
|
107
|
-
};
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
function webpackContext(req) {
|
|
111
|
-
var id = webpackContextResolve(req);
|
|
112
|
-
return __webpack_require__(id);
|
|
113
|
-
}
|
|
114
|
-
function webpackContextResolve(req) {
|
|
115
|
-
if(!__webpack_require__.o(map, req)) {
|
|
116
|
-
var e = new Error("Cannot find module '" + req + "'");
|
|
117
|
-
e.code = 'MODULE_NOT_FOUND';
|
|
118
|
-
throw e;
|
|
119
|
-
}
|
|
120
|
-
return map[req];
|
|
121
|
-
}
|
|
122
|
-
webpackContext.keys = function webpackContextKeys() {
|
|
123
|
-
return Object.keys(map);
|
|
124
|
-
};
|
|
125
|
-
webpackContext.resolve = webpackContextResolve;
|
|
126
|
-
module.exports = webpackContext;
|
|
127
|
-
webpackContext.id = 881;
|
|
128
|
-
|
|
129
|
-
/***/ },
|
|
130
|
-
|
|
131
15
|
/***/ 991
|
|
132
16
|
(module) {
|
|
133
17
|
|
|
134
|
-
"use strict";
|
|
135
18
|
module.exports = __WEBPACK_EXTERNAL_MODULE__991__;
|
|
136
19
|
|
|
137
20
|
/***/ }
|
|
@@ -163,35 +46,6 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__991__;
|
|
|
163
46
|
/******/ }
|
|
164
47
|
/******/
|
|
165
48
|
/************************************************************************/
|
|
166
|
-
/******/ /* webpack/runtime/compat get default export */
|
|
167
|
-
/******/ (() => {
|
|
168
|
-
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
169
|
-
/******/ __webpack_require__.n = (module) => {
|
|
170
|
-
/******/ var getter = module && module.__esModule ?
|
|
171
|
-
/******/ () => (module['default']) :
|
|
172
|
-
/******/ () => (module);
|
|
173
|
-
/******/ __webpack_require__.d(getter, { a: getter });
|
|
174
|
-
/******/ return getter;
|
|
175
|
-
/******/ };
|
|
176
|
-
/******/ })();
|
|
177
|
-
/******/
|
|
178
|
-
/******/ /* webpack/runtime/define property getters */
|
|
179
|
-
/******/ (() => {
|
|
180
|
-
/******/ // define getter functions for harmony exports
|
|
181
|
-
/******/ __webpack_require__.d = (exports, definition) => {
|
|
182
|
-
/******/ for(var key in definition) {
|
|
183
|
-
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
184
|
-
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
185
|
-
/******/ }
|
|
186
|
-
/******/ }
|
|
187
|
-
/******/ };
|
|
188
|
-
/******/ })();
|
|
189
|
-
/******/
|
|
190
|
-
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
191
|
-
/******/ (() => {
|
|
192
|
-
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
193
|
-
/******/ })();
|
|
194
|
-
/******/
|
|
195
49
|
/******/ /* webpack/runtime/make namespace object */
|
|
196
50
|
/******/ (() => {
|
|
197
51
|
/******/ // define __esModule on exports
|
|
@@ -205,27 +59,10 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__991__;
|
|
|
205
59
|
/******/
|
|
206
60
|
/************************************************************************/
|
|
207
61
|
var __webpack_exports__ = {};
|
|
208
|
-
// This entry needs to be wrapped in an IIFE because it needs to be
|
|
62
|
+
// This entry needs to be wrapped in an IIFE because it needs to be isolated against other entry modules.
|
|
209
63
|
(() => {
|
|
210
|
-
"use strict";
|
|
211
|
-
// ESM COMPAT FLAG
|
|
212
|
-
__webpack_require__.r(__webpack_exports__);
|
|
213
64
|
|
|
214
|
-
// EXPORTS
|
|
215
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
216
|
-
Color: () => (/* reexport */ Color),
|
|
217
|
-
ControlEventType: () => (/* reexport */ ControlEventType),
|
|
218
|
-
ControlKey: () => (/* reexport */ ControlKey),
|
|
219
|
-
FontAlign: () => (/* reexport */ FontAlign),
|
|
220
|
-
FontSize: () => (/* reexport */ FontSize),
|
|
221
|
-
FontVerticalAlign: () => (/* reexport */ FontVerticalAlign),
|
|
222
|
-
Game: () => (/* reexport */ core_Game),
|
|
223
|
-
GameView: () => (/* reexport */ view_GameView),
|
|
224
|
-
Sound: () => (/* reexport */ Sound),
|
|
225
|
-
StateProperty: () => (/* reexport */ StateProperty),
|
|
226
|
-
bootstrap: () => (/* reexport */ bootstrap),
|
|
227
|
-
configs: () => (/* reexport */ configs)
|
|
228
|
-
});
|
|
65
|
+
// UNUSED EXPORTS: Color, ControlEventType, ControlKey, FontAlign, FontSize, FontVerticalAlign, Game, GameView, Sound, StateProperty, bootstrap, configs
|
|
229
66
|
|
|
230
67
|
;// ./src/core/types/enums.ts
|
|
231
68
|
/**
|
|
@@ -4588,11 +4425,10 @@ var GameView = /** @class */ (function () {
|
|
|
4588
4425
|
};
|
|
4589
4426
|
return GameView;
|
|
4590
4427
|
}());
|
|
4591
|
-
/* harmony default export */ const view_GameView = (GameView);
|
|
4428
|
+
/* harmony default export */ const view_GameView = ((/* unused pure expression or super */ null && (GameView)));
|
|
4592
4429
|
|
|
4593
4430
|
// EXTERNAL MODULE: external "p5"
|
|
4594
4431
|
var external_p5_ = __webpack_require__(991);
|
|
4595
|
-
var external_p5_default = /*#__PURE__*/__webpack_require__.n(external_p5_);
|
|
4596
4432
|
;// ./src/menu/GameRepository.ts
|
|
4597
4433
|
var GameRepository_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
4598
4434
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
@@ -4902,10 +4738,8 @@ var GameMenu = /** @class */ (function (_super) {
|
|
|
4902
4738
|
};
|
|
4903
4739
|
return GameMenu;
|
|
4904
4740
|
}(core_Game));
|
|
4905
|
-
/* harmony default export */ const menu_GameMenu = (GameMenu);
|
|
4741
|
+
/* harmony default export */ const menu_GameMenu = ((/* unused pure expression or super */ null && (GameMenu)));
|
|
4906
4742
|
|
|
4907
|
-
// EXTERNAL MODULE: ./src/config/styles.ts
|
|
4908
|
-
var styles = __webpack_require__(257);
|
|
4909
4743
|
;// ./src/menu/GameMenuSingleton.ts
|
|
4910
4744
|
/**
|
|
4911
4745
|
* Singleton manager for the Game Menu instance.
|
|
@@ -4943,10 +4777,15 @@ var GameMenuSingleton = /** @class */ (function () {
|
|
|
4943
4777
|
};
|
|
4944
4778
|
return GameMenuSingleton;
|
|
4945
4779
|
}());
|
|
4946
|
-
/* harmony default export */ const menu_GameMenuSingleton = (GameMenuSingleton);
|
|
4780
|
+
/* harmony default export */ const menu_GameMenuSingleton = ((/* unused pure expression or super */ null && (GameMenuSingleton)));
|
|
4947
4781
|
|
|
4948
4782
|
;// ./src/bootstrap.ts
|
|
4949
|
-
|
|
4783
|
+
/* unused harmony import specifier */ var p5;
|
|
4784
|
+
/* unused harmony import specifier */ var bootstrap_GameView;
|
|
4785
|
+
/* unused harmony import specifier */ var bootstrap_GameMenu;
|
|
4786
|
+
/* unused harmony import specifier */ var bootstrap_ControlKey;
|
|
4787
|
+
/* unused harmony import specifier */ var bootstrap_ControlEventType;
|
|
4788
|
+
/* unused harmony import specifier */ var bootstrap_GameMenuSingleton;
|
|
4950
4789
|
|
|
4951
4790
|
|
|
4952
4791
|
|
|
@@ -4978,12 +4817,12 @@ var _switchHandler = function (newGame) {
|
|
|
4978
4817
|
newGame.view.bindControls(control);
|
|
4979
4818
|
state_1.turnOn();
|
|
4980
4819
|
// Setup exit and power buttons
|
|
4981
|
-
if (
|
|
4982
|
-
control.subscribe(
|
|
4983
|
-
newGame.switchGame(
|
|
4820
|
+
if (bootstrap_GameMenuSingleton.hasInstance() && newGame !== bootstrap_GameMenuSingleton.getInstance()) {
|
|
4821
|
+
control.subscribe(bootstrap_ControlKey.EXIT, bootstrap_ControlEventType.PRESSED, function () {
|
|
4822
|
+
newGame.switchGame(bootstrap_GameMenuSingleton.getInstance());
|
|
4984
4823
|
});
|
|
4985
|
-
control.subscribe(
|
|
4986
|
-
newGame.switchGame(
|
|
4824
|
+
control.subscribe(bootstrap_ControlKey.POWER, bootstrap_ControlEventType.PRESSED, function () {
|
|
4825
|
+
newGame.switchGame(bootstrap_GameMenuSingleton.getInstance());
|
|
4987
4826
|
state_1.turnOff();
|
|
4988
4827
|
});
|
|
4989
4828
|
}
|
|
@@ -5004,12 +4843,13 @@ var _switchHandler = function (newGame) {
|
|
|
5004
4843
|
* @returns {p5} The p5 instance.
|
|
5005
4844
|
*/
|
|
5006
4845
|
function bootstrap(ClientGame) {
|
|
5007
|
-
|
|
4846
|
+
window.BrickEngineGame = ClientGame;
|
|
4847
|
+
return new p5(function (p) {
|
|
5008
4848
|
_p = p;
|
|
5009
|
-
var view = new
|
|
5010
|
-
if (ClientGame ===
|
|
4849
|
+
var view = new bootstrap_GameView(p, document.body);
|
|
4850
|
+
if (ClientGame === bootstrap_GameMenu) {
|
|
5011
4851
|
_game = new ClientGame(p, view);
|
|
5012
|
-
|
|
4852
|
+
bootstrap_GameMenuSingleton.setInstance(_game);
|
|
5013
4853
|
}
|
|
5014
4854
|
else {
|
|
5015
4855
|
_game = new ClientGame(p, view);
|
|
@@ -5039,6 +4879,49 @@ function bootstrap(ClientGame) {
|
|
|
5039
4879
|
|
|
5040
4880
|
|
|
5041
4881
|
|
|
4882
|
+
})();
|
|
4883
|
+
|
|
4884
|
+
// This entry needs to be wrapped in an IIFE because it needs to be isolated against other entry modules.
|
|
4885
|
+
(() => {
|
|
4886
|
+
// extracted by mini-css-extract-plugin
|
|
4887
|
+
|
|
4888
|
+
})();
|
|
4889
|
+
|
|
4890
|
+
// This entry needs to be wrapped in an IIFE because it needs to be isolated against other entry modules.
|
|
4891
|
+
(() => {
|
|
4892
|
+
// extracted by mini-css-extract-plugin
|
|
4893
|
+
|
|
4894
|
+
})();
|
|
4895
|
+
|
|
4896
|
+
// This entry needs to be wrapped in an IIFE because it needs to be isolated against other entry modules.
|
|
4897
|
+
(() => {
|
|
4898
|
+
// extracted by mini-css-extract-plugin
|
|
4899
|
+
|
|
4900
|
+
})();
|
|
4901
|
+
|
|
4902
|
+
// This entry needs to be wrapped in an IIFE because it needs to be isolated against other entry modules.
|
|
4903
|
+
(() => {
|
|
4904
|
+
// extracted by mini-css-extract-plugin
|
|
4905
|
+
|
|
4906
|
+
})();
|
|
4907
|
+
|
|
4908
|
+
// This entry needs to be wrapped in an IIFE because it needs to be isolated against other entry modules.
|
|
4909
|
+
(() => {
|
|
4910
|
+
// extracted by mini-css-extract-plugin
|
|
4911
|
+
|
|
4912
|
+
})();
|
|
4913
|
+
|
|
4914
|
+
// This entry needs to be wrapped in an IIFE because it needs to be isolated against other entry modules.
|
|
4915
|
+
(() => {
|
|
4916
|
+
// extracted by mini-css-extract-plugin
|
|
4917
|
+
|
|
4918
|
+
})();
|
|
4919
|
+
|
|
4920
|
+
// This entry needs to be wrapped in an IIFE because it needs to be isolated against other entry modules.
|
|
4921
|
+
(() => {
|
|
4922
|
+
__webpack_require__.r(__webpack_exports__);
|
|
4923
|
+
// extracted by mini-css-extract-plugin
|
|
4924
|
+
|
|
5042
4925
|
})();
|
|
5043
4926
|
|
|
5044
4927
|
/******/ return __webpack_exports__;
|