@defold-typescript/library-types 0.22.0 → 0.24.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 (145) hide show
  1. package/api-doc/boom.json +3870 -0
  2. package/api-doc/{bridge.bridge.json → bridge.json} +754 -844
  3. package/api-doc/bzAnim.json +338 -0
  4. package/api-doc/decore.json +23 -23
  5. package/api-doc/defcon.json +150 -0
  6. package/api-doc/{defmath.defmath.json → defmath.json} +6 -46
  7. package/api-doc/defsave.json +518 -0
  8. package/api-doc/deftest.json +741 -0
  9. package/api-doc/{dicebag.dicebag.json → dicebag.json} +19 -1
  10. package/api-doc/druid.json +249 -1846
  11. package/api-doc/event.json +1074 -0
  12. package/api-doc/gooey.json +2050 -0
  13. package/api-doc/immutable.json +65 -0
  14. package/api-doc/in.accelerometer.json +75 -1
  15. package/api-doc/in.button.json +17 -10
  16. package/api-doc/in.cursor.json +26 -0
  17. package/api-doc/in.gesture.json +401 -6
  18. package/api-doc/in.keyboard.json +2 -0
  19. package/api-doc/in.mapper.json +12 -8
  20. package/api-doc/in.onscreen.json +61 -5
  21. package/api-doc/in.state.json +61 -13
  22. package/api-doc/in.textbox.json +23 -12
  23. package/api-doc/in.triggers.json +336 -0
  24. package/api-doc/lang.json +528 -0
  25. package/api-doc/{event.event.json → log.json} +96 -101
  26. package/api-doc/metrics.fps.json +61 -2
  27. package/api-doc/metrics.mem.json +61 -2
  28. package/api-doc/monarch.monarch.json +249 -7
  29. package/api-doc/monarch.transitions.easings.json +19 -26
  30. package/api-doc/monarch.transitions.gui.json +782 -79
  31. package/api-doc/nakama.engine.defold.json +31 -18
  32. package/api-doc/{nakama.nakama.json → nakama.json} +4752 -2554
  33. package/api-doc/nakama.util.log.json +32 -4
  34. package/api-doc/narrator.json +647 -0
  35. package/api-doc/openapi/nakama.nakama.json +7680 -0
  36. package/api-doc/orthographic.camera.json +96 -98
  37. package/api-doc/orthographic.json +602 -0
  38. package/api-doc/panthera.json +1183 -0
  39. package/api-doc/{persist.persist.json → persist.json} +26 -1
  40. package/api-doc/{platypus.platypus.json → platypus.json} +68 -14
  41. package/api-doc/proto.json +995 -0
  42. package/api-doc/{rendy.rendy.json → rendy.json} +46 -99
  43. package/api-doc/richtext.color.json +77 -0
  44. package/api-doc/richtext.richtext.json +375 -5
  45. package/api-doc/saver.saver.json +714 -263
  46. package/api-doc/saver.storage.json +283 -52
  47. package/api-doc/squid.json +846 -0
  48. package/api-doc/{starly.starly.json → starly.json} +1 -1
  49. package/api-doc/tweener.json +277 -0
  50. package/api-doc/{yagames.yagames.json → yagames.json} +784 -189
  51. package/api-doc/{zzfx.api.json → zzfx.json} +9 -9
  52. package/authored-targets.json +403 -0
  53. package/generated/{boom.boom.d.ts → boom.d.ts} +14 -0
  54. package/generated/bridge.d.ts +468 -0
  55. package/generated/{bzAnim.bzLibrary.d.ts → bzAnim.d.ts} +6 -0
  56. package/generated/decore.d.ts +37 -37
  57. package/generated/defcon.d.ts +43 -0
  58. package/generated/{defmath.defmath.d.ts → defmath.d.ts} +3 -2
  59. package/generated/defsave.d.ts +144 -0
  60. package/generated/{dicebag.dicebag.d.ts → dicebag.d.ts} +25 -0
  61. package/generated/druid.d.ts +198 -502
  62. package/generated/event.d.ts +318 -0
  63. package/generated/{gooey.gooey.d.ts → gooey.d.ts} +61 -6
  64. package/generated/immutable.d.ts +13 -0
  65. package/generated/in.onscreen.d.ts +5 -0
  66. package/generated/in.textbox.d.ts +4 -0
  67. package/generated/lang.d.ts +101 -0
  68. package/generated/log.d.ts +36 -0
  69. package/generated/metrics.fps.d.ts +19 -1
  70. package/generated/metrics.mem.d.ts +19 -1
  71. package/generated/monarch.monarch.d.ts +44 -1
  72. package/generated/monarch.transitions.easings.d.ts +0 -1
  73. package/generated/monarch.transitions.gui.d.ts +96 -12
  74. package/generated/nakama.d.ts +1158 -0
  75. package/generated/nakama.engine.defold.d.ts +3 -1
  76. package/generated/nakama.util.log.d.ts +6 -0
  77. package/generated/narrator.d.ts +121 -0
  78. package/generated/openapi/nakama.nakama.d.ts +884 -0
  79. package/generated/orthographic.camera.d.ts +24 -38
  80. package/generated/orthographic.d.ts +155 -0
  81. package/generated/panthera.d.ts +170 -0
  82. package/generated/{persist.persist.d.ts → persist.d.ts} +3 -0
  83. package/generated/{platypus.platypus.d.ts → platypus.d.ts} +9 -0
  84. package/generated/proto.d.ts +146 -0
  85. package/generated/{rendy.rendy.d.ts → rendy.d.ts} +33 -80
  86. package/generated/richtext.color.d.ts +15 -0
  87. package/generated/saver.saver.d.ts +289 -42
  88. package/generated/saver.storage.d.ts +79 -14
  89. package/generated/squid.d.ts +127 -0
  90. package/generated/tweener.d.ts +42 -0
  91. package/generated/{yagames.yagames.d.ts → yagames.d.ts} +151 -29
  92. package/generated/{zzfx.api.d.ts → zzfx.d.ts} +7 -0
  93. package/library-classification.json +0 -227
  94. package/library-targets.json +1 -284
  95. package/luals-targets.json +168 -1
  96. package/openapi-targets.json +17 -0
  97. package/package.json +9 -88
  98. package/script-api-targets.json +15 -0
  99. package/scripts/__snapshots__/parse-luals.test.ts.snap +504 -85
  100. package/scripts/apply-luals-overrides.ts +95 -0
  101. package/scripts/authored-parity.ts +718 -0
  102. package/scripts/emit-library-dts.ts +177 -19
  103. package/scripts/extract-api-doc.ts +189 -38
  104. package/scripts/fidelity-floor.ts +178 -0
  105. package/scripts/import-upstream-docs.ts +125 -0
  106. package/scripts/lower-api-doc.ts +69 -19
  107. package/scripts/luals-fidelity.ts +22 -10
  108. package/scripts/map-luals-types.ts +86 -22
  109. package/scripts/parse-lua-surface.ts +187 -0
  110. package/scripts/parse-luals.ts +473 -22
  111. package/scripts/parse-markdown-api.ts +247 -0
  112. package/scripts/parse-openapi-api.ts +313 -0
  113. package/scripts/sync-authored-types.ts +249 -0
  114. package/scripts/sync-library-types.ts +99 -3
  115. package/scripts/sync-luals-types.ts +29 -2
  116. package/scripts/sync-markdown-types.ts +761 -0
  117. package/scripts/sync-openapi-types.ts +308 -0
  118. package/scripts/sync-script-api-types.ts +367 -0
  119. package/api-doc/boom.boom.json +0 -26
  120. package/api-doc/bzAnim.bzLibrary.json +0 -156
  121. package/api-doc/defcon.console.json +0 -109
  122. package/api-doc/defsave.defsave.json +0 -175
  123. package/api-doc/deftest.deftest.json +0 -71
  124. package/api-doc/gooey.gooey.json +0 -963
  125. package/api-doc/immutable.immutable.json +0 -63
  126. package/api-doc/lang.lang.json +0 -411
  127. package/api-doc/log.log.json +0 -50
  128. package/api-doc/narrator.narrator.json +0 -150
  129. package/api-doc/proto.proto.json +0 -355
  130. package/api-doc/squid.squid.json +0 -660
  131. package/api-doc/tweener.tweener.json +0 -419
  132. package/generated/bridge.bridge.d.ts +0 -533
  133. package/generated/defcon.console.d.ts +0 -24
  134. package/generated/defsave.defsave.d.ts +0 -31
  135. package/generated/event.event.d.ts +0 -54
  136. package/generated/immutable.immutable.d.ts +0 -13
  137. package/generated/lang.lang.d.ts +0 -33
  138. package/generated/log.log.d.ts +0 -40
  139. package/generated/nakama.nakama.d.ts +0 -594
  140. package/generated/narrator.narrator.d.ts +0 -66
  141. package/generated/proto.proto.d.ts +0 -36
  142. package/generated/squid.squid.d.ts +0 -106
  143. package/generated/tweener.tweener.d.ts +0 -151
  144. /package/generated/{deftest.deftest.d.ts → deftest.d.ts} +0 -0
  145. /package/generated/{starly.starly.d.ts → starly.d.ts} +0 -0
@@ -0,0 +1,1183 @@
1
+ {
2
+ "info": {
3
+ "namespace": "panthera",
4
+ "brief": "",
5
+ "description": ""
6
+ },
7
+ "elements": [
8
+ {
9
+ "type": "FUNCTION",
10
+ "name": "set_logger",
11
+ "brief": "Customize the logging mechanism used by Panthera Runtime. You can use Defold Log library or provide a custom logger.",
12
+ "description": "Customize the logging mechanism used by Panthera Runtime. You can use Defold Log library or provide a custom logger.",
13
+ "parameters": [
14
+ {
15
+ "name": "logger_instance",
16
+ "doc": "A logger object that follows the specified logging interface. Pass nil to use empty logger",
17
+ "types": [
18
+ "panthera_logger | LuaTable | undefined"
19
+ ],
20
+ "is_optional": "True",
21
+ "is_vararg": "False"
22
+ }
23
+ ],
24
+ "returnvalues": []
25
+ },
26
+ {
27
+ "type": "FUNCTION",
28
+ "name": "create_go",
29
+ "brief": "Load and create a game object animation state from a Lua table or JSON file.",
30
+ "description": "Load and create a game object animation state from a Lua table or JSON file.",
31
+ "parameters": [
32
+ {
33
+ "name": "animation_or_path",
34
+ "doc": "Lua table with animation data or path to JSON animation file in custom resources",
35
+ "types": [
36
+ "string | LuaTable"
37
+ ],
38
+ "is_optional": "False",
39
+ "is_vararg": "False"
40
+ },
41
+ {
42
+ "name": "collection_name",
43
+ "doc": "Collection name to load nodes from. Pass nil if no collection is used",
44
+ "types": [
45
+ "string | undefined"
46
+ ],
47
+ "is_optional": "True",
48
+ "is_vararg": "False"
49
+ },
50
+ {
51
+ "name": "objects",
52
+ "doc": "Table with game objects from collectionfactory. Pass nil if no objects are used",
53
+ "types": [
54
+ "LuaTable<string | Hash, string | Hash> | undefined"
55
+ ],
56
+ "is_optional": "True",
57
+ "is_vararg": "False"
58
+ }
59
+ ],
60
+ "returnvalues": [
61
+ {
62
+ "name": "",
63
+ "doc": "New animation state object",
64
+ "types": [
65
+ "panthera_animation"
66
+ ]
67
+ }
68
+ ]
69
+ },
70
+ {
71
+ "type": "FUNCTION",
72
+ "name": "create_gui",
73
+ "brief": "Load and create a GUI animation state from a Lua table or JSON file.",
74
+ "description": "Load and create a GUI animation state from a Lua table or JSON file.",
75
+ "parameters": [
76
+ {
77
+ "name": "animation_or_path",
78
+ "doc": "Lua table with animation data or path to JSON animation file in custom resources",
79
+ "types": [
80
+ "string | LuaTable"
81
+ ],
82
+ "is_optional": "False",
83
+ "is_vararg": "False"
84
+ },
85
+ {
86
+ "name": "template",
87
+ "doc": "The GUI template ID to load nodes from. Pass nil if no template is used",
88
+ "types": [
89
+ "string | undefined"
90
+ ],
91
+ "is_optional": "True",
92
+ "is_vararg": "False"
93
+ },
94
+ {
95
+ "name": "nodes",
96
+ "doc": "Table with nodes from gui.clone_tree() function. Pass nil if no nodes are used",
97
+ "types": [
98
+ "LuaTable<string | Hash, Opaque<\"node\">> | undefined"
99
+ ],
100
+ "is_optional": "True",
101
+ "is_vararg": "False"
102
+ }
103
+ ],
104
+ "returnvalues": [
105
+ {
106
+ "name": "",
107
+ "doc": "New animation state object",
108
+ "types": [
109
+ "panthera_animation"
110
+ ]
111
+ }
112
+ ]
113
+ },
114
+ {
115
+ "type": "FUNCTION",
116
+ "name": "create",
117
+ "brief": "Load an animation from a Lua table or JSON file and create an animation state using a specified adapter.",
118
+ "description": "Load an animation from a Lua table or JSON file and create an animation state using a specified adapter.",
119
+ "parameters": [
120
+ {
121
+ "name": "animation_or_path",
122
+ "doc": "Lua table with animation data or path to JSON animation file in custom resources",
123
+ "types": [
124
+ "string | LuaTable"
125
+ ],
126
+ "is_optional": "False",
127
+ "is_vararg": "False"
128
+ },
129
+ {
130
+ "name": "adapter",
131
+ "doc": "An adapter object that specifies how Panthera Runtime interacts with Engine",
132
+ "types": [
133
+ "panthera_adapter"
134
+ ],
135
+ "is_optional": "False",
136
+ "is_vararg": "False"
137
+ },
138
+ {
139
+ "name": "get_node",
140
+ "doc": "Function to get node by node_id. A custom function to resolve nodes by their ID",
141
+ "types": [
142
+ "(node_id: string) => Opaque<\"node\">"
143
+ ],
144
+ "is_optional": "False",
145
+ "is_vararg": "False"
146
+ }
147
+ ],
148
+ "returnvalues": [
149
+ {
150
+ "name": "",
151
+ "doc": "New animation state object",
152
+ "types": [
153
+ "panthera_animation"
154
+ ]
155
+ }
156
+ ]
157
+ },
158
+ {
159
+ "type": "FUNCTION",
160
+ "name": "clone_state",
161
+ "brief": "Clone an existing animation state object, enabling multiple instances of the same animation to play simultaneously or independently.",
162
+ "description": "Clone an existing animation state object, enabling multiple instances of the same animation to play simultaneously or independently.",
163
+ "parameters": [
164
+ {
165
+ "name": "animation_state",
166
+ "doc": "The animation state object to clone",
167
+ "types": [
168
+ "panthera_animation"
169
+ ],
170
+ "is_optional": "False",
171
+ "is_vararg": "False"
172
+ }
173
+ ],
174
+ "returnvalues": [
175
+ {
176
+ "name": "",
177
+ "doc": "New animation state object that is a copy of the original",
178
+ "types": [
179
+ "panthera_animation"
180
+ ]
181
+ }
182
+ ]
183
+ },
184
+ {
185
+ "type": "FUNCTION",
186
+ "name": "play",
187
+ "brief": "Play an animation with specified ID and options.",
188
+ "description": "Play an animation with specified ID and options.",
189
+ "parameters": [
190
+ {
191
+ "name": "animation_state",
192
+ "doc": "The animation state object returned by `create_go` or `create_gui`",
193
+ "types": [
194
+ "panthera_animation"
195
+ ],
196
+ "is_optional": "False",
197
+ "is_vararg": "False"
198
+ },
199
+ {
200
+ "name": "animation_id",
201
+ "doc": "The ID of the animation to play",
202
+ "types": [
203
+ "string"
204
+ ],
205
+ "is_optional": "False",
206
+ "is_vararg": "False"
207
+ },
208
+ {
209
+ "name": "options",
210
+ "doc": "Options for the animation playback",
211
+ "types": [
212
+ "panthera_options | undefined"
213
+ ],
214
+ "is_optional": "True",
215
+ "is_vararg": "False"
216
+ }
217
+ ],
218
+ "returnvalues": []
219
+ },
220
+ {
221
+ "type": "FUNCTION",
222
+ "name": "play_tweener",
223
+ "brief": "Play animation with easing support using tweener. Allows for non-linear animation playback with custom easing functions.",
224
+ "description": "Play animation with easing support using tweener. Allows for non-linear animation playback with custom easing functions.",
225
+ "parameters": [
226
+ {
227
+ "name": "animation_state",
228
+ "doc": "The animation state object",
229
+ "types": [
230
+ "panthera_animation"
231
+ ],
232
+ "is_optional": "False",
233
+ "is_vararg": "False"
234
+ },
235
+ {
236
+ "name": "animation_id",
237
+ "doc": "The ID of the animation to play",
238
+ "types": [
239
+ "string"
240
+ ],
241
+ "is_optional": "False",
242
+ "is_vararg": "False"
243
+ },
244
+ {
245
+ "name": "options",
246
+ "doc": "Options including easing function, speed, and callbacks",
247
+ "types": [
248
+ "panthera_options_tweener | undefined"
249
+ ],
250
+ "is_optional": "True",
251
+ "is_vararg": "False"
252
+ }
253
+ ],
254
+ "returnvalues": []
255
+ },
256
+ {
257
+ "type": "FUNCTION",
258
+ "name": "play_detached",
259
+ "brief": "Play animation as a child of the current animation state, allowing multiple animations to run independently and simultaneously.\n\nThis creates a detached animation that runs in parallel with the main animation state without affecting it.\nThe child animation will be automatically cleaned up when it completes.",
260
+ "description": "Play animation as a child of the current animation state, allowing multiple animations to run independently and simultaneously.\n\nThis creates a detached animation that runs in parallel with the main animation state without affecting it.\nThe child animation will be automatically cleaned up when it completes.",
261
+ "parameters": [
262
+ {
263
+ "name": "animation_state",
264
+ "doc": "The parent animation state object",
265
+ "types": [
266
+ "panthera_animation"
267
+ ],
268
+ "is_optional": "False",
269
+ "is_vararg": "False"
270
+ },
271
+ {
272
+ "name": "animation_id",
273
+ "doc": "The ID of the animation to play as a detached child",
274
+ "types": [
275
+ "string"
276
+ ],
277
+ "is_optional": "False",
278
+ "is_vararg": "False"
279
+ },
280
+ {
281
+ "name": "options",
282
+ "doc": "Options for the detached animation playback",
283
+ "types": [
284
+ "panthera_options | undefined"
285
+ ],
286
+ "is_optional": "True",
287
+ "is_vararg": "False"
288
+ }
289
+ ],
290
+ "returnvalues": []
291
+ },
292
+ {
293
+ "type": "FUNCTION",
294
+ "name": "set_time",
295
+ "brief": "Set the current time of an animation. This function stops any currently playing animation.",
296
+ "description": "Set the current time of an animation. This function stops any currently playing animation.",
297
+ "parameters": [
298
+ {
299
+ "name": "animation_state",
300
+ "doc": "The animation state object returned by `create_go` or `create_gui`.",
301
+ "types": [
302
+ "panthera_animation"
303
+ ],
304
+ "is_optional": "False",
305
+ "is_vararg": "False"
306
+ },
307
+ {
308
+ "name": "animation_id",
309
+ "doc": "The ID of the animation to modify.",
310
+ "types": [
311
+ "string"
312
+ ],
313
+ "is_optional": "False",
314
+ "is_vararg": "False"
315
+ },
316
+ {
317
+ "name": "time",
318
+ "doc": "The target time in seconds to which the animation should be set.",
319
+ "types": [
320
+ "number"
321
+ ],
322
+ "is_optional": "False",
323
+ "is_vararg": "False"
324
+ },
325
+ {
326
+ "name": "event_callback",
327
+ "doc": "",
328
+ "types": [
329
+ "((event_id: string, node: Opaque<\"node\"> | undefined, string_value: string, number_value: number) => void) | undefined"
330
+ ],
331
+ "is_optional": "True",
332
+ "is_vararg": "False"
333
+ }
334
+ ],
335
+ "returnvalues": [
336
+ {
337
+ "name": "",
338
+ "doc": "True if animation state was set successfully, false if animation can't be set",
339
+ "types": [
340
+ "boolean"
341
+ ]
342
+ }
343
+ ]
344
+ },
345
+ {
346
+ "type": "FUNCTION",
347
+ "name": "get_time",
348
+ "brief": "Retrieve the current playback time in seconds of an animation. If the animation is not playing, the function returns 0.",
349
+ "description": "Retrieve the current playback time in seconds of an animation. If the animation is not playing, the function returns 0.",
350
+ "parameters": [
351
+ {
352
+ "name": "animation_state",
353
+ "doc": "The animation state object",
354
+ "types": [
355
+ "panthera_animation"
356
+ ],
357
+ "is_optional": "False",
358
+ "is_vararg": "False"
359
+ }
360
+ ],
361
+ "returnvalues": [
362
+ {
363
+ "name": "",
364
+ "doc": "Current animation time in seconds",
365
+ "types": [
366
+ "number"
367
+ ]
368
+ }
369
+ ]
370
+ },
371
+ {
372
+ "type": "FUNCTION",
373
+ "name": "stop",
374
+ "brief": "Stop a currently playing animation. The animation will be stopped at current time.",
375
+ "description": "Stop a currently playing animation. The animation will be stopped at current time.",
376
+ "parameters": [
377
+ {
378
+ "name": "animation_state",
379
+ "doc": "The animation state object to stop",
380
+ "types": [
381
+ "panthera_animation"
382
+ ],
383
+ "is_optional": "False",
384
+ "is_vararg": "False"
385
+ }
386
+ ],
387
+ "returnvalues": [
388
+ {
389
+ "name": "",
390
+ "doc": "True if animation was stopped, false if animation is not playing",
391
+ "types": [
392
+ "boolean"
393
+ ]
394
+ }
395
+ ]
396
+ },
397
+ {
398
+ "type": "FUNCTION",
399
+ "name": "get_duration",
400
+ "brief": "Retrieve the total duration of a specific animation.",
401
+ "description": "Retrieve the total duration of a specific animation.",
402
+ "parameters": [
403
+ {
404
+ "name": "animation_state",
405
+ "doc": "The animation state object",
406
+ "types": [
407
+ "panthera_animation"
408
+ ],
409
+ "is_optional": "False",
410
+ "is_vararg": "False"
411
+ },
412
+ {
413
+ "name": "animation_id",
414
+ "doc": "The ID of the animation whose duration you want to retrieve",
415
+ "types": [
416
+ "string"
417
+ ],
418
+ "is_optional": "False",
419
+ "is_vararg": "False"
420
+ }
421
+ ],
422
+ "returnvalues": [
423
+ {
424
+ "name": "",
425
+ "doc": "The total duration of the animation in seconds",
426
+ "types": [
427
+ "number"
428
+ ]
429
+ }
430
+ ]
431
+ },
432
+ {
433
+ "type": "FUNCTION",
434
+ "name": "is_playing",
435
+ "brief": "Check if an animation is currently playing.",
436
+ "description": "Check if an animation is currently playing.",
437
+ "parameters": [
438
+ {
439
+ "name": "animation_state",
440
+ "doc": "The animation state object",
441
+ "types": [
442
+ "panthera_animation"
443
+ ],
444
+ "is_optional": "False",
445
+ "is_vararg": "False"
446
+ }
447
+ ],
448
+ "returnvalues": [
449
+ {
450
+ "name": "",
451
+ "doc": "True if the animation is currently playing, false otherwise",
452
+ "types": [
453
+ "boolean"
454
+ ]
455
+ }
456
+ ]
457
+ },
458
+ {
459
+ "type": "FUNCTION",
460
+ "name": "get_latest_animation_id",
461
+ "brief": "Get the ID of the last animation that was started.",
462
+ "description": "Get the ID of the last animation that was started.",
463
+ "parameters": [
464
+ {
465
+ "name": "animation_state",
466
+ "doc": "The animation state object",
467
+ "types": [
468
+ "panthera_animation"
469
+ ],
470
+ "is_optional": "False",
471
+ "is_vararg": "False"
472
+ }
473
+ ],
474
+ "returnvalues": [
475
+ {
476
+ "name": "",
477
+ "doc": "Animation ID or nil if no animation was started",
478
+ "types": [
479
+ "string | undefined"
480
+ ]
481
+ }
482
+ ]
483
+ },
484
+ {
485
+ "type": "FUNCTION",
486
+ "name": "get_animations",
487
+ "brief": "Return a list of animation IDs from the created animation state.",
488
+ "description": "Return a list of animation IDs from the created animation state.",
489
+ "parameters": [
490
+ {
491
+ "name": "animation_state",
492
+ "doc": "The animation state object",
493
+ "types": [
494
+ "panthera_animation"
495
+ ],
496
+ "is_optional": "False",
497
+ "is_vararg": "False"
498
+ }
499
+ ],
500
+ "returnvalues": [
501
+ {
502
+ "name": "",
503
+ "doc": "Array of animation IDs available in the animation state",
504
+ "types": [
505
+ "string[]"
506
+ ]
507
+ }
508
+ ]
509
+ },
510
+ {
511
+ "type": "FUNCTION",
512
+ "name": "reload_animation",
513
+ "brief": "Reload animations from JSON files, useful for development and debugging.\n\nThe animations loaded from Lua tables will not be reloaded.\nAnimation will be reloaded only at desktop.",
514
+ "description": "Reload animations from JSON files, useful for development and debugging.\n\nThe animations loaded from Lua tables will not be reloaded.\nAnimation will be reloaded only at desktop.",
515
+ "parameters": [
516
+ {
517
+ "name": "animation_path",
518
+ "doc": "Specific animation to reload. If omitted, all loaded animations are reloaded",
519
+ "types": [
520
+ "string | undefined"
521
+ ],
522
+ "is_optional": "True",
523
+ "is_vararg": "False"
524
+ }
525
+ ],
526
+ "returnvalues": []
527
+ },
528
+ {
529
+ "type": "TYPEDEF",
530
+ "name": "panthera_animation",
531
+ "properties": [
532
+ {
533
+ "name": "adapter",
534
+ "brief": "Adapter to use for animation",
535
+ "description": "Adapter to use for animation",
536
+ "types": [
537
+ "panthera_adapter"
538
+ ]
539
+ },
540
+ {
541
+ "name": "speed",
542
+ "brief": "Animation speed multiplier",
543
+ "description": "Animation speed multiplier",
544
+ "types": [
545
+ "number"
546
+ ]
547
+ },
548
+ {
549
+ "name": "current_time",
550
+ "brief": "Current animation time",
551
+ "description": "Current animation time",
552
+ "types": [
553
+ "number"
554
+ ]
555
+ },
556
+ {
557
+ "name": "nodes",
558
+ "brief": "Animation nodes used in animation",
559
+ "description": "Animation nodes used in animation",
560
+ "types": [
561
+ "LuaTable"
562
+ ]
563
+ },
564
+ {
565
+ "name": "childs",
566
+ "brief": "List of active child animations",
567
+ "description": "List of active child animations",
568
+ "types": [
569
+ "panthera_animation[] | undefined"
570
+ ]
571
+ },
572
+ {
573
+ "name": "get_node",
574
+ "brief": "Function to get node by node_id",
575
+ "description": "Function to get node by node_id",
576
+ "types": [
577
+ "(node_id: string) => Opaque<\"node\">"
578
+ ]
579
+ },
580
+ {
581
+ "name": "animation_id",
582
+ "brief": "Current animation ID",
583
+ "description": "Current animation ID",
584
+ "types": [
585
+ "string | undefined"
586
+ ]
587
+ },
588
+ {
589
+ "name": "previous_animation_id",
590
+ "brief": "Previous animation ID",
591
+ "description": "Previous animation ID",
592
+ "types": [
593
+ "string | undefined"
594
+ ]
595
+ },
596
+ {
597
+ "name": "animation_path",
598
+ "brief": "Animation path to JSON file",
599
+ "description": "Animation path to JSON file",
600
+ "types": [
601
+ "string"
602
+ ]
603
+ },
604
+ {
605
+ "name": "animation_keys_index",
606
+ "brief": "Animation keys index",
607
+ "description": "Animation keys index",
608
+ "types": [
609
+ "number"
610
+ ]
611
+ },
612
+ {
613
+ "name": "events",
614
+ "brief": "List of events triggered in this animation loop",
615
+ "description": "List of events triggered in this animation loop",
616
+ "types": [
617
+ "LuaTable | undefined"
618
+ ]
619
+ },
620
+ {
621
+ "name": "timer_id",
622
+ "brief": "Timer ID for animation",
623
+ "description": "Timer ID for animation",
624
+ "types": [
625
+ "number | undefined"
626
+ ]
627
+ }
628
+ ]
629
+ },
630
+ {
631
+ "type": "TYPEDEF",
632
+ "name": "panthera_options",
633
+ "properties": [
634
+ {
635
+ "name": "is_loop",
636
+ "brief": "Loop the animation. Triggers the callback at each loop end if set to `true`",
637
+ "description": "Loop the animation. Triggers the callback at each loop end if set to `true`",
638
+ "types": [
639
+ "boolean | undefined"
640
+ ]
641
+ },
642
+ {
643
+ "name": "is_skip_init",
644
+ "brief": "Start animation from its current state, skipping initial setup",
645
+ "description": "Start animation from its current state, skipping initial setup",
646
+ "types": [
647
+ "boolean | undefined"
648
+ ]
649
+ },
650
+ {
651
+ "name": "is_detached",
652
+ "brief": "Play animation as a detached child of the current animation state, allowing multiple animations to run independently and simultaneously.",
653
+ "description": "Play animation as a detached child of the current animation state, allowing multiple animations to run independently and simultaneously.",
654
+ "types": [
655
+ "boolean | undefined"
656
+ ]
657
+ },
658
+ {
659
+ "name": "speed",
660
+ "brief": "Playback speed multiplier (default `1`). Values >1 increase speed, <1 decrease",
661
+ "description": "Playback speed multiplier (default `1`). Values >1 increase speed, <1 decrease",
662
+ "types": [
663
+ "number | undefined"
664
+ ]
665
+ },
666
+ {
667
+ "name": "easing",
668
+ "brief": "Easing function for animation. Will use tweener for non-linear animation (slower performance)",
669
+ "description": "Easing function for animation. Will use tweener for non-linear animation (slower performance)",
670
+ "types": [
671
+ "string | Opaque<\"constant\"> | undefined"
672
+ ]
673
+ },
674
+ {
675
+ "name": "callback",
676
+ "brief": "Function called when the animation finishes. Receives `animation_id`",
677
+ "description": "Function called when the animation finishes. Receives `animation_id`",
678
+ "types": [
679
+ "((animation_id: string) => undefined) | undefined"
680
+ ]
681
+ },
682
+ {
683
+ "name": "callback_event",
684
+ "brief": "Function triggered by animation events",
685
+ "description": "Function triggered by animation events",
686
+ "types": [
687
+ "((event_id: string, node: Opaque<\"node\"> | undefined, string_value: string, number_value: number) => undefined) | undefined"
688
+ ]
689
+ }
690
+ ]
691
+ },
692
+ {
693
+ "type": "TYPEDEF",
694
+ "name": "panthera_options_tweener",
695
+ "properties": [
696
+ {
697
+ "name": "speed",
698
+ "brief": "Animation speed multiplier, default is 1",
699
+ "description": "Animation speed multiplier, default is 1",
700
+ "types": [
701
+ "number | undefined"
702
+ ]
703
+ },
704
+ {
705
+ "name": "is_loop",
706
+ "brief": "If true, the animation will loop with trigger callback each loop",
707
+ "description": "If true, the animation will loop with trigger callback each loop",
708
+ "types": [
709
+ "boolean | undefined"
710
+ ]
711
+ },
712
+ {
713
+ "name": "easing",
714
+ "brief": "Easing function for play animation with. Works currently only on play_tweener",
715
+ "description": "Easing function for play animation with. Works currently only on play_tweener",
716
+ "types": [
717
+ "string | Opaque<\"constant\"> | undefined"
718
+ ]
719
+ },
720
+ {
721
+ "name": "callback",
722
+ "brief": "Callback when animation is finished",
723
+ "description": "Callback when animation is finished",
724
+ "types": [
725
+ "((animation_id: string) => undefined) | undefined"
726
+ ]
727
+ },
728
+ {
729
+ "name": "callback_event",
730
+ "brief": "Callback when animation trigger event",
731
+ "description": "Callback when animation trigger event",
732
+ "types": [
733
+ "((event_id: string, node: Opaque<\"node\"> | undefined, string_value: string, number_value: number) => undefined) | undefined"
734
+ ]
735
+ },
736
+ {
737
+ "name": "is_reverse",
738
+ "brief": "If true, the animation will play in reverse",
739
+ "description": "If true, the animation will play in reverse",
740
+ "types": [
741
+ "boolean | undefined"
742
+ ]
743
+ },
744
+ {
745
+ "name": "from",
746
+ "brief": "Start value for tween animation",
747
+ "description": "Start value for tween animation",
748
+ "types": [
749
+ "number | undefined"
750
+ ]
751
+ },
752
+ {
753
+ "name": "to",
754
+ "brief": "End value for tween animation",
755
+ "description": "End value for tween animation",
756
+ "types": [
757
+ "number | undefined"
758
+ ]
759
+ }
760
+ ]
761
+ },
762
+ {
763
+ "type": "TYPEDEF",
764
+ "name": "panthera",
765
+ "properties": [
766
+ {
767
+ "name": "SPEED",
768
+ "brief": "Default speed of all animations",
769
+ "description": "Default speed of all animations",
770
+ "types": [
771
+ "number"
772
+ ]
773
+ }
774
+ ]
775
+ },
776
+ {
777
+ "type": "TYPEDEF",
778
+ "name": "panthera_adapter",
779
+ "properties": [
780
+ {
781
+ "name": "get_node",
782
+ "brief": "Function to get node by node_id.",
783
+ "description": "Function to get node by node_id.",
784
+ "types": [
785
+ "(node_id: string) => Opaque<\"node\">"
786
+ ]
787
+ },
788
+ {
789
+ "name": "get_easing",
790
+ "brief": "Function to get defold easing by easing_id. Default is gui.EASING",
791
+ "description": "Function to get defold easing by easing_id. Default is gui.EASING",
792
+ "types": [
793
+ "(easing_id: string) => Hash"
794
+ ]
795
+ },
796
+ {
797
+ "name": "tween_animation_key",
798
+ "brief": "Function to tween animation key.",
799
+ "description": "Function to tween animation key.",
800
+ "types": [
801
+ "(node: Opaque<\"node\">, property_id: string, easing: Hash | number[], duration: number, end_value: number) => undefined"
802
+ ]
803
+ },
804
+ {
805
+ "name": "trigger_animation_key",
806
+ "brief": "Function to trigger animation key.",
807
+ "description": "Function to trigger animation key.",
808
+ "types": [
809
+ "(node: Opaque<\"node\">, property_id: string, value: unknown) => undefined"
810
+ ]
811
+ },
812
+ {
813
+ "name": "event_animation_key",
814
+ "brief": "Function to trigger event in animation.",
815
+ "description": "Function to trigger event in animation.",
816
+ "types": [
817
+ "(node: Opaque<\"node\">, key: panthera_animation_data_animation_key) => undefined"
818
+ ]
819
+ },
820
+ {
821
+ "name": "set_node_property",
822
+ "brief": "Function to set node property. Return true if success",
823
+ "description": "Function to set node property. Return true if success",
824
+ "types": [
825
+ "(node: Opaque<\"node\">, property_id: string, value: number | string) => boolean"
826
+ ]
827
+ },
828
+ {
829
+ "name": "stop_tween",
830
+ "brief": "Function to stop tween animation key",
831
+ "description": "Function to stop tween animation key",
832
+ "types": [
833
+ "(node: Opaque<\"node\">, property_id: string) => undefined"
834
+ ]
835
+ },
836
+ {
837
+ "name": "is_node_valid",
838
+ "brief": "Function to check if node is valid",
839
+ "description": "Function to check if node is valid",
840
+ "types": [
841
+ "(node: Opaque<\"node\">) => boolean"
842
+ ]
843
+ }
844
+ ]
845
+ },
846
+ {
847
+ "type": "TYPEDEF",
848
+ "name": "panthera_logger",
849
+ "properties": [
850
+ {
851
+ "name": "trace",
852
+ "brief": "",
853
+ "description": "",
854
+ "types": [
855
+ "(logger: panthera_logger, message: string, data: unknown | undefined) => void"
856
+ ]
857
+ },
858
+ {
859
+ "name": "debug",
860
+ "brief": "",
861
+ "description": "",
862
+ "types": [
863
+ "(logger: panthera_logger, message: string, data: unknown | undefined) => void"
864
+ ]
865
+ },
866
+ {
867
+ "name": "info",
868
+ "brief": "",
869
+ "description": "",
870
+ "types": [
871
+ "(logger: panthera_logger, message: string, data: unknown | undefined) => void"
872
+ ]
873
+ },
874
+ {
875
+ "name": "warn",
876
+ "brief": "",
877
+ "description": "",
878
+ "types": [
879
+ "(logger: panthera_logger, message: string, data: unknown | undefined) => void"
880
+ ]
881
+ },
882
+ {
883
+ "name": "error",
884
+ "brief": "",
885
+ "description": "",
886
+ "types": [
887
+ "(logger: panthera_logger, message: string, data: unknown | undefined) => void"
888
+ ]
889
+ }
890
+ ]
891
+ },
892
+ {
893
+ "type": "TYPEDEF",
894
+ "name": "panthera_animation_data_node"
895
+ },
896
+ {
897
+ "type": "TYPEDEF",
898
+ "name": "panthera_animation_data_metadata",
899
+ "properties": [
900
+ {
901
+ "name": "gui_path",
902
+ "brief": "",
903
+ "description": "",
904
+ "types": [
905
+ "string"
906
+ ]
907
+ },
908
+ {
909
+ "name": "fps",
910
+ "brief": "",
911
+ "description": "",
912
+ "types": [
913
+ "number"
914
+ ]
915
+ },
916
+ {
917
+ "name": "settings",
918
+ "brief": "",
919
+ "description": "",
920
+ "types": [
921
+ "LuaTable"
922
+ ]
923
+ },
924
+ {
925
+ "name": "gizmo_steps",
926
+ "brief": "",
927
+ "description": "",
928
+ "types": [
929
+ "LuaTable"
930
+ ]
931
+ },
932
+ {
933
+ "name": "template_animation_paths",
934
+ "brief": "template_animation_paths[node_id]: path. Value filled at loading animation data",
935
+ "description": "template_animation_paths[node_id]: path. Value filled at loading animation data",
936
+ "types": [
937
+ "LuaTable<string, string>"
938
+ ]
939
+ }
940
+ ]
941
+ },
942
+ {
943
+ "type": "TYPEDEF",
944
+ "name": "panthera_animation_data_animation",
945
+ "properties": [
946
+ {
947
+ "name": "duration",
948
+ "brief": "",
949
+ "description": "",
950
+ "types": [
951
+ "number"
952
+ ]
953
+ },
954
+ {
955
+ "name": "animation_id",
956
+ "brief": "",
957
+ "description": "",
958
+ "types": [
959
+ "string"
960
+ ]
961
+ },
962
+ {
963
+ "name": "initial_state",
964
+ "brief": "",
965
+ "description": "",
966
+ "types": [
967
+ "string"
968
+ ]
969
+ },
970
+ {
971
+ "name": "animation_keys",
972
+ "brief": "",
973
+ "description": "",
974
+ "types": [
975
+ "panthera_animation_data_animation_key[]"
976
+ ]
977
+ }
978
+ ]
979
+ },
980
+ {
981
+ "type": "TYPEDEF",
982
+ "name": "panthera_animation_data",
983
+ "properties": [
984
+ {
985
+ "name": "name",
986
+ "brief": "",
987
+ "description": "",
988
+ "types": [
989
+ "string"
990
+ ]
991
+ },
992
+ {
993
+ "name": "nodes",
994
+ "brief": "",
995
+ "description": "",
996
+ "types": [
997
+ "panthera_animation_data_node[]"
998
+ ]
999
+ },
1000
+ {
1001
+ "name": "animations",
1002
+ "brief": "",
1003
+ "description": "",
1004
+ "types": [
1005
+ "panthera_animation_data_animation[]"
1006
+ ]
1007
+ },
1008
+ {
1009
+ "name": "metadata",
1010
+ "brief": "",
1011
+ "description": "",
1012
+ "types": [
1013
+ "panthera_animation_data_metadata"
1014
+ ]
1015
+ },
1016
+ {
1017
+ "name": "group_animation_keys",
1018
+ "brief": "group_animation_keys[animation_id][node_id][property_id]: keys[]. Value filled at loading animation data",
1019
+ "description": "group_animation_keys[animation_id][node_id][property_id]: keys[]. Value filled at loading animation data",
1020
+ "types": [
1021
+ "LuaTable<string, LuaTable<string, LuaTable<string, panthera_animation_data_animation_key[]>>>"
1022
+ ]
1023
+ },
1024
+ {
1025
+ "name": "animations_dict",
1026
+ "brief": "animations_dict[animation_id]: animation. Value filled at loading animation data",
1027
+ "description": "animations_dict[animation_id]: animation. Value filled at loading animation data",
1028
+ "types": [
1029
+ "LuaTable<string, panthera_animation_data_animation>"
1030
+ ]
1031
+ }
1032
+ ]
1033
+ },
1034
+ {
1035
+ "type": "TYPEDEF",
1036
+ "name": "panthera_animation_project_file",
1037
+ "properties": [
1038
+ {
1039
+ "name": "data",
1040
+ "brief": "Animation data",
1041
+ "description": "Animation data",
1042
+ "types": [
1043
+ "panthera_animation_data"
1044
+ ]
1045
+ },
1046
+ {
1047
+ "name": "format",
1048
+ "brief": "Animation format",
1049
+ "description": "Animation format",
1050
+ "types": [
1051
+ "string"
1052
+ ]
1053
+ },
1054
+ {
1055
+ "name": "version",
1056
+ "brief": "Animation version",
1057
+ "description": "Animation version",
1058
+ "types": [
1059
+ "string"
1060
+ ]
1061
+ },
1062
+ {
1063
+ "name": "type",
1064
+ "brief": "Animation type. Example: \"animation_editor\", \"atlas\"",
1065
+ "description": "Animation type. Example: \"animation_editor\", \"atlas\"",
1066
+ "types": [
1067
+ "string"
1068
+ ]
1069
+ }
1070
+ ]
1071
+ },
1072
+ {
1073
+ "type": "TYPEDEF",
1074
+ "name": "panthera_animation_data_animation_key",
1075
+ "properties": [
1076
+ {
1077
+ "name": "key_type",
1078
+ "brief": "",
1079
+ "description": "",
1080
+ "types": [
1081
+ "number"
1082
+ ]
1083
+ },
1084
+ {
1085
+ "name": "node_id",
1086
+ "brief": "",
1087
+ "description": "",
1088
+ "types": [
1089
+ "string"
1090
+ ]
1091
+ },
1092
+ {
1093
+ "name": "property_id",
1094
+ "brief": "",
1095
+ "description": "",
1096
+ "types": [
1097
+ "string"
1098
+ ]
1099
+ },
1100
+ {
1101
+ "name": "start_time",
1102
+ "brief": "",
1103
+ "description": "",
1104
+ "types": [
1105
+ "number"
1106
+ ]
1107
+ },
1108
+ {
1109
+ "name": "duration",
1110
+ "brief": "",
1111
+ "description": "",
1112
+ "types": [
1113
+ "number"
1114
+ ]
1115
+ },
1116
+ {
1117
+ "name": "start_value",
1118
+ "brief": "",
1119
+ "description": "",
1120
+ "types": [
1121
+ "number"
1122
+ ]
1123
+ },
1124
+ {
1125
+ "name": "end_value",
1126
+ "brief": "",
1127
+ "description": "",
1128
+ "types": [
1129
+ "number"
1130
+ ]
1131
+ },
1132
+ {
1133
+ "name": "easing",
1134
+ "brief": "",
1135
+ "description": "",
1136
+ "types": [
1137
+ "string"
1138
+ ]
1139
+ },
1140
+ {
1141
+ "name": "easing_custom",
1142
+ "brief": "",
1143
+ "description": "",
1144
+ "types": [
1145
+ "number[] | Vector | undefined"
1146
+ ]
1147
+ },
1148
+ {
1149
+ "name": "start_data",
1150
+ "brief": "",
1151
+ "description": "",
1152
+ "types": [
1153
+ "string"
1154
+ ]
1155
+ },
1156
+ {
1157
+ "name": "data",
1158
+ "brief": "",
1159
+ "description": "",
1160
+ "types": [
1161
+ "string"
1162
+ ]
1163
+ },
1164
+ {
1165
+ "name": "event_id",
1166
+ "brief": "",
1167
+ "description": "",
1168
+ "types": [
1169
+ "string"
1170
+ ]
1171
+ },
1172
+ {
1173
+ "name": "is_editor_only",
1174
+ "brief": "",
1175
+ "description": "",
1176
+ "types": [
1177
+ "boolean"
1178
+ ]
1179
+ }
1180
+ ]
1181
+ }
1182
+ ]
1183
+ }