@zylem/game-lib 0.7.0 → 0.8.2

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