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.
Files changed (117) hide show
  1. package/dist/docs/GAME_DEVELOPER_GUIDE.html +1 -1
  2. package/dist/docs/brick-engine-guide.html +1 -1
  3. package/dist/docs/getting-started.html +1 -1
  4. package/dist/docs/jsdoc_standard.html +1 -1
  5. package/dist/docs/publishing.html +1 -1
  6. package/dist/docs/reference/interfaces/modules/Session.html +1 -1
  7. package/dist/docs/reference/modules/GameMenu.html +1 -1
  8. package/dist/docs/reference/modules/GameSession.html +1 -1
  9. package/dist/docs/reference/modules/InitialStateSnapshot.html +1 -1
  10. package/dist/docs/reference/modules/SessionModal.html +1 -1
  11. package/dist/docs/testing_best_practices.html +1 -1
  12. package/package.json +2 -1
  13. package/public/CNAME +1 -0
  14. package/public/docs/GAME_DEVELOPER_GUIDE.html +727 -0
  15. package/public/docs/brick-engine-guide.html +610 -0
  16. package/public/docs/diagrams/lifecycle.mmd +19 -0
  17. package/public/docs/documentation_style_guide.html +994 -0
  18. package/public/docs/getting-started.html +648 -0
  19. package/public/docs/images/lifecycle.svg +1 -0
  20. package/public/docs/index.html +593 -0
  21. package/public/docs/jsdoc_standard.html +656 -0
  22. package/public/docs/publishing.html +573 -0
  23. package/public/docs/reference/enums/Color.html +533 -0
  24. package/public/docs/reference/enums/ControlEventType.html +505 -0
  25. package/public/docs/reference/enums/ControlKey.html +529 -0
  26. package/public/docs/reference/enums/FontAlignment.html +545 -0
  27. package/public/docs/reference/enums/FontSize.html +517 -0
  28. package/public/docs/reference/enums/Sound.html +558 -0
  29. package/public/docs/reference/enums/StateProperty.html +525 -0
  30. package/public/docs/reference/helpers/CellHelper.html +520 -0
  31. package/public/docs/reference/helpers/ControlInputHandlerHelper.html +569 -0
  32. package/public/docs/reference/helpers/CoordinateHelper.html +703 -0
  33. package/public/docs/reference/helpers/RelativeValuesHelper.html +560 -0
  34. package/public/docs/reference/interfaces/Debuggable.html +501 -0
  35. package/public/docs/reference/interfaces/GameModules.html +544 -0
  36. package/public/docs/reference/interfaces/Initializable.html +495 -0
  37. package/public/docs/reference/interfaces/RendererInitializable.html +517 -0
  38. package/public/docs/reference/interfaces/StateSyncable.html +542 -0
  39. package/public/docs/reference/interfaces/modules/Control.html +648 -0
  40. package/public/docs/reference/interfaces/modules/Grid.html +1256 -0
  41. package/public/docs/reference/interfaces/modules/Renderer.html +522 -0
  42. package/public/docs/reference/interfaces/modules/RendererComposite.html +577 -0
  43. package/public/docs/reference/interfaces/modules/Score.html +669 -0
  44. package/public/docs/reference/interfaces/modules/Session.html +585 -0
  45. package/public/docs/reference/interfaces/modules/State.html +897 -0
  46. package/public/docs/reference/interfaces/modules/Text.html +668 -0
  47. package/public/docs/reference/interfaces/modules/Time.html +684 -0
  48. package/public/docs/reference/modules/Debugger.html +579 -0
  49. package/public/docs/reference/modules/DisplayRenderer.html +557 -0
  50. package/public/docs/reference/modules/Game.html +909 -0
  51. package/public/docs/reference/modules/GameControl.html +716 -0
  52. package/public/docs/reference/modules/GameGrid.html +1910 -0
  53. package/public/docs/reference/modules/GameHudGrid.html +508 -0
  54. package/public/docs/reference/modules/GameMenu.html +538 -0
  55. package/public/docs/reference/modules/GameRenderer.html +589 -0
  56. package/public/docs/reference/modules/GameScore.html +664 -0
  57. package/public/docs/reference/modules/GameSession.html +533 -0
  58. package/public/docs/reference/modules/GameSound.html +636 -0
  59. package/public/docs/reference/modules/GameState.html +922 -0
  60. package/public/docs/reference/modules/GameText.html +701 -0
  61. package/public/docs/reference/modules/GameTime.html +696 -0
  62. package/public/docs/reference/modules/HudRenderer.html +568 -0
  63. package/public/docs/reference/modules/InitialStateSnapshot.html +557 -0
  64. package/public/docs/reference/modules/SessionModal.html +520 -0
  65. package/public/docs/reference/types/Axis.html +505 -0
  66. package/public/docs/reference/types/Cell.html +514 -0
  67. package/public/docs/reference/types/ControlCallback.html +488 -0
  68. package/public/docs/reference/types/Coordinate.html +510 -0
  69. package/public/docs/reference/types/GameEntry.html +514 -0
  70. package/public/docs/reference/types/GameEvent.html +514 -0
  71. package/public/docs/reference/types/Piece.html +506 -0
  72. package/public/docs/reference/types/RendererMetrics.html +514 -0
  73. package/public/docs/reference/types/Vector.html +509 -0
  74. package/public/docs/testing_best_practices.html +770 -0
  75. package/public/favicon.ico +0 -0
  76. package/public/fonts/digital-7.monoitalic.ttf +0 -0
  77. package/public/images/cell.svg +32 -0
  78. package/public/images/close.png +0 -0
  79. package/public/images/games.png +0 -0
  80. package/public/images/github.png +0 -0
  81. package/public/images/letter-a.png +0 -0
  82. package/public/images/letter-d.png +0 -0
  83. package/public/images/letter-j.png +0 -0
  84. package/public/images/letter-s.png +0 -0
  85. package/public/images/letter-w.png +0 -0
  86. package/public/images/meta-image.png +0 -0
  87. package/public/images/number-1.png +0 -0
  88. package/public/images/number-2.png +0 -0
  89. package/public/images/number-3.png +0 -0
  90. package/public/images/number-4.png +0 -0
  91. package/public/images/number-5.png +0 -0
  92. package/public/images/number-6.png +0 -0
  93. package/public/images/splash.gif +0 -0
  94. package/public/index.html +15 -0
  95. package/public/sounds/sound_00.wav +0 -0
  96. package/public/sounds/sound_01.wav +0 -0
  97. package/public/sounds/sound_02.wav +0 -0
  98. package/public/sounds/sound_03.wav +0 -0
  99. package/public/sounds/sound_04.wav +0 -0
  100. package/public/sounds/sound_05.wav +0 -0
  101. package/public/sounds/sound_06.wav +0 -0
  102. package/public/sounds/sound_07.wav +0 -0
  103. package/public/sounds/sound_08.wav +0 -0
  104. package/public/sounds/sound_09.wav +0 -0
  105. package/public/sounds/sound_10.wav +0 -0
  106. package/public/sounds/sound_11.wav +0 -0
  107. package/public/sounds/sound_12.wav +0 -0
  108. package/public/sounds/sound_13.wav +0 -0
  109. package/public/sounds/sound_14.wav +0 -0
  110. package/public/sounds/sound_15.wav +0 -0
  111. package/public/style/body.css +86 -0
  112. package/public/style/buttons.css +233 -0
  113. package/public/style/debugger.css +117 -0
  114. package/public/style/sessionModal.css +155 -0
  115. package/public/style/sourceCodeAndCommands.css +74 -0
  116. package/public/style/splash.css +13 -0
  117. 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,13 @@
1
+ #splash {
2
+ position: absolute;
3
+ top: 0;
4
+ left: 0;
5
+ right: 0;
6
+ bottom: 0;
7
+ background-color: black;
8
+ opacity: 0.85;
9
+ z-index: 1000;
10
+ display: flex;
11
+ justify-content: center;
12
+ align-items: center;
13
+ }
@@ -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
+ }