@ts-defold/types 1.2.15 → 1.2.16

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 (2) hide show
  1. package/index.d.ts +69 -56
  2. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -2,7 +2,7 @@
2
2
  /// <reference types="lua-types/5.1" />
3
3
  /// <reference types="typescript-to-lua/language-extensions" />
4
4
 
5
- // DEFOLD. stable version 1.3.4 (80b1b73fd9cdbd4682c2583403fddfbaf0919107)
5
+ // DEFOLD. stable version 1.3.5 (28eafea5a8bfedfddc621a7cd00b39f25bd34922)
6
6
  // =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= //
7
7
 
8
8
 
@@ -1875,6 +1875,14 @@ with a custom curve. See the animation guide for more information.
1875
1875
  */
1876
1876
  export function get_tracking(node: node): number
1877
1877
 
1878
+ /**
1879
+ * Returns `true` if a node is visible and `false` if it's not.
1880
+ * Invisible nodes are not rendered.
1881
+ * @param node node to query
1882
+ * @return visible whether the node is visible or not
1883
+ */
1884
+ export function get_visible(node: node): boolean
1885
+
1878
1886
  /**
1879
1887
  * Returns the scene width.
1880
1888
  * @return width scene width
@@ -2429,6 +2437,13 @@ the new state of the emitter:
2429
2437
  */
2430
2438
  export function set_tracking(node: node, tracking: number): void
2431
2439
 
2440
+ /**
2441
+ * Set if a node should be visible or not. Only visible nodes are rendered.
2442
+ * @param node node to be visible or not
2443
+ * @param visible whether the node should be visible or not
2444
+ */
2445
+ export function set_visible(node: node, visible: boolean): void
2446
+
2432
2447
  /**
2433
2448
  * The x-anchor specifies how the node is moved when the game is run in a different resolution.
2434
2449
  * @param node node to set x-anchor for
@@ -2472,8 +2487,12 @@ the new state of the emitter:
2472
2487
  /**
2473
2488
  * Stops the particle fx for a gui node
2474
2489
  * @param node node to stop particle fx for
2490
+ * @param options options when stopping the particle fx. Supported options:
2491
+
2492
+ `clear`: instantly clear spawned particles
2493
+
2475
2494
  */
2476
- export function stop_particlefx(node: node): void
2495
+ export function stop_particlefx(node: node, options: any): void
2477
2496
 
2478
2497
 
2479
2498
  /**
@@ -2622,11 +2641,11 @@ See each joint type for possible properties field. The one field that is accepte
2622
2641
  * Returns the group name of a collision object as a hash.
2623
2642
  * @param url the collision object to return the group of.
2624
2643
  * @return hash value of the group.
2625
- local function check_is_enemy()
2644
+ `local function check_is_enemy()
2626
2645
  local group = physics.get_group(&quot;#collisionobject&quot;)
2627
2646
  return group == hash(&quot;enemy&quot;)
2628
2647
  end
2629
-
2648
+ `
2630
2649
  */
2631
2650
  export function get_group(url: string | hash | url): hash
2632
2651
 
@@ -2669,12 +2688,12 @@ end
2669
2688
  * @param url the collision object to check the mask of.
2670
2689
  * @param group the name of the group to check for.
2671
2690
  * @return boolean value of the maskbit. 'true' if present, 'false' otherwise.
2672
- local function is_invincible()
2691
+ `local function is_invincible()
2673
2692
  -- check if the collisionobject would collide with the &quot;bullet&quot; group
2674
2693
  local invincible = physics.get_maskbit(&quot;#collisionobject&quot;, &quot;bullet&quot;)
2675
2694
  return invincible
2676
2695
  end
2677
-
2696
+ `
2678
2697
  */
2679
2698
  export function get_maskbit(url: string | hash | url, group: string): boolean
2680
2699
 
@@ -2728,10 +2747,10 @@ Set to `true` to return all ray cast hits. If `false`, it will only return the c
2728
2747
  * a collision object in the editor.
2729
2748
  * @param url the collision object affected.
2730
2749
  * @param group the new group name to be assigned.
2731
- local function change_collision_group()
2750
+ `local function change_collision_group()
2732
2751
  physics.set_group(&quot;#collisionobject&quot;, &quot;enemy&quot;)
2733
2752
  end
2734
-
2753
+ `
2735
2754
  */
2736
2755
  export function set_group(url: string | hash | url, group: string): void
2737
2756
 
@@ -2758,11 +2777,11 @@ Note: The `collide_connected` field cannot be updated/changed after a connection
2758
2777
  * @param url the collision object to change the mask of.
2759
2778
  * @param group the name of the group (maskbit) to modify in the mask.
2760
2779
  * @param maskbit boolean value of the new maskbit. 'true' to enable, 'false' to disable.
2761
- local function make_invincible()
2780
+ `local function make_invincible()
2762
2781
  -- no longer collide with the &quot;bullet&quot; group
2763
2782
  physics.set_maskbit(&quot;#collisionobject&quot;, &quot;bullet&quot;, false)
2764
2783
  end
2765
-
2784
+ `
2766
2785
  */
2767
2786
  export function set_maskbit(url: string | hash | url, group: string, maskbit: boolean): void
2768
2787
 
@@ -2777,12 +2796,12 @@ end
2777
2796
  * Collision objects tend to fall asleep when inactive for a small period of time for
2778
2797
  * efficiency reasons. This function wakes them up.
2779
2798
  * @param url the collision object to wake.
2780
- function on_input(self, action_id, action)
2799
+ `function on_input(self, action_id, action)
2781
2800
  if action_id == hash(&quot;test&quot;) and action.pressed then
2782
2801
  physics.wakeup(&quot;#collisionobject&quot;)
2783
2802
  end
2784
2803
  end
2785
-
2804
+ `
2786
2805
  */
2787
2806
  export function wakeup(url: string | hash | url): void
2788
2807
 
@@ -3066,6 +3085,26 @@ declare namespace render {
3066
3085
  */
3067
3086
  export let BLEND_ZERO: any
3068
3087
 
3088
+ /**
3089
+ *
3090
+ */
3091
+ export let BUFFER_COLOR0_BIT: any
3092
+
3093
+ /**
3094
+ *
3095
+ */
3096
+ export let BUFFER_COLOR1_BIT: any
3097
+
3098
+ /**
3099
+ *
3100
+ */
3101
+ export let BUFFER_COLOR2_BIT: any
3102
+
3103
+ /**
3104
+ *
3105
+ */
3106
+ export let BUFFER_COLOR3_BIT: any
3107
+
3069
3108
  /**
3070
3109
  *
3071
3110
  */
@@ -3302,7 +3341,8 @@ declare namespace render {
3302
3341
  export let WRAP_REPEAT: any
3303
3342
 
3304
3343
  /**
3305
- * Clear buffers in the currently enabled render target with specified value.
3344
+ * Clear buffers in the currently enabled render target with specified value. If the render target has been created with multiple
3345
+ * color attachments, all buffers will be cleared with the same value.
3306
3346
  * @param buffers table with keys specifying which buffers to clear and values set to clear values. Available keys are:
3307
3347
 
3308
3348
  - `render.BUFFER_COLOR_BIT`
@@ -3412,6 +3452,14 @@ A frustum matrix used to cull renderable items. (E.g. `local frustum = proj * vi
3412
3452
  - `render.BUFFER_DEPTH_BIT`
3413
3453
  - `render.BUFFER_STENCIL_BIT`
3414
3454
 
3455
+ If the render target has been created with multiple color attachments, these buffer types can be used
3456
+ to enable those textures as well. Currently only 4 color attachments are supported.
3457
+
3458
+ - `render.BUFFER_COLOR0_BIT`
3459
+ - `render.BUFFER_COLOR1_BIT`
3460
+ - `render.BUFFER_COLOR2_BIT`
3461
+ - `render.BUFFER_COLOR3_BIT`
3462
+
3415
3463
  */
3416
3464
  export function enable_texture(unit: number, render_target: any, buffer_type: any): void
3417
3465
 
@@ -3528,6 +3576,9 @@ A frustum matrix used to cull renderable items. (E.g. `local frustum = proj * vi
3528
3576
  *
3529
3577
  *
3530
3578
  *
3579
+ * The render target can be created to support multiple color attachments. Each attachment can have different format settings and texture filters,
3580
+ * but attachments must be added in sequence, meaning you cannot create a render target at slot 0 and 3.
3581
+ * Instead it has to be created with all four buffer types ranging from [0..3] (as denoted by render.BUFFER_COLORX_BIT where 'X' is the attachment you want to create).
3531
3582
  * @param name render target name
3532
3583
  * @param parameters table of buffer parameters, see the description for available keys and values
3533
3584
  * @return render_target new render target
@@ -5571,20 +5622,6 @@ declare namespace collectionproxy {
5571
5622
  */
5572
5623
  export type async_load = "async_load"
5573
5624
 
5574
- /**
5575
- * return an indexed table of missing resources for a collection proxy. Each
5576
- * entry is a hexadecimal string that represents the data of the specific
5577
- * resource. This representation corresponds with the filename for each
5578
- * individual resource that is exported when you bundle an application with
5579
- * LiveUpdate functionality. It should be considered good practise to always
5580
- * check whether or not there are any missing resources in a collection proxy
5581
- * before attempting to load the collection proxy.
5582
- * @param collectionproxy the collectionproxy to check for missing
5583
- resources.
5584
- * @return resources the missing resources
5585
- */
5586
- export function missing_resources(collectionproxy: url): any
5587
-
5588
5625
  /**
5589
5626
  * Post this message to a collection-proxy-component to disable the referenced collection, which in turn disables the contained game objects and components.
5590
5627
  */
@@ -5978,8 +6015,12 @@ the new state of the emitter:
5978
6015
  * Stopping a particle FX does not remove already spawned particles.
5979
6016
  * Which particle FX to stop is identified by the URL.
5980
6017
  * @param url the particle fx that should stop playing
6018
+ * @param options Options when stopping the particle fx. Supported options:
6019
+
6020
+ `clear`: instantly clear spawned particles
6021
+
5981
6022
  */
5982
- export function stop(url: string | hash | url): void
6023
+ export function stop(url: string | hash | url, options: any): void
5983
6024
 
5984
6025
  }
5985
6026
  // =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= //
@@ -6211,34 +6252,6 @@ The invoker of the callback: the sound component.
6211
6252
  // =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= //
6212
6253
 
6213
6254
 
6214
- declare namespace spine {
6215
-
6216
- /**
6217
- * This message is sent when a Spine animation has finished playing back to the script
6218
- * that started the animation.
6219
- * ⚠ No message is sent if a completion callback function was supplied
6220
- * when the animation was started. No message is sent if the animation is cancelled with
6221
- * model.cancel(). This message is sent only for animations that play with
6222
- * the following playback modes:
6223
- *
6224
- * - `go.PLAYBACK_ONCE_FORWARD`
6225
- * - `go.PLAYBACK_ONCE_BACKWARD`
6226
- * - `go.PLAYBACK_ONCE_PINGPONG`
6227
- *
6228
- */
6229
- export type spine_animation_done = "spine_animation_done"
6230
-
6231
- /**
6232
- * This message is sent when Spine animation playback fires events. These events
6233
- * has to be defined on the animation track in the Spine animation editor. An event
6234
- * can contain custom values expressed in the fields `integer`, `float` and `string`.
6235
- */
6236
- export type spine_event = "spine_event"
6237
-
6238
- }
6239
- // =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= //
6240
-
6241
-
6242
6255
  declare namespace sprite {
6243
6256
 
6244
6257
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ts-defold/types",
3
- "version": "1.2.15",
3
+ "version": "1.2.16",
4
4
  "description": "TypeScript definitions for Defold",
5
5
  "repository": "github:ts-defold/types",
6
6
  "keywords": [