@ts-defold/types 1.2.22 → 1.2.24
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.
- package/index.d.ts +55 -6
- 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.
|
|
5
|
+
// DEFOLD. stable version 1.5.0 (4c7215dc20c897981ae164a1e893bb00353db836)
|
|
6
6
|
// =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= //
|
|
7
7
|
|
|
8
8
|
|
|
@@ -1723,6 +1723,13 @@ with a custom curve. See the animation guide for more information.
|
|
|
1723
1723
|
*/
|
|
1724
1724
|
export function get_line_break(node: node): boolean
|
|
1725
1725
|
|
|
1726
|
+
/**
|
|
1727
|
+
* Returns the material of a node.
|
|
1728
|
+
* The material must be mapped to the gui scene in the gui editor.
|
|
1729
|
+
* @param node node to get the material for
|
|
1730
|
+
*/
|
|
1731
|
+
export function get_material(node: node): void
|
|
1732
|
+
|
|
1726
1733
|
/**
|
|
1727
1734
|
* Retrieves the node with the specified id.
|
|
1728
1735
|
* @param id id of the node to retrieve
|
|
@@ -2270,6 +2277,21 @@ the new state of the emitter:
|
|
|
2270
2277
|
*/
|
|
2271
2278
|
export function set_line_break(node: node, line_break: boolean): void
|
|
2272
2279
|
|
|
2280
|
+
/**
|
|
2281
|
+
* Set the material on a node. The material must be mapped to the gui scene in the gui editor,
|
|
2282
|
+
* and assigning a material is supported for all node types. To set the default material that
|
|
2283
|
+
* is assigned to the gui scene node, use `gui.reset_material(node_id)` instead.
|
|
2284
|
+
* @param node node to set material for
|
|
2285
|
+
* @param material material id
|
|
2286
|
+
*/
|
|
2287
|
+
export function set_material(node: node, material: string | hash): void
|
|
2288
|
+
|
|
2289
|
+
/**
|
|
2290
|
+
* Resets the node material to the material assigned in the gui scene.
|
|
2291
|
+
* @param node node to reset the material for
|
|
2292
|
+
*/
|
|
2293
|
+
export function set_material(node: node): void
|
|
2294
|
+
|
|
2273
2295
|
/**
|
|
2274
2296
|
* Sets the outer bounds mode for a pie node.
|
|
2275
2297
|
* @param node node for which to set the outer bounds mode
|
|
@@ -2516,10 +2538,16 @@ the new state of the emitter:
|
|
|
2516
2538
|
export type layout_changed = "layout_changed"
|
|
2517
2539
|
|
|
2518
2540
|
/**
|
|
2519
|
-
* The material used when rendering the gui. The type of the property is hash.
|
|
2541
|
+
* The main material (the default material assigned to a GUI) used when rendering the gui. The type of the property is hash.
|
|
2520
2542
|
*/
|
|
2521
2543
|
export let material: any
|
|
2522
2544
|
|
|
2545
|
+
/**
|
|
2546
|
+
* The materials used when rendering the gui. The type of the property is hash.
|
|
2547
|
+
* Key must be specified in options table.
|
|
2548
|
+
*/
|
|
2549
|
+
export let materials: any
|
|
2550
|
+
|
|
2523
2551
|
|
|
2524
2552
|
|
|
2525
2553
|
|
|
@@ -4521,11 +4549,26 @@ a list of the indices of the geometry in the form {i0, i1, i2, ..., in}. Each tr
|
|
|
4521
4549
|
export function set_atlas(path: hash | string, table: any): void
|
|
4522
4550
|
|
|
4523
4551
|
/**
|
|
4524
|
-
*
|
|
4552
|
+
* Sets the buffer of a resource. By default, setting the resource buffer will either copy the data from the incoming buffer object
|
|
4553
|
+
* to the buffer stored in the destination resource, or make a new buffer object if the sizes between the source buffer and the destination buffer
|
|
4554
|
+
* stored in the resource differs. In some cases, e.g performance reasons, it might be beneficial to just set the buffer object on the resource without copying or cloning.
|
|
4555
|
+
* To achieve this, set the `transfer_ownership` flag to true in the argument table. Transferring ownership from a lua buffer to a resource with this function
|
|
4556
|
+
* works exactly the same as resource.create_buffer: the destination resource will take ownership of the buffer held by the lua reference, i.e the buffer will not automatically be removed
|
|
4557
|
+
* when the lua reference to the buffer is garbage collected.
|
|
4558
|
+
* Note: When setting a buffer with `transfer_ownership = true`, the currently bound buffer in the resource will be destroyed.
|
|
4525
4559
|
* @param path The path to the resource
|
|
4526
4560
|
* @param buffer The resource buffer
|
|
4561
|
+
* @param table A table containing info about how to set the buffer. Supported entries:
|
|
4562
|
+
|
|
4563
|
+
|
|
4564
|
+
|
|
4565
|
+
`transfer_ownership`
|
|
4566
|
+
optional flag to determine wether or not the resource should take over ownership of the buffer object (default false)
|
|
4567
|
+
|
|
4568
|
+
|
|
4569
|
+
|
|
4527
4570
|
*/
|
|
4528
|
-
export function set_buffer(path: hash | string, buffer: buffer): void
|
|
4571
|
+
export function set_buffer(path: hash | string, buffer: buffer, table: any): void
|
|
4529
4572
|
|
|
4530
4573
|
/**
|
|
4531
4574
|
* Update internal sound resource (wavc/oggc) with new data
|
|
@@ -6776,12 +6819,12 @@ sound pan between -1 and 1, default is 0. The final pan of the sound will be an
|
|
|
6776
6819
|
`speed`
|
|
6777
6820
|
sound speed where 1.0 is normal speed, 0.5 is half speed and 2.0 is double speed. The final speed of the sound will be a multiplication of this speed and the sound speed.
|
|
6778
6821
|
|
|
6779
|
-
* @param complete_function function to call when the sound has finished playing.
|
|
6822
|
+
* @param complete_function function to call when the sound has finished playing or stopped manually via sound.stop.
|
|
6780
6823
|
|
|
6781
6824
|
`self`
|
|
6782
6825
|
The current object.
|
|
6783
6826
|
`message_id`
|
|
6784
|
-
The name of the completion message, `"sound_done"
|
|
6827
|
+
The name of the completion message, which can be either `"sound_done"` if the sound has finished playing, or `"sound_stopped"` if it was stopped manually.
|
|
6785
6828
|
`message`
|
|
6786
6829
|
Information about the completion:
|
|
6787
6830
|
|
|
@@ -6838,6 +6881,12 @@ The invoker of the callback: the sound component.
|
|
|
6838
6881
|
*/
|
|
6839
6882
|
export type sound_done = "sound_done"
|
|
6840
6883
|
|
|
6884
|
+
/**
|
|
6885
|
+
* This message is sent back to the sender of a `play_sound` message, if the sound
|
|
6886
|
+
* has been manually stopped.
|
|
6887
|
+
*/
|
|
6888
|
+
export type sound_stopped = "sound_stopped"
|
|
6889
|
+
|
|
6841
6890
|
/**
|
|
6842
6891
|
* The speed on the sound-component where 1.0 is normal speed, 0.5 is half
|
|
6843
6892
|
* speed and 2.0 is double speed.
|