brick-engine-js 1.0.6 → 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 -126
- package/dist/app.js.map +1 -1
- package/dist/brick-engine.js +65 -185
- 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/brick-engine.js
CHANGED
|
@@ -9,132 +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
|
-
/***/ 881
|
|
85
|
-
(module, __unused_webpack_exports, __webpack_require__) {
|
|
86
|
-
|
|
87
|
-
var map = {
|
|
88
|
-
"./body.css": 902,
|
|
89
|
-
"./buttons.css": 35,
|
|
90
|
-
"./debugger.css": 287,
|
|
91
|
-
"./sessionModal.css": 949,
|
|
92
|
-
"./sourceCodeAndCommands.css": 545,
|
|
93
|
-
"./splash.css": 623,
|
|
94
|
-
"./theme.css": 839
|
|
95
|
-
};
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
function webpackContext(req) {
|
|
99
|
-
var id = webpackContextResolve(req);
|
|
100
|
-
return __webpack_require__(id);
|
|
101
|
-
}
|
|
102
|
-
function webpackContextResolve(req) {
|
|
103
|
-
if(!__webpack_require__.o(map, req)) {
|
|
104
|
-
var e = new Error("Cannot find module '" + req + "'");
|
|
105
|
-
e.code = 'MODULE_NOT_FOUND';
|
|
106
|
-
throw e;
|
|
107
|
-
}
|
|
108
|
-
return map[req];
|
|
109
|
-
}
|
|
110
|
-
webpackContext.keys = function webpackContextKeys() {
|
|
111
|
-
return Object.keys(map);
|
|
112
|
-
};
|
|
113
|
-
webpackContext.resolve = webpackContextResolve;
|
|
114
|
-
module.exports = webpackContext;
|
|
115
|
-
webpackContext.id = 881;
|
|
116
|
-
|
|
117
|
-
/***/ },
|
|
118
|
-
|
|
119
|
-
/***/ 589
|
|
120
|
-
(module) {
|
|
121
|
-
|
|
122
|
-
function webpackEmptyContext(req) {
|
|
123
|
-
var e = new Error("Cannot find module '" + req + "'");
|
|
124
|
-
e.code = 'MODULE_NOT_FOUND';
|
|
125
|
-
throw e;
|
|
126
|
-
}
|
|
127
|
-
webpackEmptyContext.keys = () => ([]);
|
|
128
|
-
webpackEmptyContext.resolve = webpackEmptyContext;
|
|
129
|
-
webpackEmptyContext.id = 589;
|
|
130
|
-
module.exports = webpackEmptyContext;
|
|
131
|
-
|
|
132
|
-
/***/ },
|
|
133
|
-
|
|
134
15
|
/***/ 991
|
|
135
16
|
(module) {
|
|
136
17
|
|
|
137
|
-
"use strict";
|
|
138
18
|
module.exports = __WEBPACK_EXTERNAL_MODULE__991__;
|
|
139
19
|
|
|
140
20
|
/***/ }
|
|
@@ -166,35 +46,6 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__991__;
|
|
|
166
46
|
/******/ }
|
|
167
47
|
/******/
|
|
168
48
|
/************************************************************************/
|
|
169
|
-
/******/ /* webpack/runtime/compat get default export */
|
|
170
|
-
/******/ (() => {
|
|
171
|
-
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
|
172
|
-
/******/ __webpack_require__.n = (module) => {
|
|
173
|
-
/******/ var getter = module && module.__esModule ?
|
|
174
|
-
/******/ () => (module['default']) :
|
|
175
|
-
/******/ () => (module);
|
|
176
|
-
/******/ __webpack_require__.d(getter, { a: getter });
|
|
177
|
-
/******/ return getter;
|
|
178
|
-
/******/ };
|
|
179
|
-
/******/ })();
|
|
180
|
-
/******/
|
|
181
|
-
/******/ /* webpack/runtime/define property getters */
|
|
182
|
-
/******/ (() => {
|
|
183
|
-
/******/ // define getter functions for harmony exports
|
|
184
|
-
/******/ __webpack_require__.d = (exports, definition) => {
|
|
185
|
-
/******/ for(var key in definition) {
|
|
186
|
-
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
187
|
-
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
188
|
-
/******/ }
|
|
189
|
-
/******/ }
|
|
190
|
-
/******/ };
|
|
191
|
-
/******/ })();
|
|
192
|
-
/******/
|
|
193
|
-
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
|
194
|
-
/******/ (() => {
|
|
195
|
-
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
196
|
-
/******/ })();
|
|
197
|
-
/******/
|
|
198
49
|
/******/ /* webpack/runtime/make namespace object */
|
|
199
50
|
/******/ (() => {
|
|
200
51
|
/******/ // define __esModule on exports
|
|
@@ -208,27 +59,10 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__991__;
|
|
|
208
59
|
/******/
|
|
209
60
|
/************************************************************************/
|
|
210
61
|
var __webpack_exports__ = {};
|
|
211
|
-
// 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.
|
|
212
63
|
(() => {
|
|
213
|
-
"use strict";
|
|
214
|
-
// ESM COMPAT FLAG
|
|
215
|
-
__webpack_require__.r(__webpack_exports__);
|
|
216
64
|
|
|
217
|
-
// EXPORTS
|
|
218
|
-
__webpack_require__.d(__webpack_exports__, {
|
|
219
|
-
Color: () => (/* reexport */ Color),
|
|
220
|
-
ControlEventType: () => (/* reexport */ ControlEventType),
|
|
221
|
-
ControlKey: () => (/* reexport */ ControlKey),
|
|
222
|
-
FontAlign: () => (/* reexport */ FontAlign),
|
|
223
|
-
FontSize: () => (/* reexport */ FontSize),
|
|
224
|
-
FontVerticalAlign: () => (/* reexport */ FontVerticalAlign),
|
|
225
|
-
Game: () => (/* reexport */ core_Game),
|
|
226
|
-
GameView: () => (/* reexport */ view_GameView),
|
|
227
|
-
Sound: () => (/* reexport */ Sound),
|
|
228
|
-
StateProperty: () => (/* reexport */ StateProperty),
|
|
229
|
-
bootstrap: () => (/* reexport */ bootstrap),
|
|
230
|
-
configs: () => (/* reexport */ configs)
|
|
231
|
-
});
|
|
65
|
+
// UNUSED EXPORTS: Color, ControlEventType, ControlKey, FontAlign, FontSize, FontVerticalAlign, Game, GameView, Sound, StateProperty, bootstrap, configs
|
|
232
66
|
|
|
233
67
|
;// ./src/core/types/enums.ts
|
|
234
68
|
/**
|
|
@@ -4591,11 +4425,10 @@ var GameView = /** @class */ (function () {
|
|
|
4591
4425
|
};
|
|
4592
4426
|
return GameView;
|
|
4593
4427
|
}());
|
|
4594
|
-
/* harmony default export */ const view_GameView = (GameView);
|
|
4428
|
+
/* harmony default export */ const view_GameView = ((/* unused pure expression or super */ null && (GameView)));
|
|
4595
4429
|
|
|
4596
4430
|
// EXTERNAL MODULE: external "p5"
|
|
4597
4431
|
var external_p5_ = __webpack_require__(991);
|
|
4598
|
-
var external_p5_default = /*#__PURE__*/__webpack_require__.n(external_p5_);
|
|
4599
4432
|
;// ./src/menu/GameRepository.ts
|
|
4600
4433
|
var GameRepository_awaiter = (undefined && undefined.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
4601
4434
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
@@ -4905,7 +4738,7 @@ var GameMenu = /** @class */ (function (_super) {
|
|
|
4905
4738
|
};
|
|
4906
4739
|
return GameMenu;
|
|
4907
4740
|
}(core_Game));
|
|
4908
|
-
/* harmony default export */ const menu_GameMenu = (GameMenu);
|
|
4741
|
+
/* harmony default export */ const menu_GameMenu = ((/* unused pure expression or super */ null && (GameMenu)));
|
|
4909
4742
|
|
|
4910
4743
|
;// ./src/menu/GameMenuSingleton.ts
|
|
4911
4744
|
/**
|
|
@@ -4944,9 +4777,15 @@ var GameMenuSingleton = /** @class */ (function () {
|
|
|
4944
4777
|
};
|
|
4945
4778
|
return GameMenuSingleton;
|
|
4946
4779
|
}());
|
|
4947
|
-
/* harmony default export */ const menu_GameMenuSingleton = (GameMenuSingleton);
|
|
4780
|
+
/* harmony default export */ const menu_GameMenuSingleton = ((/* unused pure expression or super */ null && (GameMenuSingleton)));
|
|
4948
4781
|
|
|
4949
4782
|
;// ./src/bootstrap.ts
|
|
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,15 +4843,13 @@ var _switchHandler = function (newGame) {
|
|
|
5004
4843
|
* @returns {p5} The p5 instance.
|
|
5005
4844
|
*/
|
|
5006
4845
|
function bootstrap(ClientGame) {
|
|
5007
|
-
|
|
5008
|
-
|
|
5009
|
-
}
|
|
5010
|
-
return new (external_p5_default())(function (p) {
|
|
4846
|
+
window.BrickEngineGame = ClientGame;
|
|
4847
|
+
return new p5(function (p) {
|
|
5011
4848
|
_p = p;
|
|
5012
|
-
var view = new
|
|
5013
|
-
if (ClientGame ===
|
|
4849
|
+
var view = new bootstrap_GameView(p, document.body);
|
|
4850
|
+
if (ClientGame === bootstrap_GameMenu) {
|
|
5014
4851
|
_game = new ClientGame(p, view);
|
|
5015
|
-
|
|
4852
|
+
bootstrap_GameMenuSingleton.setInstance(_game);
|
|
5016
4853
|
}
|
|
5017
4854
|
else {
|
|
5018
4855
|
_game = new ClientGame(p, view);
|
|
@@ -5042,6 +4879,49 @@ function bootstrap(ClientGame) {
|
|
|
5042
4879
|
|
|
5043
4880
|
|
|
5044
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
|
+
|
|
5045
4925
|
})();
|
|
5046
4926
|
|
|
5047
4927
|
/******/ return __webpack_exports__;
|