brick-engine-js 1.0.2 → 1.0.3
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/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 +2 -1
- package/public/CNAME +1 -0
- package/public/docs/GAME_DEVELOPER_GUIDE.html +727 -0
- package/public/docs/brick-engine-guide.html +610 -0
- package/public/docs/diagrams/lifecycle.mmd +19 -0
- package/public/docs/documentation_style_guide.html +994 -0
- package/public/docs/getting-started.html +648 -0
- package/public/docs/images/lifecycle.svg +1 -0
- package/public/docs/index.html +593 -0
- package/public/docs/jsdoc_standard.html +656 -0
- package/public/docs/publishing.html +573 -0
- package/public/docs/reference/enums/Color.html +533 -0
- package/public/docs/reference/enums/ControlEventType.html +505 -0
- package/public/docs/reference/enums/ControlKey.html +529 -0
- package/public/docs/reference/enums/FontAlignment.html +545 -0
- package/public/docs/reference/enums/FontSize.html +517 -0
- package/public/docs/reference/enums/Sound.html +558 -0
- package/public/docs/reference/enums/StateProperty.html +525 -0
- package/public/docs/reference/helpers/CellHelper.html +520 -0
- package/public/docs/reference/helpers/ControlInputHandlerHelper.html +569 -0
- package/public/docs/reference/helpers/CoordinateHelper.html +703 -0
- package/public/docs/reference/helpers/RelativeValuesHelper.html +560 -0
- package/public/docs/reference/interfaces/Debuggable.html +501 -0
- package/public/docs/reference/interfaces/GameModules.html +544 -0
- package/public/docs/reference/interfaces/Initializable.html +495 -0
- package/public/docs/reference/interfaces/RendererInitializable.html +517 -0
- package/public/docs/reference/interfaces/StateSyncable.html +542 -0
- package/public/docs/reference/interfaces/modules/Control.html +648 -0
- package/public/docs/reference/interfaces/modules/Grid.html +1256 -0
- package/public/docs/reference/interfaces/modules/Renderer.html +522 -0
- package/public/docs/reference/interfaces/modules/RendererComposite.html +577 -0
- package/public/docs/reference/interfaces/modules/Score.html +669 -0
- package/public/docs/reference/interfaces/modules/Session.html +585 -0
- package/public/docs/reference/interfaces/modules/State.html +897 -0
- package/public/docs/reference/interfaces/modules/Text.html +668 -0
- package/public/docs/reference/interfaces/modules/Time.html +684 -0
- package/public/docs/reference/modules/Debugger.html +579 -0
- package/public/docs/reference/modules/DisplayRenderer.html +557 -0
- package/public/docs/reference/modules/Game.html +909 -0
- package/public/docs/reference/modules/GameControl.html +716 -0
- package/public/docs/reference/modules/GameGrid.html +1910 -0
- package/public/docs/reference/modules/GameHudGrid.html +508 -0
- package/public/docs/reference/modules/GameMenu.html +538 -0
- package/public/docs/reference/modules/GameRenderer.html +589 -0
- package/public/docs/reference/modules/GameScore.html +664 -0
- package/public/docs/reference/modules/GameSession.html +533 -0
- package/public/docs/reference/modules/GameSound.html +636 -0
- package/public/docs/reference/modules/GameState.html +922 -0
- package/public/docs/reference/modules/GameText.html +701 -0
- package/public/docs/reference/modules/GameTime.html +696 -0
- package/public/docs/reference/modules/HudRenderer.html +568 -0
- package/public/docs/reference/modules/InitialStateSnapshot.html +557 -0
- package/public/docs/reference/modules/SessionModal.html +520 -0
- package/public/docs/reference/types/Axis.html +505 -0
- package/public/docs/reference/types/Cell.html +514 -0
- package/public/docs/reference/types/ControlCallback.html +488 -0
- package/public/docs/reference/types/Coordinate.html +510 -0
- package/public/docs/reference/types/GameEntry.html +514 -0
- package/public/docs/reference/types/GameEvent.html +514 -0
- package/public/docs/reference/types/Piece.html +506 -0
- package/public/docs/reference/types/RendererMetrics.html +514 -0
- package/public/docs/reference/types/Vector.html +509 -0
- package/public/docs/testing_best_practices.html +770 -0
- package/public/favicon.ico +0 -0
- package/public/fonts/digital-7.monoitalic.ttf +0 -0
- package/public/images/cell.svg +32 -0
- package/public/images/close.png +0 -0
- package/public/images/games.png +0 -0
- package/public/images/github.png +0 -0
- package/public/images/letter-a.png +0 -0
- package/public/images/letter-d.png +0 -0
- package/public/images/letter-j.png +0 -0
- package/public/images/letter-s.png +0 -0
- package/public/images/letter-w.png +0 -0
- package/public/images/meta-image.png +0 -0
- package/public/images/number-1.png +0 -0
- package/public/images/number-2.png +0 -0
- package/public/images/number-3.png +0 -0
- package/public/images/number-4.png +0 -0
- package/public/images/number-5.png +0 -0
- package/public/images/number-6.png +0 -0
- package/public/images/splash.gif +0 -0
- package/public/index.html +15 -0
- package/public/sounds/sound_00.wav +0 -0
- package/public/sounds/sound_01.wav +0 -0
- package/public/sounds/sound_02.wav +0 -0
- package/public/sounds/sound_03.wav +0 -0
- package/public/sounds/sound_04.wav +0 -0
- package/public/sounds/sound_05.wav +0 -0
- package/public/sounds/sound_06.wav +0 -0
- package/public/sounds/sound_07.wav +0 -0
- package/public/sounds/sound_08.wav +0 -0
- package/public/sounds/sound_09.wav +0 -0
- package/public/sounds/sound_10.wav +0 -0
- package/public/sounds/sound_11.wav +0 -0
- package/public/sounds/sound_12.wav +0 -0
- package/public/sounds/sound_13.wav +0 -0
- package/public/sounds/sound_14.wav +0 -0
- package/public/sounds/sound_15.wav +0 -0
- package/public/style/body.css +86 -0
- package/public/style/buttons.css +233 -0
- package/public/style/debugger.css +117 -0
- package/public/style/sessionModal.css +155 -0
- package/public/style/sourceCodeAndCommands.css +74 -0
- package/public/style/splash.css +13 -0
- package/public/style/theme.css +137 -0
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
#modal-background {
|
|
2
|
+
position: absolute;
|
|
3
|
+
inset: 0;
|
|
4
|
+
background-color: rgba(0, 0, 0, 0.5);
|
|
5
|
+
z-index: 999;
|
|
6
|
+
display: flex;
|
|
7
|
+
justify-content: center;
|
|
8
|
+
align-items: center;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
#modal-background.hidden {
|
|
12
|
+
display: none;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
#session-modal {
|
|
16
|
+
width: 80%;
|
|
17
|
+
max-width: 500px;
|
|
18
|
+
height: 44%;
|
|
19
|
+
max-height: 360px;
|
|
20
|
+
min-width: 320px;
|
|
21
|
+
min-height: 280px;
|
|
22
|
+
position: relative;
|
|
23
|
+
overflow: hidden;
|
|
24
|
+
|
|
25
|
+
display: flex;
|
|
26
|
+
flex-direction: column;
|
|
27
|
+
align-items: center;
|
|
28
|
+
box-sizing: border-box;
|
|
29
|
+
padding: 1rem 0;
|
|
30
|
+
|
|
31
|
+
background-color: var(--main-color);
|
|
32
|
+
|
|
33
|
+
border-radius: var(--border-radius);
|
|
34
|
+
border: var(--border);
|
|
35
|
+
|
|
36
|
+
box-shadow:
|
|
37
|
+
calc(var(--width) * -0.03) calc(var(--width) * 0.03) var(--dispersion) black,
|
|
38
|
+
calc(var(--width) * -0.02) calc(var(--width) * 0.02) var(--dispersion) var(--color-shadow-reflexion) inset,
|
|
39
|
+
calc(var(--width) * 0.01) calc(var(--width) * -0.01) var(--dispersion) var(--color-shadow) inset;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
#session-modal-frame {
|
|
43
|
+
border: var(--border);
|
|
44
|
+
border-radius: var(--border-radius);
|
|
45
|
+
|
|
46
|
+
position: relative;
|
|
47
|
+
|
|
48
|
+
width: 90%;
|
|
49
|
+
flex: 1;
|
|
50
|
+
margin: 1rem 0;
|
|
51
|
+
min-height: 0;
|
|
52
|
+
|
|
53
|
+
display: flex;
|
|
54
|
+
justify-content: center;
|
|
55
|
+
align-items: center;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
#session-modal-frame > p {
|
|
59
|
+
position: absolute;
|
|
60
|
+
top: 0;
|
|
61
|
+
transform: translateY(-50%);
|
|
62
|
+
|
|
63
|
+
text-align: center;
|
|
64
|
+
|
|
65
|
+
font-family: 'retro-gamming';
|
|
66
|
+
font-weight: bold;
|
|
67
|
+
font-size: clamp(1rem, calc(var(--height) * 0.03), 1.4rem);
|
|
68
|
+
|
|
69
|
+
background-color: var(--main-color);
|
|
70
|
+
padding: 0 calc(var(--width) * 0.02);
|
|
71
|
+
|
|
72
|
+
text-shadow:
|
|
73
|
+
calc(var(--width) * -0.003) calc(var(--width) * 0.003) 0 var(--color-shadow),
|
|
74
|
+
calc(var(--width) * 0.002) calc(var(--width) * -0.002) 0 var(--color-shadow-reflexion);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
#session-modal-screen {
|
|
78
|
+
width: 90%;
|
|
79
|
+
height: 80%;
|
|
80
|
+
|
|
81
|
+
border: var(--border);
|
|
82
|
+
box-shadow:
|
|
83
|
+
calc(var(--width) * -0.01) calc(var(--width) * 0.01) var(--dispersion) var(--color-shadow),
|
|
84
|
+
calc(var(--width) * 0.01) calc(var(--width) * -0.01) var(--dispersion) var(--color-shadow-reflexion);
|
|
85
|
+
|
|
86
|
+
background-image: url('../images/cell.svg');
|
|
87
|
+
background-size: 3.7%;
|
|
88
|
+
background-repeat: repeat;
|
|
89
|
+
|
|
90
|
+
display: flex;
|
|
91
|
+
justify-content: center;
|
|
92
|
+
align-items: center;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
#session-modal-screen > p {
|
|
96
|
+
text-align: center;
|
|
97
|
+
|
|
98
|
+
font-family: 'retro-gamming';
|
|
99
|
+
font-size: 1.5rem;
|
|
100
|
+
|
|
101
|
+
padding: 0 calc(var(--width) * 0.02);
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
#session-modal-screen > p > span {
|
|
105
|
+
font-size: 1.8rem;
|
|
106
|
+
padding: 0 calc(var(--width) * 0.02);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
#session-modal-buttons {
|
|
110
|
+
width: 100%;
|
|
111
|
+
padding-bottom: 0.5rem;
|
|
112
|
+
|
|
113
|
+
display: flex;
|
|
114
|
+
justify-content: center;
|
|
115
|
+
align-items: center;
|
|
116
|
+
|
|
117
|
+
gap: clamp(1rem, 5vw, 2.5rem);
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
.session-modal-button:active {
|
|
121
|
+
box-shadow:
|
|
122
|
+
calc(var(--width) * -0.005) calc(var(--width) * 0.005) var(--dispersion) var(--color-shadow),
|
|
123
|
+
calc(var(--width) * -0.004) calc(var(--width) * 0.004) var(--dispersion) var(--button-color-reflexion) inset;
|
|
124
|
+
transform: translate(calc(var(--width) * -0.005), calc(var(--width) * 0.005));
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
.session-modal-button {
|
|
128
|
+
width: 35%;
|
|
129
|
+
max-width: 150px;
|
|
130
|
+
padding: 0.8rem 0;
|
|
131
|
+
|
|
132
|
+
border: var(--border);
|
|
133
|
+
border-radius: var(--border-radius);
|
|
134
|
+
|
|
135
|
+
background-color: var(--button-color);
|
|
136
|
+
box-shadow:
|
|
137
|
+
calc(var(--width) * -0.015) calc(var(--width) * 0.015) var(--dispersion) var(--color-shadow),
|
|
138
|
+
calc(var(--width) * -0.0175) calc(var(--width) * 0.0175) var(--dispersion) var(--button-color-reflexion) inset;
|
|
139
|
+
|
|
140
|
+
font-family: 'retro-gamming';
|
|
141
|
+
color: white;
|
|
142
|
+
text-align: center;
|
|
143
|
+
|
|
144
|
+
user-select: none;
|
|
145
|
+
|
|
146
|
+
font-size: 1rem;
|
|
147
|
+
|
|
148
|
+
text-shadow:
|
|
149
|
+
calc(var(--width) * -0.003) calc(var(--width) * 0.003) 0 var(--button-color-shadow),
|
|
150
|
+
calc(var(--width) * 0.002) calc(var(--width) * -0.002) 0 var(--button-color-reflexion);
|
|
151
|
+
|
|
152
|
+
transition:
|
|
153
|
+
transform var(--button-animation-duration),
|
|
154
|
+
box-shadow var(--button-animation-duration);
|
|
155
|
+
}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
#source-code {
|
|
2
|
+
position: absolute;
|
|
3
|
+
top: 2%;
|
|
4
|
+
right: 2%;
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
#controls {
|
|
8
|
+
position: absolute;
|
|
9
|
+
top: 2%;
|
|
10
|
+
left: 2%;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
#source-code,
|
|
14
|
+
#controls {
|
|
15
|
+
background-color: var(--main-color);
|
|
16
|
+
padding: 0.75rem;
|
|
17
|
+
border-radius: 1.5rem;
|
|
18
|
+
cursor: pointer;
|
|
19
|
+
box-sizing: content-box;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
#source-code > #source-code-button,
|
|
23
|
+
#controls > #controls-button {
|
|
24
|
+
display: flex;
|
|
25
|
+
justify-content: center;
|
|
26
|
+
align-items: center;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
#source-code > #source-code-button > img,
|
|
30
|
+
#controls > #controls-button > img {
|
|
31
|
+
width: 2.5rem;
|
|
32
|
+
filter: invert();
|
|
33
|
+
}
|
|
34
|
+
#source-code:hover,
|
|
35
|
+
#controls:hover {
|
|
36
|
+
background-color: var(--color-shadow-reflexion);
|
|
37
|
+
}
|
|
38
|
+
#source-code:active,
|
|
39
|
+
#controls:active {
|
|
40
|
+
filter: brightness(1.15);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
#source-code::after,
|
|
44
|
+
#controls::after {
|
|
45
|
+
font-family: 'retro-gamming';
|
|
46
|
+
padding: 0.5rem;
|
|
47
|
+
width: 6rem;
|
|
48
|
+
background-color: white;
|
|
49
|
+
text-align: center;
|
|
50
|
+
border-radius: 0.25rem;
|
|
51
|
+
border: 1px black solid;
|
|
52
|
+
box-shadow: 0.25rem 0.25rem black;
|
|
53
|
+
opacity: 0;
|
|
54
|
+
transition: 0.25s opacity;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
#source-code:hover::after,
|
|
58
|
+
#controls:hover::after {
|
|
59
|
+
opacity: 1;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
#source-code::after {
|
|
63
|
+
content: 'source code';
|
|
64
|
+
position: absolute;
|
|
65
|
+
top: 75px;
|
|
66
|
+
left: -65px;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
#controls::after {
|
|
70
|
+
content: 'Controls';
|
|
71
|
+
position: absolute;
|
|
72
|
+
top: 75px;
|
|
73
|
+
left: 15px;
|
|
74
|
+
}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
@font-face {
|
|
2
|
+
font-family: retro-gamming;
|
|
3
|
+
src: url(./../fonts/digital-7.monoitalic.ttf);
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
* {
|
|
7
|
+
margin: 0;
|
|
8
|
+
padding: 0;
|
|
9
|
+
box-sizing: content-box;
|
|
10
|
+
user-select: none;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
body {
|
|
14
|
+
width: 100vw;
|
|
15
|
+
height: 100vh;
|
|
16
|
+
|
|
17
|
+
display: flex;
|
|
18
|
+
justify-content: center;
|
|
19
|
+
align-items: center;
|
|
20
|
+
|
|
21
|
+
background: rgb(0, 158, 247);
|
|
22
|
+
background: linear-gradient(300deg, rgb(48, 179, 255) 0%, rgba(0, 158, 247, 1) 100%);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
#version {
|
|
26
|
+
font-family: 'retro-gamming';
|
|
27
|
+
font-size: 1rem;
|
|
28
|
+
color: white;
|
|
29
|
+
position: absolute;
|
|
30
|
+
bottom: 1rem;
|
|
31
|
+
right: 1rem;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
@media only screen and (max-width: 600px) {
|
|
35
|
+
#source-code,
|
|
36
|
+
#controls {
|
|
37
|
+
display: none;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
body,
|
|
41
|
+
#container {
|
|
42
|
+
width: 100% !important;
|
|
43
|
+
height: 100vh !important;
|
|
44
|
+
/* height: 100dvh !important; */
|
|
45
|
+
border-radius: 0px !important;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
#frame > canvas {
|
|
49
|
+
width: 85% !important;
|
|
50
|
+
height: auto !important;
|
|
51
|
+
aspect-ratio: 9/10 !important;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
#frame {
|
|
55
|
+
width: 85% !important;
|
|
56
|
+
padding: 7.5%¨ !important;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
#small-button-container {
|
|
60
|
+
margin-top: 3.5%;
|
|
61
|
+
}
|
|
62
|
+
#direction-vertical-container,
|
|
63
|
+
#direction-horizontal-container {
|
|
64
|
+
gap: calc(var(--width) * 0.13);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
#large-button-container {
|
|
68
|
+
flex-shrink: 1.75;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.sm-btn {
|
|
72
|
+
width: var(--sm-button-size-mobile) !important;
|
|
73
|
+
height: var(--sm-button-size-mobile) !important;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.btn {
|
|
77
|
+
width: var(--button-size-mobile) !important;
|
|
78
|
+
height: var(--button-size-mobile) !important;
|
|
79
|
+
margin: var(--button-size-mobile-spacing) !important;
|
|
80
|
+
font-size: var(--button-size-mobile-font-size) !important;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.lg-btn {
|
|
84
|
+
width: var(--lg-button-size-mobile) !important;
|
|
85
|
+
height: var(--lg-button-size-mobile) !important;
|
|
86
|
+
font-size: var(--lg-button-size-mobile-font-size) !important;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
.sm-btn-p {
|
|
90
|
+
font-size: var(--sm-button-size-mobile-font-size) !important;
|
|
91
|
+
line-height: var(--sm-button-size-mobile-line-height) !important;
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
@media only screen and (max-width: 990px) {
|
|
96
|
+
#wasd {
|
|
97
|
+
width: 10.5rem !important;
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.key {
|
|
101
|
+
width: 3rem !important;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
.key-description {
|
|
105
|
+
font-size: 1.5rem !important;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
.command {
|
|
109
|
+
gap: 0.5rem !important;
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
@media only screen and (max-width: 815px) {
|
|
114
|
+
#controls-tutorial {
|
|
115
|
+
gap: 0rem;
|
|
116
|
+
flex-direction: column !important;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
@media only screen and (max-width: 750px) {
|
|
121
|
+
.key-description {
|
|
122
|
+
font-size: 1.2rem !important;
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
@media only screen and (max-width: 650px) {
|
|
127
|
+
#wasd {
|
|
128
|
+
width: 9rem !important;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
.key {
|
|
132
|
+
width: 2.5rem !important;
|
|
133
|
+
}
|
|
134
|
+
.key-description {
|
|
135
|
+
font-size: 1rem !important;
|
|
136
|
+
}
|
|
137
|
+
}
|