brick-engine-js 1.0.22 → 1.0.23
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/README.adoc +2 -2
- package/dist/docs/index.html +3 -3
- package/dist/docs/jsdoc_standard.html +30 -13
- package/dist/docs/reference/bootstrap.html +556 -0
- package/dist/docs/reference/context/RendererContext.html +19 -9
- package/dist/docs/reference/enums/Color.html +11 -5
- package/dist/docs/reference/enums/ControlEventType.html +7 -5
- package/dist/docs/reference/enums/ControlKey.html +7 -5
- package/dist/docs/reference/enums/EventSuffix.html +7 -5
- package/dist/docs/reference/enums/FontAlignment.html +9 -7
- package/dist/docs/reference/enums/FontSize.html +7 -5
- package/dist/docs/reference/enums/Sound.html +7 -5
- package/dist/docs/reference/enums/StateProperty.html +7 -5
- package/dist/docs/reference/helpers/CellHelper.html +6 -2
- package/dist/docs/reference/helpers/ControlInputHandlerHelper.html +9 -5
- package/dist/docs/reference/helpers/CoordinateHelper.html +14 -10
- package/dist/docs/reference/helpers/RelativeValuesHelper.html +7 -3
- package/dist/docs/reference/interfaces/Debuggable.html +9 -7
- package/dist/docs/reference/interfaces/GameModules.html +7 -5
- package/dist/docs/reference/interfaces/Initializable.html +9 -7
- package/dist/docs/reference/interfaces/RendererInitializable.html +9 -7
- package/dist/docs/reference/interfaces/StateContext.html +7 -5
- package/dist/docs/reference/interfaces/StateSyncable.html +11 -9
- package/dist/docs/reference/interfaces/modules/Control.html +19 -17
- package/dist/docs/reference/interfaces/modules/Grid.html +77 -55
- package/dist/docs/reference/interfaces/modules/Renderer.html +9 -7
- package/dist/docs/reference/interfaces/modules/RendererComposite.html +13 -11
- package/dist/docs/reference/interfaces/modules/Score.html +21 -19
- package/dist/docs/reference/interfaces/modules/Session.html +64 -18
- package/dist/docs/reference/interfaces/modules/State.html +59 -57
- package/dist/docs/reference/interfaces/modules/Text.html +21 -19
- package/dist/docs/reference/interfaces/modules/Time.html +80 -24
- package/dist/docs/reference/modules/Debugger.html +16 -14
- package/dist/docs/reference/modules/DisplayRenderer.html +10 -8
- package/dist/docs/reference/modules/EventEmitter.html +34 -26
- package/dist/docs/reference/modules/Game.html +55 -30
- package/dist/docs/reference/modules/GameControl.html +49 -44
- package/dist/docs/reference/modules/GameEventRegistry.html +17 -34
- package/dist/docs/reference/modules/GameGrid.html +174 -116
- package/dist/docs/reference/modules/GameHudGrid.html +10 -8
- package/dist/docs/reference/modules/GameRenderer.html +14 -12
- package/dist/docs/reference/modules/GameScore.html +36 -34
- package/dist/docs/reference/modules/GameSession.html +37 -19
- package/dist/docs/reference/modules/GameSound.html +20 -18
- package/dist/docs/reference/modules/GameState.html +70 -68
- package/dist/docs/reference/modules/GameText.html +29 -27
- package/dist/docs/reference/modules/GameTime.html +98 -30
- package/dist/docs/reference/modules/HudRenderer.html +10 -8
- package/dist/docs/reference/modules/InitialStateSnapshot.html +13 -11
- package/dist/docs/reference/modules/SessionModal.html +11 -9
- package/dist/docs/reference/types/Axis.html +7 -5
- package/dist/docs/reference/types/Cell.html +7 -5
- package/dist/docs/reference/types/ControlCallback.html +7 -5
- package/dist/docs/reference/types/Coordinate.html +7 -5
- package/dist/docs/reference/types/GameEvent.html +7 -5
- package/dist/docs/reference/types/Piece.html +7 -5
- package/dist/docs/reference/types/RendererMetrics.html +7 -5
- package/dist/docs/reference/types/Vector.html +7 -5
- package/dist/docs/reference/view/GameView.html +29 -21
- package/dist/docs/testing_best_practices.html +2 -2
- package/dist/game.bundle.js +1 -1
- package/dist/types/bootstrap.d.ts +12 -11
- package/dist/types/core/Game.d.ts +46 -39
- package/dist/types/core/InitialStateSnapshot.d.ts +18 -6
- package/dist/types/core/context/RendererContext.d.ts +32 -10
- package/dist/types/core/event/EventEmitter.d.ts +64 -21
- package/dist/types/core/event/GameEventRegistry.d.ts +17 -3
- package/dist/types/core/helpers/CellHelper.d.ts +11 -4
- package/dist/types/core/helpers/ControlInputHandlerHelper.d.ts +20 -11
- package/dist/types/core/helpers/CoordinateHelper.d.ts +28 -23
- package/dist/types/core/helpers/InterfaceIdentifierHelper.d.ts +34 -0
- package/dist/types/core/helpers/RelativeValuesHelper.d.ts +10 -8
- package/dist/types/core/module/control/GameControl.d.ts +26 -14
- package/dist/types/core/module/grid/GameGrid.d.ts +68 -53
- package/dist/types/core/module/grid/GameHudGrid.d.ts +9 -7
- package/dist/types/core/module/grid/engines/GridAnalysisEngine.d.ts +25 -6
- package/dist/types/core/module/grid/engines/GridLineEngine.d.ts +51 -13
- package/dist/types/core/module/grid/engines/GridMovementEngine.d.ts +97 -13
- package/dist/types/core/module/grid/engines/GridRegionEngine.d.ts +24 -5
- package/dist/types/core/module/grid/engines/GridTransformEngine.d.ts +21 -5
- package/dist/types/core/module/renderer/DisplayRenderer.d.ts +27 -15
- package/dist/types/core/module/renderer/GameRenderer.d.ts +20 -13
- package/dist/types/core/module/renderer/HudRenderer.d.ts +27 -19
- package/dist/types/core/module/score/GameScore.d.ts +29 -18
- package/dist/types/core/module/session/GameSession.d.ts +56 -0
- package/dist/types/core/module/sound/GameSound.d.ts +39 -23
- package/dist/types/core/module/state/GameState.d.ts +38 -14
- package/dist/types/core/module/text/GameText.d.ts +40 -25
- package/dist/types/core/module/time/GameTime.d.ts +23 -10
- package/dist/types/core/types/Interfaces.d.ts +15 -0
- package/dist/types/core/types/Types.d.ts +1 -0
- package/dist/types/core/types/enums.d.ts +2 -1
- package/dist/types/core/types/modules.d.ts +193 -43
- package/dist/types/view/Debugger.d.ts +23 -0
- package/dist/types/view/GameView.d.ts +44 -27
- package/dist/types/view/SessionModal.d.ts +24 -0
- package/package.json +1 -1
- package/dist/CNAME +0 -1
|
@@ -1,10 +1,33 @@
|
|
|
1
1
|
import { Initializable } from '../core/types/Interfaces';
|
|
2
2
|
import { GameModules } from '../core/types/Types';
|
|
3
|
+
/**
|
|
4
|
+
* Specialized DOM overlay for runtime system inspection outside Canvas contexts.
|
|
5
|
+
*
|
|
6
|
+
* Implements the {@link Initializable} lifecycle pattern. Automatically binds
|
|
7
|
+
* to dynamic engine states injecting strictly formatted HTML strings aggregating
|
|
8
|
+
* whatever data active developers pipe through `getDebugData`.
|
|
9
|
+
*/
|
|
3
10
|
export default class NewDebugger implements Initializable {
|
|
4
11
|
private _gameModules;
|
|
5
12
|
private _moduleElements;
|
|
6
13
|
constructor(gameModules: GameModules);
|
|
14
|
+
/**
|
|
15
|
+
* Generates and mounts the initial technical read-outs strictly if `configs` allow it.
|
|
16
|
+
*
|
|
17
|
+
* @returns {void} Returns nothing.
|
|
18
|
+
*/
|
|
7
19
|
setup(): void;
|
|
20
|
+
/**
|
|
21
|
+
* Hotswaps the array of objects queried by the debugging module during execution.
|
|
22
|
+
*
|
|
23
|
+
* @param {GameModules} gameModules - The new collection overriding current tracking configurations.
|
|
24
|
+
* @returns {void} Returns nothing.
|
|
25
|
+
*/
|
|
8
26
|
setGameModules(gameModules: GameModules): void;
|
|
27
|
+
/**
|
|
28
|
+
* Executes the rapid frame translation pasting mapped numbers and string states into browser Text Nodes.
|
|
29
|
+
*
|
|
30
|
+
* @returns {void} Returns nothing.
|
|
31
|
+
*/
|
|
9
32
|
update(): void;
|
|
10
33
|
}
|
|
@@ -2,12 +2,11 @@ import p5 from 'p5';
|
|
|
2
2
|
import { Control } from '../core/types/modules';
|
|
3
3
|
import { GameModules } from '../core/types/Types';
|
|
4
4
|
/**
|
|
5
|
-
*
|
|
5
|
+
* Central UI module bridging logical game states to responsive DOM elements.
|
|
6
6
|
*
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* @class
|
|
7
|
+
* It serves as the single source of truth for the HTML structure, mapping physical user clicks
|
|
8
|
+
* safely down into Engine abstraction events. By orchestrating everything from Canvas instantiation
|
|
9
|
+
* to system Menus, it ensures strictly isolated interactions between the browser window and core logic.
|
|
11
10
|
*/
|
|
12
11
|
export default class GameView {
|
|
13
12
|
private _onOffBtn;
|
|
@@ -27,15 +26,15 @@ export default class GameView {
|
|
|
27
26
|
private _debugger;
|
|
28
27
|
private _sessionModal;
|
|
29
28
|
/**
|
|
30
|
-
*
|
|
29
|
+
* Bootstraps the root listener binding it to a persistent layout container.
|
|
31
30
|
*
|
|
32
|
-
* @param
|
|
33
|
-
* @param parent - The DOM element where the game view will be attached.
|
|
31
|
+
* @param {HTMLElement} parent - The DOM element where the game view will be attached.
|
|
34
32
|
*/
|
|
35
33
|
constructor(parent: HTMLElement);
|
|
36
34
|
/**
|
|
37
|
-
*
|
|
38
|
-
*
|
|
35
|
+
* Verifies if the physical Canvas context has successfully mounted into the Document structure.
|
|
36
|
+
*
|
|
37
|
+
* @returns {boolean} True if the game body has been built, false otherwise.
|
|
39
38
|
*/
|
|
40
39
|
isBodyBuilt(): boolean;
|
|
41
40
|
/**
|
|
@@ -54,47 +53,65 @@ export default class GameView {
|
|
|
54
53
|
canvasHeight: number;
|
|
55
54
|
};
|
|
56
55
|
/**
|
|
57
|
-
*
|
|
58
|
-
*
|
|
56
|
+
* Injects the strictly structured overlay handling interrupted restoration flows.
|
|
57
|
+
*
|
|
58
|
+
* @returns {void} Returns nothing.
|
|
59
59
|
*/
|
|
60
60
|
setupSessionModal(): void;
|
|
61
|
+
/**
|
|
62
|
+
* Invokes the blocking popup intercepting control until the User forces a choice.
|
|
63
|
+
*
|
|
64
|
+
* @param {function(): void} onConfirm - The mapped execution sequence if the dialog is accepted.
|
|
65
|
+
* @param {function(): void} onCancel - The mapped execution sequence if the dialog is declined.
|
|
66
|
+
* @returns {void} Returns nothing.
|
|
67
|
+
*/
|
|
61
68
|
showSessionModal(onConfirm: () => void, onCancel: () => void): void;
|
|
62
69
|
/**
|
|
63
|
-
*
|
|
64
|
-
*
|
|
70
|
+
* Instantiates the technical UI diagnostics tool aggregating dynamic execution values into the DOM.
|
|
71
|
+
*
|
|
72
|
+
* @param {GameModules} gameModules - The specific suite of active modules evaluated by pointers.
|
|
73
|
+
* @returns {void} Returns nothing.
|
|
65
74
|
*/
|
|
66
75
|
setupDebugger(gameModules: GameModules): void;
|
|
76
|
+
/**
|
|
77
|
+
* Points the tracked overlay values dynamically onto a newly injected module configuration suite.
|
|
78
|
+
*
|
|
79
|
+
* @param {GameModules} gameModules - The collection of logically active states swapping contexts.
|
|
80
|
+
* @returns {void} Returns nothing.
|
|
81
|
+
*/
|
|
67
82
|
updateDebuggerGameModules(gameModules: GameModules): void;
|
|
68
83
|
/**
|
|
69
|
-
*
|
|
84
|
+
* Forces an execution cycle translating the latest internal module variables to the DOM interface.
|
|
85
|
+
*
|
|
86
|
+
* @returns {void} Returns nothing.
|
|
70
87
|
*/
|
|
71
88
|
updateDebugger(): void;
|
|
72
89
|
/**
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
* Connects click and hold events from the UI buttons to the game logic controllers.
|
|
90
|
+
* Traps all specific DOM elements mapping pointer and mouse events directly down to engine triggers.
|
|
76
91
|
*
|
|
77
|
-
* @param control - The
|
|
92
|
+
* @param {Control} control - The active translation gateway reading raw clicks.
|
|
93
|
+
* @returns {void} Returns nothing.
|
|
78
94
|
*/
|
|
79
95
|
bindControls(control: Control): void;
|
|
80
96
|
/**
|
|
81
|
-
*
|
|
97
|
+
* Safely disengages all listeners destroying pointer mappings across all buttons.
|
|
82
98
|
*
|
|
83
|
-
*
|
|
84
|
-
* (e.g., when the game is paused or stopped).
|
|
99
|
+
* @returns {void} Returns nothing.
|
|
85
100
|
*/
|
|
86
101
|
unbindControls(): void;
|
|
87
102
|
/**
|
|
88
|
-
* Helper
|
|
103
|
+
* Helper injecting standard up/down polling loops directly onto native elements safely.
|
|
89
104
|
*
|
|
90
|
-
* @param btn - The
|
|
91
|
-
* @param key - The
|
|
105
|
+
* @param {p5.Element} btn - The specific HTML reference targeted.
|
|
106
|
+
* @param {ControlKey} key - The enumerated alias dispatched downstream on interaction.
|
|
107
|
+
* @returns {void} Returns nothing.
|
|
92
108
|
*/
|
|
93
109
|
private _bindButtonEvents;
|
|
94
110
|
/**
|
|
95
|
-
*
|
|
111
|
+
* Schedules the destructive cleanup sequence fading initialization overlays away gracefully.
|
|
96
112
|
*
|
|
97
|
-
* @param delay - The
|
|
113
|
+
* @param {number} delay - The specific integer mapped in layout configs.
|
|
114
|
+
* @returns {void} Returns nothing.
|
|
98
115
|
*/
|
|
99
116
|
private _hideSplash;
|
|
100
117
|
}
|
|
@@ -1,10 +1,34 @@
|
|
|
1
1
|
import { Initializable } from '../core/types/Interfaces';
|
|
2
|
+
/**
|
|
3
|
+
* Specialized interrupt overlay confirming persistence restores asynchronously.
|
|
4
|
+
*
|
|
5
|
+
* It generates vanilla DOM elements that intentionally block Canvas execution pointers,
|
|
6
|
+
* preventing game logics from polluting local memory until a Human clearly decides
|
|
7
|
+
* whether to load or destroy auto-saved metadata safely.
|
|
8
|
+
*/
|
|
2
9
|
export default class SessionModal implements Initializable {
|
|
3
10
|
private _container;
|
|
4
11
|
private _confirmButton;
|
|
5
12
|
private _cancelButton;
|
|
6
13
|
constructor();
|
|
14
|
+
/**
|
|
15
|
+
* Bootstraps the Vanilla DOM creation assigning hidden CSS parameters until execution calls.
|
|
16
|
+
*
|
|
17
|
+
* @returns {void} Returns nothing.
|
|
18
|
+
*/
|
|
7
19
|
setup(): void;
|
|
20
|
+
/**
|
|
21
|
+
* Removes the CSS hidden barrier and binds strictly required callback endpoints to the physical buttons.
|
|
22
|
+
*
|
|
23
|
+
* @param {function(): void} onConfirm - The pointer mapped when the player wants to restore data.
|
|
24
|
+
* @param {function(): void} onCancel - The pointer mapped when the player declines restoration.
|
|
25
|
+
* @returns {void} Returns nothing.
|
|
26
|
+
*/
|
|
8
27
|
show(onConfirm: () => void, onCancel: () => void): void;
|
|
28
|
+
/**
|
|
29
|
+
* Nullifies listeners and applies strictly blocking CSS classes safely.
|
|
30
|
+
*
|
|
31
|
+
* @returns {void} Returns nothing.
|
|
32
|
+
*/
|
|
9
33
|
private _hide;
|
|
10
34
|
}
|
package/package.json
CHANGED
package/dist/CNAME
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
brickengine.com.br
|