@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,625 @@
1
+ {
2
+ "$schema": "http://json-schema.org/draft-07/schema#",
3
+ "$id": "GameConfigJson",
4
+ "title": "GameConfigJson",
5
+ "additionalProperties": false,
6
+ "type": "object",
7
+ "properties": {
8
+ "id": {
9
+ "type": "string"
10
+ },
11
+ "globals": {
12
+ "type": "object",
13
+ "patternProperties": {
14
+ "^(.*)$": {}
15
+ }
16
+ },
17
+ "debug": {
18
+ "type": "boolean"
19
+ },
20
+ "time": {
21
+ "type": "number"
22
+ },
23
+ "input": {
24
+ "$id": "GameInputConfig",
25
+ "title": "GameInputConfig",
26
+ "description": "Keys are player slots: p1, p2, p3, p4, p5, p6, p7, p8.",
27
+ "type": "object",
28
+ "patternProperties": {
29
+ "^(.*)$": {
30
+ "title": "GameInputPlayerConfig",
31
+ "additionalProperties": false,
32
+ "type": "object",
33
+ "properties": {
34
+ "key": {
35
+ "title": "KeyboardMapping",
36
+ "type": "object",
37
+ "patternProperties": {
38
+ "^(.*)$": {
39
+ "type": "array",
40
+ "items": {
41
+ "type": "string"
42
+ }
43
+ }
44
+ }
45
+ },
46
+ "mouse": {
47
+ "title": "MouseConfig",
48
+ "additionalProperties": false,
49
+ "type": "object",
50
+ "properties": {
51
+ "mapping": {
52
+ "title": "MouseMapping",
53
+ "type": "object",
54
+ "patternProperties": {
55
+ "^(.*)$": {
56
+ "type": "array",
57
+ "items": {
58
+ "type": "string"
59
+ }
60
+ }
61
+ }
62
+ },
63
+ "pointerLock": {
64
+ "type": "boolean"
65
+ },
66
+ "sensitivity": {
67
+ "type": "number"
68
+ }
69
+ }
70
+ },
71
+ "touch": {
72
+ "title": "VirtualTouchConfig",
73
+ "additionalProperties": false,
74
+ "type": "object",
75
+ "properties": {
76
+ "enabled": {
77
+ "anyOf": [
78
+ {
79
+ "type": "boolean"
80
+ },
81
+ {
82
+ "const": "auto",
83
+ "type": "string"
84
+ }
85
+ ]
86
+ },
87
+ "className": {
88
+ "type": "string"
89
+ },
90
+ "style": {
91
+ "title": "VirtualTouchStyle",
92
+ "type": "object",
93
+ "patternProperties": {
94
+ "^(.*)$": {
95
+ "anyOf": [
96
+ {
97
+ "type": "string"
98
+ },
99
+ {
100
+ "type": "number"
101
+ }
102
+ ]
103
+ }
104
+ }
105
+ },
106
+ "joysticks": {
107
+ "anyOf": [
108
+ {
109
+ "title": "VirtualTouchJoysticksConfig",
110
+ "additionalProperties": false,
111
+ "type": "object",
112
+ "properties": {
113
+ "left": {
114
+ "anyOf": [
115
+ {
116
+ "title": "VirtualTouchJoystickConfig",
117
+ "additionalProperties": false,
118
+ "type": "object",
119
+ "properties": {
120
+ "enabled": {
121
+ "type": "boolean"
122
+ },
123
+ "className": {
124
+ "type": "string"
125
+ },
126
+ "style": {
127
+ "title": "VirtualTouchStyle",
128
+ "type": "object",
129
+ "patternProperties": {
130
+ "^(.*)$": {
131
+ "anyOf": [
132
+ {
133
+ "type": "string"
134
+ },
135
+ {
136
+ "type": "number"
137
+ }
138
+ ]
139
+ }
140
+ }
141
+ },
142
+ "position": {
143
+ "title": "VirtualTouchPosition",
144
+ "additionalProperties": false,
145
+ "type": "object",
146
+ "properties": {
147
+ "top": {
148
+ "anyOf": [
149
+ {
150
+ "type": "string"
151
+ },
152
+ {
153
+ "type": "number"
154
+ }
155
+ ]
156
+ },
157
+ "right": {
158
+ "anyOf": [
159
+ {
160
+ "type": "string"
161
+ },
162
+ {
163
+ "type": "number"
164
+ }
165
+ ]
166
+ },
167
+ "bottom": {
168
+ "anyOf": [
169
+ {
170
+ "type": "string"
171
+ },
172
+ {
173
+ "type": "number"
174
+ }
175
+ ]
176
+ },
177
+ "left": {
178
+ "anyOf": [
179
+ {
180
+ "type": "string"
181
+ },
182
+ {
183
+ "type": "number"
184
+ }
185
+ ]
186
+ },
187
+ "transform": {
188
+ "type": "string"
189
+ }
190
+ }
191
+ },
192
+ "size": {
193
+ "type": "number"
194
+ },
195
+ "thumbSize": {
196
+ "type": "number"
197
+ },
198
+ "maxDistance": {
199
+ "type": "number"
200
+ },
201
+ "deadzone": {
202
+ "type": "number"
203
+ },
204
+ "directionThreshold": {
205
+ "type": "number"
206
+ },
207
+ "horizontalAxis": {
208
+ "anyOf": [
209
+ {
210
+ "const": "Horizontal",
211
+ "type": "string"
212
+ },
213
+ {
214
+ "const": "SecondaryHorizontal",
215
+ "type": "string"
216
+ }
217
+ ]
218
+ },
219
+ "verticalAxis": {
220
+ "anyOf": [
221
+ {
222
+ "const": "Vertical",
223
+ "type": "string"
224
+ },
225
+ {
226
+ "const": "SecondaryVertical",
227
+ "type": "string"
228
+ }
229
+ ]
230
+ },
231
+ "emitDirections": {
232
+ "type": "boolean"
233
+ },
234
+ "svg": {
235
+ "type": "object",
236
+ "properties": {
237
+ "base": {
238
+ "type": "string"
239
+ },
240
+ "thumb": {
241
+ "type": "string"
242
+ }
243
+ }
244
+ }
245
+ }
246
+ },
247
+ {
248
+ "const": false,
249
+ "type": "boolean"
250
+ }
251
+ ]
252
+ },
253
+ "right": {
254
+ "anyOf": [
255
+ {
256
+ "title": "VirtualTouchJoystickConfig",
257
+ "additionalProperties": false,
258
+ "type": "object",
259
+ "properties": {
260
+ "enabled": {
261
+ "type": "boolean"
262
+ },
263
+ "className": {
264
+ "type": "string"
265
+ },
266
+ "style": {
267
+ "title": "VirtualTouchStyle",
268
+ "type": "object",
269
+ "patternProperties": {
270
+ "^(.*)$": {
271
+ "anyOf": [
272
+ {
273
+ "type": "string"
274
+ },
275
+ {
276
+ "type": "number"
277
+ }
278
+ ]
279
+ }
280
+ }
281
+ },
282
+ "position": {
283
+ "title": "VirtualTouchPosition",
284
+ "additionalProperties": false,
285
+ "type": "object",
286
+ "properties": {
287
+ "top": {
288
+ "anyOf": [
289
+ {
290
+ "type": "string"
291
+ },
292
+ {
293
+ "type": "number"
294
+ }
295
+ ]
296
+ },
297
+ "right": {
298
+ "anyOf": [
299
+ {
300
+ "type": "string"
301
+ },
302
+ {
303
+ "type": "number"
304
+ }
305
+ ]
306
+ },
307
+ "bottom": {
308
+ "anyOf": [
309
+ {
310
+ "type": "string"
311
+ },
312
+ {
313
+ "type": "number"
314
+ }
315
+ ]
316
+ },
317
+ "left": {
318
+ "anyOf": [
319
+ {
320
+ "type": "string"
321
+ },
322
+ {
323
+ "type": "number"
324
+ }
325
+ ]
326
+ },
327
+ "transform": {
328
+ "type": "string"
329
+ }
330
+ }
331
+ },
332
+ "size": {
333
+ "type": "number"
334
+ },
335
+ "thumbSize": {
336
+ "type": "number"
337
+ },
338
+ "maxDistance": {
339
+ "type": "number"
340
+ },
341
+ "deadzone": {
342
+ "type": "number"
343
+ },
344
+ "directionThreshold": {
345
+ "type": "number"
346
+ },
347
+ "horizontalAxis": {
348
+ "anyOf": [
349
+ {
350
+ "const": "Horizontal",
351
+ "type": "string"
352
+ },
353
+ {
354
+ "const": "SecondaryHorizontal",
355
+ "type": "string"
356
+ }
357
+ ]
358
+ },
359
+ "verticalAxis": {
360
+ "anyOf": [
361
+ {
362
+ "const": "Vertical",
363
+ "type": "string"
364
+ },
365
+ {
366
+ "const": "SecondaryVertical",
367
+ "type": "string"
368
+ }
369
+ ]
370
+ },
371
+ "emitDirections": {
372
+ "type": "boolean"
373
+ },
374
+ "svg": {
375
+ "type": "object",
376
+ "properties": {
377
+ "base": {
378
+ "type": "string"
379
+ },
380
+ "thumb": {
381
+ "type": "string"
382
+ }
383
+ }
384
+ }
385
+ }
386
+ },
387
+ {
388
+ "const": false,
389
+ "type": "boolean"
390
+ }
391
+ ]
392
+ }
393
+ }
394
+ },
395
+ {
396
+ "const": false,
397
+ "type": "boolean"
398
+ }
399
+ ]
400
+ },
401
+ "buttons": {
402
+ "anyOf": [
403
+ {
404
+ "title": "VirtualTouchButtonsConfig",
405
+ "description": "Keys are touch button slots: A, B, X, Y, Start, Select, L, R, LTrigger, RTrigger, Up, Down, Left, Right.",
406
+ "type": "object",
407
+ "patternProperties": {
408
+ "^(.*)$": {
409
+ "anyOf": [
410
+ {
411
+ "title": "VirtualTouchButtonConfig",
412
+ "additionalProperties": false,
413
+ "type": "object",
414
+ "properties": {
415
+ "enabled": {
416
+ "type": "boolean"
417
+ },
418
+ "className": {
419
+ "type": "string"
420
+ },
421
+ "style": {
422
+ "title": "VirtualTouchStyle",
423
+ "type": "object",
424
+ "patternProperties": {
425
+ "^(.*)$": {
426
+ "anyOf": [
427
+ {
428
+ "type": "string"
429
+ },
430
+ {
431
+ "type": "number"
432
+ }
433
+ ]
434
+ }
435
+ }
436
+ },
437
+ "position": {
438
+ "title": "VirtualTouchPosition",
439
+ "additionalProperties": false,
440
+ "type": "object",
441
+ "properties": {
442
+ "top": {
443
+ "anyOf": [
444
+ {
445
+ "type": "string"
446
+ },
447
+ {
448
+ "type": "number"
449
+ }
450
+ ]
451
+ },
452
+ "right": {
453
+ "anyOf": [
454
+ {
455
+ "type": "string"
456
+ },
457
+ {
458
+ "type": "number"
459
+ }
460
+ ]
461
+ },
462
+ "bottom": {
463
+ "anyOf": [
464
+ {
465
+ "type": "string"
466
+ },
467
+ {
468
+ "type": "number"
469
+ }
470
+ ]
471
+ },
472
+ "left": {
473
+ "anyOf": [
474
+ {
475
+ "type": "string"
476
+ },
477
+ {
478
+ "type": "number"
479
+ }
480
+ ]
481
+ },
482
+ "transform": {
483
+ "type": "string"
484
+ }
485
+ }
486
+ },
487
+ "size": {
488
+ "type": "number"
489
+ },
490
+ "label": {
491
+ "type": "string"
492
+ },
493
+ "svg": {
494
+ "type": "string"
495
+ }
496
+ }
497
+ },
498
+ {
499
+ "const": false,
500
+ "type": "boolean"
501
+ }
502
+ ]
503
+ }
504
+ }
505
+ },
506
+ {
507
+ "const": false,
508
+ "type": "boolean"
509
+ }
510
+ ]
511
+ }
512
+ }
513
+ },
514
+ "includeDefaults": {
515
+ "type": "boolean"
516
+ }
517
+ }
518
+ }
519
+ }
520
+ },
521
+ "aspectRatio": {
522
+ "anyOf": [
523
+ {
524
+ "type": "number"
525
+ },
526
+ {
527
+ "type": "string"
528
+ }
529
+ ]
530
+ },
531
+ "preset": {
532
+ "type": "string"
533
+ },
534
+ "resolution": {
535
+ "title": "ResolutionInput",
536
+ "anyOf": [
537
+ {
538
+ "type": "string"
539
+ },
540
+ {
541
+ "type": "object",
542
+ "properties": {
543
+ "width": {
544
+ "exclusiveMinimum": 0,
545
+ "type": "number"
546
+ },
547
+ "height": {
548
+ "exclusiveMinimum": 0,
549
+ "type": "number"
550
+ }
551
+ },
552
+ "required": [
553
+ "width",
554
+ "height"
555
+ ]
556
+ },
557
+ {
558
+ "const": "native",
559
+ "type": "string"
560
+ }
561
+ ]
562
+ },
563
+ "mobile": {
564
+ "title": "GameDeviceConfigJson",
565
+ "additionalProperties": false,
566
+ "type": "object",
567
+ "properties": {
568
+ "aspectRatio": {
569
+ "anyOf": [
570
+ {
571
+ "type": "number"
572
+ },
573
+ {
574
+ "type": "string"
575
+ }
576
+ ]
577
+ },
578
+ "preset": {
579
+ "type": "string"
580
+ },
581
+ "resolution": {
582
+ "title": "ResolutionInput",
583
+ "anyOf": [
584
+ {
585
+ "type": "string"
586
+ },
587
+ {
588
+ "type": "object",
589
+ "properties": {
590
+ "width": {
591
+ "exclusiveMinimum": 0,
592
+ "type": "number"
593
+ },
594
+ "height": {
595
+ "exclusiveMinimum": 0,
596
+ "type": "number"
597
+ }
598
+ },
599
+ "required": [
600
+ "width",
601
+ "height"
602
+ ]
603
+ },
604
+ {
605
+ "const": "native",
606
+ "type": "string"
607
+ }
608
+ ]
609
+ },
610
+ "controls": {
611
+ "type": "boolean"
612
+ }
613
+ }
614
+ },
615
+ "fullscreen": {
616
+ "type": "boolean"
617
+ },
618
+ "bodyBackground": {
619
+ "type": "string"
620
+ },
621
+ "containerId": {
622
+ "type": "string"
623
+ }
624
+ }
625
+ }