@zylem/game-lib 0.6.4 → 0.8.0

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 (156) hide show
  1. package/README.md +18 -2
  2. package/dist/actions.d.ts +321 -11
  3. package/dist/actions.js +1 -936
  4. package/dist/api/game-lib.api.json +54074 -0
  5. package/dist/api/game-lib.api.md +4544 -0
  6. package/dist/api/game-lib.d.ts +8258 -0
  7. package/dist/api/game-lib.typedoc.json +345421 -0
  8. package/dist/audio.d.ts +13 -0
  9. package/dist/audio.js +1 -0
  10. package/dist/base-node-life-cycle-D2NuN1VB.d.ts +151 -0
  11. package/dist/behavior.d.ts +2 -0
  12. package/dist/behavior.js +1 -0
  13. package/dist/blueprints-TbGY-h53.d.ts +162 -0
  14. package/dist/chunk-4QLJUQSJ.js +1 -0
  15. package/dist/chunk-7FR5JSQ2.js +1 -0
  16. package/dist/chunk-7GYFZKK7.js +1 -0
  17. package/dist/chunk-7WRQ2UAN.js +1 -0
  18. package/dist/chunk-BH53MBAZ.js +1 -0
  19. package/dist/chunk-BIGH6D34.js +0 -0
  20. package/dist/chunk-CM5YRNBJ.js +19 -0
  21. package/dist/chunk-COM6HJ2L.js +1 -0
  22. package/dist/chunk-D2PATZCC.js +1 -0
  23. package/dist/chunk-DFLI7ICU.js +0 -0
  24. package/dist/chunk-E3UBSUPX.js +1 -0
  25. package/dist/chunk-FKIKN7RP.js +24 -0
  26. package/dist/chunk-G4HONLWC.js +1 -0
  27. package/dist/chunk-IKWE2W6L.js +1 -0
  28. package/dist/chunk-IPWUDOV5.js +1 -0
  29. package/dist/chunk-JEHFHUH4.js +0 -0
  30. package/dist/chunk-JNKPTL77.js +1 -0
  31. package/dist/chunk-JQKS42G4.js +1 -0
  32. package/dist/chunk-M3XNO56P.js +1 -0
  33. package/dist/chunk-MSC2BEO5.js +1 -0
  34. package/dist/chunk-ORIDWL3T.js +0 -0
  35. package/dist/chunk-QB3NL7VQ.js +1 -0
  36. package/dist/chunk-QXVH6POE.js +1 -0
  37. package/dist/chunk-RXDTAWI2.js +29 -0
  38. package/dist/chunk-TAUWDQZF.js +9 -0
  39. package/dist/chunk-VS2D4B3W.js +1 -0
  40. package/dist/chunk-WQ3WMMZD.js +1 -0
  41. package/dist/chunk-XK63E4SX.js +1 -0
  42. package/dist/chunk-XNDS4YFR.js +1 -0
  43. package/dist/chunk-XNHVRFAK.js +1 -0
  44. package/dist/chunk-XRP4JJXL.js +1 -0
  45. package/dist/chunk-YHEWKN7N.js +1 -0
  46. package/dist/chunk-ZRT3ZQVH.js +1 -0
  47. package/dist/collision-builder-jF-toPIl.d.ts +38 -0
  48. package/dist/core.d.ts +223 -16
  49. package/dist/core.js +1 -12424
  50. package/dist/debug-state-BPT6jEog.d.ts +17 -0
  51. package/dist/debug.d.ts +76 -0
  52. package/dist/debug.js +1 -0
  53. package/dist/default-controls-0-vCnli7.d.ts +111 -0
  54. package/dist/{entity-vj-HTjzU.d.ts → entity-BdSI8CL3.d.ts} +119 -626
  55. package/dist/{entity-Bq_eNEDI.d.ts → entity-DZbFQ1Wg.d.ts} +4 -4
  56. package/dist/entity-type-map-Bd69SpAS.d.ts +928 -0
  57. package/dist/entity.d.ts +268 -0
  58. package/dist/entity.js +1 -0
  59. package/dist/events.d.ts +181 -0
  60. package/dist/events.js +1 -0
  61. package/dist/game-C1FHVqXl.d.ts +1886 -0
  62. package/dist/game-default-QHROHW2O.js +1 -0
  63. package/dist/game-interfaces-mchNYSZE.d.ts +90 -0
  64. package/dist/globals.d.ts +115 -0
  65. package/dist/globals.js +1 -0
  66. package/dist/graphics.d.ts +53 -0
  67. package/dist/graphics.js +1 -0
  68. package/dist/input-ui.d.ts +35 -0
  69. package/dist/input-ui.js +1 -0
  70. package/dist/input.d.ts +73 -0
  71. package/dist/input.js +1 -0
  72. package/dist/material-9vJ6SZaI.d.ts +126 -0
  73. package/dist/public.d.ts +38 -0
  74. package/dist/public.js +1 -0
  75. package/dist/runtime.d.ts +59 -0
  76. package/dist/runtime.js +1 -0
  77. package/dist/schema/entity.schema.json +244 -0
  78. package/dist/schema/game-config.schema.json +625 -0
  79. package/dist/schema/input-config.schema.json +499 -0
  80. package/dist/schema/stage-config.schema.json +93 -0
  81. package/dist/schema/stage.schema.json +271 -0
  82. package/dist/schema.d.ts +538 -0
  83. package/dist/schema.js +1 -0
  84. package/dist/stage-transition-CmGpV4tc.d.ts +46 -0
  85. package/dist/vector-CiSHbivc.d.ts +133 -0
  86. package/dist/web-components.d.ts +70 -0
  87. package/dist/web-components.js +1 -0
  88. package/dist/zylem-camera-C3bn6BTI.d.ts +575 -0
  89. package/package.json +70 -73
  90. package/dist/actions.js.map +0 -1
  91. package/dist/behavior/jumper-2d.d.ts +0 -114
  92. package/dist/behavior/jumper-2d.js +0 -711
  93. package/dist/behavior/jumper-2d.js.map +0 -1
  94. package/dist/behavior/platformer-3d.d.ts +0 -296
  95. package/dist/behavior/platformer-3d.js +0 -761
  96. package/dist/behavior/platformer-3d.js.map +0 -1
  97. package/dist/behavior/ricochet-2d.d.ts +0 -275
  98. package/dist/behavior/ricochet-2d.js +0 -425
  99. package/dist/behavior/ricochet-2d.js.map +0 -1
  100. package/dist/behavior/ricochet-3d.d.ts +0 -117
  101. package/dist/behavior/ricochet-3d.js +0 -443
  102. package/dist/behavior/ricochet-3d.js.map +0 -1
  103. package/dist/behavior/screen-visibility.d.ts +0 -79
  104. package/dist/behavior/screen-visibility.js +0 -358
  105. package/dist/behavior/screen-visibility.js.map +0 -1
  106. package/dist/behavior/screen-wrap.d.ts +0 -87
  107. package/dist/behavior/screen-wrap.js +0 -246
  108. package/dist/behavior/screen-wrap.js.map +0 -1
  109. package/dist/behavior/shooter-2d.d.ts +0 -79
  110. package/dist/behavior/shooter-2d.js +0 -180
  111. package/dist/behavior/shooter-2d.js.map +0 -1
  112. package/dist/behavior/thruster.d.ts +0 -11
  113. package/dist/behavior/thruster.js +0 -292
  114. package/dist/behavior/thruster.js.map +0 -1
  115. package/dist/behavior/top-down-movement.d.ts +0 -56
  116. package/dist/behavior/top-down-movement.js +0 -125
  117. package/dist/behavior/top-down-movement.js.map +0 -1
  118. package/dist/behavior/world-boundary-2d.d.ts +0 -142
  119. package/dist/behavior/world-boundary-2d.js +0 -235
  120. package/dist/behavior/world-boundary-2d.js.map +0 -1
  121. package/dist/behavior/world-boundary-3d.d.ts +0 -76
  122. package/dist/behavior/world-boundary-3d.js +0 -274
  123. package/dist/behavior/world-boundary-3d.js.map +0 -1
  124. package/dist/behavior-descriptor-BXnVR8Ki.d.ts +0 -159
  125. package/dist/blueprints-DmbK2dki.d.ts +0 -26
  126. package/dist/camera-4XO5gbQH.d.ts +0 -905
  127. package/dist/camera.d.ts +0 -6
  128. package/dist/camera.js +0 -1993
  129. package/dist/camera.js.map +0 -1
  130. package/dist/composition-BASvMKrW.d.ts +0 -218
  131. package/dist/core-CARRaS55.d.ts +0 -541
  132. package/dist/core.js.map +0 -1
  133. package/dist/entities-ChFirVL9.d.ts +0 -410
  134. package/dist/entities.d.ts +0 -9
  135. package/dist/entities.js +0 -4986
  136. package/dist/entities.js.map +0 -1
  137. package/dist/entity-types-DAu8sGJH.d.ts +0 -26
  138. package/dist/global-change-2JvMaz44.d.ts +0 -25
  139. package/dist/main.d.ts +0 -1353
  140. package/dist/main.js +0 -19525
  141. package/dist/main.js.map +0 -1
  142. package/dist/physics-pose-DCc4oE44.d.ts +0 -25
  143. package/dist/physics-protocol-BDD3P5W2.d.ts +0 -200
  144. package/dist/physics-worker.d.ts +0 -21
  145. package/dist/physics-worker.js +0 -306
  146. package/dist/physics-worker.js.map +0 -1
  147. package/dist/physics.d.ts +0 -205
  148. package/dist/physics.js +0 -577
  149. package/dist/physics.js.map +0 -1
  150. package/dist/stage-types-C19IhuzA.d.ts +0 -731
  151. package/dist/stage.d.ts +0 -52
  152. package/dist/stage.js +0 -8479
  153. package/dist/stage.js.map +0 -1
  154. package/dist/sync-state-machine-CZyspBpj.d.ts +0 -16
  155. package/dist/thruster-23lzoPZd.d.ts +0 -180
  156. package/dist/world-DfgxoNMt.d.ts +0 -105
@@ -0,0 +1,499 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "GameInputConfig",
4
+ "title": "GameInputConfig",
5
+ "description": "Keys are player slots: p1, p2, p3, p4, p5, p6, p7, p8.",
6
+ "type": "object",
7
+ "patternProperties": {
8
+ "^(.*)$": {
9
+ "title": "GameInputPlayerConfig",
10
+ "additionalProperties": false,
11
+ "type": "object",
12
+ "properties": {
13
+ "key": {
14
+ "title": "KeyboardMapping",
15
+ "type": "object",
16
+ "patternProperties": {
17
+ "^(.*)$": {
18
+ "type": "array",
19
+ "items": {
20
+ "type": "string"
21
+ }
22
+ }
23
+ }
24
+ },
25
+ "mouse": {
26
+ "title": "MouseConfig",
27
+ "additionalProperties": false,
28
+ "type": "object",
29
+ "properties": {
30
+ "mapping": {
31
+ "title": "MouseMapping",
32
+ "type": "object",
33
+ "patternProperties": {
34
+ "^(.*)$": {
35
+ "type": "array",
36
+ "items": {
37
+ "type": "string"
38
+ }
39
+ }
40
+ }
41
+ },
42
+ "pointerLock": {
43
+ "type": "boolean"
44
+ },
45
+ "sensitivity": {
46
+ "type": "number"
47
+ }
48
+ }
49
+ },
50
+ "touch": {
51
+ "title": "VirtualTouchConfig",
52
+ "additionalProperties": false,
53
+ "type": "object",
54
+ "properties": {
55
+ "enabled": {
56
+ "anyOf": [
57
+ {
58
+ "type": "boolean"
59
+ },
60
+ {
61
+ "const": "auto",
62
+ "type": "string"
63
+ }
64
+ ]
65
+ },
66
+ "className": {
67
+ "type": "string"
68
+ },
69
+ "style": {
70
+ "title": "VirtualTouchStyle",
71
+ "type": "object",
72
+ "patternProperties": {
73
+ "^(.*)$": {
74
+ "anyOf": [
75
+ {
76
+ "type": "string"
77
+ },
78
+ {
79
+ "type": "number"
80
+ }
81
+ ]
82
+ }
83
+ }
84
+ },
85
+ "joysticks": {
86
+ "anyOf": [
87
+ {
88
+ "title": "VirtualTouchJoysticksConfig",
89
+ "additionalProperties": false,
90
+ "type": "object",
91
+ "properties": {
92
+ "left": {
93
+ "anyOf": [
94
+ {
95
+ "title": "VirtualTouchJoystickConfig",
96
+ "additionalProperties": false,
97
+ "type": "object",
98
+ "properties": {
99
+ "enabled": {
100
+ "type": "boolean"
101
+ },
102
+ "className": {
103
+ "type": "string"
104
+ },
105
+ "style": {
106
+ "title": "VirtualTouchStyle",
107
+ "type": "object",
108
+ "patternProperties": {
109
+ "^(.*)$": {
110
+ "anyOf": [
111
+ {
112
+ "type": "string"
113
+ },
114
+ {
115
+ "type": "number"
116
+ }
117
+ ]
118
+ }
119
+ }
120
+ },
121
+ "position": {
122
+ "title": "VirtualTouchPosition",
123
+ "additionalProperties": false,
124
+ "type": "object",
125
+ "properties": {
126
+ "top": {
127
+ "anyOf": [
128
+ {
129
+ "type": "string"
130
+ },
131
+ {
132
+ "type": "number"
133
+ }
134
+ ]
135
+ },
136
+ "right": {
137
+ "anyOf": [
138
+ {
139
+ "type": "string"
140
+ },
141
+ {
142
+ "type": "number"
143
+ }
144
+ ]
145
+ },
146
+ "bottom": {
147
+ "anyOf": [
148
+ {
149
+ "type": "string"
150
+ },
151
+ {
152
+ "type": "number"
153
+ }
154
+ ]
155
+ },
156
+ "left": {
157
+ "anyOf": [
158
+ {
159
+ "type": "string"
160
+ },
161
+ {
162
+ "type": "number"
163
+ }
164
+ ]
165
+ },
166
+ "transform": {
167
+ "type": "string"
168
+ }
169
+ }
170
+ },
171
+ "size": {
172
+ "type": "number"
173
+ },
174
+ "thumbSize": {
175
+ "type": "number"
176
+ },
177
+ "maxDistance": {
178
+ "type": "number"
179
+ },
180
+ "deadzone": {
181
+ "type": "number"
182
+ },
183
+ "directionThreshold": {
184
+ "type": "number"
185
+ },
186
+ "horizontalAxis": {
187
+ "anyOf": [
188
+ {
189
+ "const": "Horizontal",
190
+ "type": "string"
191
+ },
192
+ {
193
+ "const": "SecondaryHorizontal",
194
+ "type": "string"
195
+ }
196
+ ]
197
+ },
198
+ "verticalAxis": {
199
+ "anyOf": [
200
+ {
201
+ "const": "Vertical",
202
+ "type": "string"
203
+ },
204
+ {
205
+ "const": "SecondaryVertical",
206
+ "type": "string"
207
+ }
208
+ ]
209
+ },
210
+ "emitDirections": {
211
+ "type": "boolean"
212
+ },
213
+ "svg": {
214
+ "type": "object",
215
+ "properties": {
216
+ "base": {
217
+ "type": "string"
218
+ },
219
+ "thumb": {
220
+ "type": "string"
221
+ }
222
+ }
223
+ }
224
+ }
225
+ },
226
+ {
227
+ "const": false,
228
+ "type": "boolean"
229
+ }
230
+ ]
231
+ },
232
+ "right": {
233
+ "anyOf": [
234
+ {
235
+ "title": "VirtualTouchJoystickConfig",
236
+ "additionalProperties": false,
237
+ "type": "object",
238
+ "properties": {
239
+ "enabled": {
240
+ "type": "boolean"
241
+ },
242
+ "className": {
243
+ "type": "string"
244
+ },
245
+ "style": {
246
+ "title": "VirtualTouchStyle",
247
+ "type": "object",
248
+ "patternProperties": {
249
+ "^(.*)$": {
250
+ "anyOf": [
251
+ {
252
+ "type": "string"
253
+ },
254
+ {
255
+ "type": "number"
256
+ }
257
+ ]
258
+ }
259
+ }
260
+ },
261
+ "position": {
262
+ "title": "VirtualTouchPosition",
263
+ "additionalProperties": false,
264
+ "type": "object",
265
+ "properties": {
266
+ "top": {
267
+ "anyOf": [
268
+ {
269
+ "type": "string"
270
+ },
271
+ {
272
+ "type": "number"
273
+ }
274
+ ]
275
+ },
276
+ "right": {
277
+ "anyOf": [
278
+ {
279
+ "type": "string"
280
+ },
281
+ {
282
+ "type": "number"
283
+ }
284
+ ]
285
+ },
286
+ "bottom": {
287
+ "anyOf": [
288
+ {
289
+ "type": "string"
290
+ },
291
+ {
292
+ "type": "number"
293
+ }
294
+ ]
295
+ },
296
+ "left": {
297
+ "anyOf": [
298
+ {
299
+ "type": "string"
300
+ },
301
+ {
302
+ "type": "number"
303
+ }
304
+ ]
305
+ },
306
+ "transform": {
307
+ "type": "string"
308
+ }
309
+ }
310
+ },
311
+ "size": {
312
+ "type": "number"
313
+ },
314
+ "thumbSize": {
315
+ "type": "number"
316
+ },
317
+ "maxDistance": {
318
+ "type": "number"
319
+ },
320
+ "deadzone": {
321
+ "type": "number"
322
+ },
323
+ "directionThreshold": {
324
+ "type": "number"
325
+ },
326
+ "horizontalAxis": {
327
+ "anyOf": [
328
+ {
329
+ "const": "Horizontal",
330
+ "type": "string"
331
+ },
332
+ {
333
+ "const": "SecondaryHorizontal",
334
+ "type": "string"
335
+ }
336
+ ]
337
+ },
338
+ "verticalAxis": {
339
+ "anyOf": [
340
+ {
341
+ "const": "Vertical",
342
+ "type": "string"
343
+ },
344
+ {
345
+ "const": "SecondaryVertical",
346
+ "type": "string"
347
+ }
348
+ ]
349
+ },
350
+ "emitDirections": {
351
+ "type": "boolean"
352
+ },
353
+ "svg": {
354
+ "type": "object",
355
+ "properties": {
356
+ "base": {
357
+ "type": "string"
358
+ },
359
+ "thumb": {
360
+ "type": "string"
361
+ }
362
+ }
363
+ }
364
+ }
365
+ },
366
+ {
367
+ "const": false,
368
+ "type": "boolean"
369
+ }
370
+ ]
371
+ }
372
+ }
373
+ },
374
+ {
375
+ "const": false,
376
+ "type": "boolean"
377
+ }
378
+ ]
379
+ },
380
+ "buttons": {
381
+ "anyOf": [
382
+ {
383
+ "title": "VirtualTouchButtonsConfig",
384
+ "description": "Keys are touch button slots: A, B, X, Y, Start, Select, L, R, LTrigger, RTrigger, Up, Down, Left, Right.",
385
+ "type": "object",
386
+ "patternProperties": {
387
+ "^(.*)$": {
388
+ "anyOf": [
389
+ {
390
+ "title": "VirtualTouchButtonConfig",
391
+ "additionalProperties": false,
392
+ "type": "object",
393
+ "properties": {
394
+ "enabled": {
395
+ "type": "boolean"
396
+ },
397
+ "className": {
398
+ "type": "string"
399
+ },
400
+ "style": {
401
+ "title": "VirtualTouchStyle",
402
+ "type": "object",
403
+ "patternProperties": {
404
+ "^(.*)$": {
405
+ "anyOf": [
406
+ {
407
+ "type": "string"
408
+ },
409
+ {
410
+ "type": "number"
411
+ }
412
+ ]
413
+ }
414
+ }
415
+ },
416
+ "position": {
417
+ "title": "VirtualTouchPosition",
418
+ "additionalProperties": false,
419
+ "type": "object",
420
+ "properties": {
421
+ "top": {
422
+ "anyOf": [
423
+ {
424
+ "type": "string"
425
+ },
426
+ {
427
+ "type": "number"
428
+ }
429
+ ]
430
+ },
431
+ "right": {
432
+ "anyOf": [
433
+ {
434
+ "type": "string"
435
+ },
436
+ {
437
+ "type": "number"
438
+ }
439
+ ]
440
+ },
441
+ "bottom": {
442
+ "anyOf": [
443
+ {
444
+ "type": "string"
445
+ },
446
+ {
447
+ "type": "number"
448
+ }
449
+ ]
450
+ },
451
+ "left": {
452
+ "anyOf": [
453
+ {
454
+ "type": "string"
455
+ },
456
+ {
457
+ "type": "number"
458
+ }
459
+ ]
460
+ },
461
+ "transform": {
462
+ "type": "string"
463
+ }
464
+ }
465
+ },
466
+ "size": {
467
+ "type": "number"
468
+ },
469
+ "label": {
470
+ "type": "string"
471
+ },
472
+ "svg": {
473
+ "type": "string"
474
+ }
475
+ }
476
+ },
477
+ {
478
+ "const": false,
479
+ "type": "boolean"
480
+ }
481
+ ]
482
+ }
483
+ }
484
+ },
485
+ {
486
+ "const": false,
487
+ "type": "boolean"
488
+ }
489
+ ]
490
+ }
491
+ }
492
+ },
493
+ "includeDefaults": {
494
+ "type": "boolean"
495
+ }
496
+ }
497
+ }
498
+ }
499
+ }
@@ -0,0 +1,93 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "StageConfigJson",
4
+ "title": "StageConfigJson",
5
+ "additionalProperties": false,
6
+ "type": "object",
7
+ "properties": {
8
+ "inputs": {
9
+ "type": "object",
10
+ "patternProperties": {
11
+ "^(.*)$": {
12
+ "type": "array",
13
+ "items": {
14
+ "type": "string"
15
+ }
16
+ }
17
+ }
18
+ },
19
+ "backgroundColor": {
20
+ "title": "ColorJson",
21
+ "description": "CSS color string or numeric hex (Three.js Color-compatible).",
22
+ "anyOf": [
23
+ {
24
+ "type": "string"
25
+ },
26
+ {
27
+ "type": "number"
28
+ }
29
+ ]
30
+ },
31
+ "backgroundImage": {
32
+ "anyOf": [
33
+ {
34
+ "type": "string"
35
+ },
36
+ {
37
+ "type": "null"
38
+ }
39
+ ]
40
+ },
41
+ "gravity": {
42
+ "title": "Vec3Components",
43
+ "type": "array",
44
+ "items": [
45
+ {
46
+ "type": "number"
47
+ },
48
+ {
49
+ "type": "number"
50
+ },
51
+ {
52
+ "type": "number"
53
+ }
54
+ ],
55
+ "additionalItems": false,
56
+ "minItems": 3,
57
+ "maxItems": 3
58
+ },
59
+ "variables": {
60
+ "type": "object",
61
+ "patternProperties": {
62
+ "^(.*)$": {}
63
+ }
64
+ },
65
+ "physicsRate": {
66
+ "exclusiveMinimum": 0,
67
+ "type": "number"
68
+ },
69
+ "assetLoaders": {
70
+ "title": "StageAssetLoaderConfig",
71
+ "additionalProperties": false,
72
+ "type": "object",
73
+ "properties": {
74
+ "gltf": {
75
+ "title": "StageGLTFAssetLoaderConfig",
76
+ "additionalProperties": false,
77
+ "type": "object",
78
+ "properties": {
79
+ "meshopt": {
80
+ "type": "boolean"
81
+ },
82
+ "ktx2TranscoderPath": {
83
+ "type": "string"
84
+ }
85
+ }
86
+ }
87
+ }
88
+ },
89
+ "defaultLighting": {
90
+ "type": "boolean"
91
+ }
92
+ }
93
+ }