@ts-defold/types 1.2.20 → 1.2.22

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 +692 -129
  2. package/package.json +5 -5
package/index.d.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  /** @noSelfInFile */
2
2
  /// <reference types="lua-types/5.1" />
3
- /// <reference types="typescript-to-lua/language-extensions" />
3
+ /// <reference types="@typescript-to-lua/language-extensions" />
4
4
 
5
- // DEFOLD. stable version 1.3.7 (f0ad06a2f1fbf0e9cbddbf96162a75bc006d84bb)
5
+ // DEFOLD. stable version 1.4.8 (504de7800fa81847bfc2e26a21973899db9dd747)
6
6
  // =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= //
7
7
 
8
8
 
@@ -323,10 +323,10 @@ declare namespace crash {
323
323
  /**
324
324
  * reads a system field from a loaded crash dump
325
325
  * @param handle crash dump handle
326
- * @param index
326
+ * @param index system field enum. Must be less than crash.SYSFIELD_MAX
327
327
  * @return value value recorded in the crash dump, or nil if it didn't exist
328
328
  */
329
- export function get_sys_field(handle: number, index: any): string
329
+ export function get_sys_field(handle: number, index: number): string
330
330
 
331
331
  /**
332
332
  * reads user field from a loaded crash dump
@@ -740,11 +740,18 @@ The id of the animated property.
740
740
  function delete$(id?: any, recursive?: boolean): void
741
741
  export { delete$ as delete }
742
742
 
743
+ /**
744
+ * check if the specified game object exists
745
+ * @param url url of the game object to check
746
+ * @return exists true if the game object exists
747
+ */
748
+ export function exists(url: string | hash | url): any
749
+
743
750
  /**
744
751
  * gets a named property of the specified game object or component
745
752
  * @param url url of the game object or component having the property
746
753
  * @param property id of the property to retrieve
747
- * @param options (optional) options table
754
+ * @param options optional options table
748
755
  index into array property (1 based)
749
756
  name of internal property
750
757
  * @return value the value of the specified property
@@ -853,7 +860,7 @@ name of internal property
853
860
  * @param url url of the game object or component having the property
854
861
  * @param property id of the property to set
855
862
  * @param value the value to set
856
- * @param options (optional) options table
863
+ * @param options optional options table
857
864
  index into array property (1 based)
858
865
  name of internal property
859
866
  */
@@ -1460,7 +1467,7 @@ with a custom curve. See the animation guide for more information.
1460
1467
  - `gui.PLAYBACK_LOOP_PINGPONG`
1461
1468
 
1462
1469
  */
1463
- export function animate(node: node, property: any, to: vmath.vector3 | vmath.vector4, easing: any, duration: number, delay?: number, complete_function?: any, playback?: any): void
1470
+ export function animate(node: node, property: any, to: number | vmath.vector3 | vmath.vector4 | vmath.quaternion, easing: any, duration: number, delay?: number, complete_function?: any, playback?: any): void
1464
1471
 
1465
1472
  /**
1466
1473
  * If an animation of the specified node is currently running (started by `gui.animate`), it will immediately be canceled.
@@ -1875,6 +1882,13 @@ with a custom curve. See the animation guide for more information.
1875
1882
  */
1876
1883
  export function get_tracking(node: node): number
1877
1884
 
1885
+ /**
1886
+ * Get a node and all its children as a Lua table.
1887
+ * @param node root node to get node tree from
1888
+ * @return clones a table mapping node ids to the corresponding nodes
1889
+ */
1890
+ export function get_tree(node: node): any
1891
+
1878
1892
  /**
1879
1893
  * Returns `true` if a node is visible and `false` if it's not.
1880
1894
  * Invisible nodes are not rendered.
@@ -2729,9 +2743,9 @@ Set to `true` to return all ray cast hits. If `false`, it will only return the c
2729
2743
  * @param from the world position of the start of the ray
2730
2744
  * @param to the world position of the end of the ray
2731
2745
  * @param groups a lua table containing the hashed groups for which to test collisions against
2732
- * @param request_id . It will be sent back in the response for identification, 0 by default
2746
+ * @param request_id a number between [0,-255]. It will be sent back in the response for identification, 0 by default
2733
2747
  */
2734
- export function raycast_async(from: vmath.vector3, to: vmath.vector3, groups: any, request_id?: any): void
2748
+ export function raycast_async(from: vmath.vector3, to: vmath.vector3, groups: any, request_id?: number): void
2735
2749
 
2736
2750
  /**
2737
2751
  * Set the gravity in runtime. The gravity change is not global, it will only affect
@@ -3446,15 +3460,15 @@ A frustum matrix used to cull renderable items. (E.g. `local frustum = proj * vi
3446
3460
  * used as texture with the specified unit.
3447
3461
  * A material shader can then use the texture to sample from.
3448
3462
  * @param unit texture unit to enable texture for
3449
- * @param render_target render target from which to enable the specified texture unit
3450
- * @param buffer_type buffer type from which to enable the texture
3463
+ * @param render_target render target or texture from which to enable the specified texture unit
3464
+ * @param buffer_type optional buffer type from which to enable the texture. Note that this argument only applies to render targets. Defaults to render.BUFFER_COLOR_BIT
3451
3465
 
3452
3466
  - `render.BUFFER_COLOR_BIT`
3453
3467
  - `render.BUFFER_DEPTH_BIT`
3454
3468
  - `render.BUFFER_STENCIL_BIT`
3455
3469
 
3456
3470
  If the render target has been created with multiple color attachments, these buffer types can be used
3457
- to enable those textures as well. Currently only 4 color attachments are supported.
3471
+ to enable those textures as well. Currently 4 color attachments are supported:
3458
3472
 
3459
3473
  - `render.BUFFER_COLOR0_BIT`
3460
3474
  - `render.BUFFER_COLOR1_BIT`
@@ -3462,7 +3476,7 @@ to enable those textures as well. Currently only 4 color attachments are support
3462
3476
  - `render.BUFFER_COLOR3_BIT`
3463
3477
 
3464
3478
  */
3465
- export function enable_texture(unit: number, render_target: any, buffer_type: any): void
3479
+ export function enable_texture(unit: number, render_target: any, buffer_type?: any): void
3466
3480
 
3467
3481
  /**
3468
3482
  * Returns the logical window height that is set in the "game.project" settings.
@@ -3580,6 +3594,14 @@ to enable those textures as well. Currently only 4 color attachments are support
3580
3594
  * The render target can be created to support multiple color attachments. Each attachment can have different format settings and texture filters,
3581
3595
  * but attachments must be added in sequence, meaning you cannot create a render target at slot 0 and 3.
3582
3596
  * 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).
3597
+ * It is not guaranteed that the device running the script can support creating render targets with multiple color attachments. To check if the device can support multiple attachments,
3598
+ * you can check if the `render` table contains any of the `BUFFER_COLOR1_BIT`, `BUFFER_COLOR2_BIT` or `BUFFER_COLOR3_BIT` constants:
3599
+ * `function init(self)
3600
+ * if render.BUFFER_COLOR1_BIT == nil then
3601
+ * -- this devices does not support multiple color attachments
3602
+ * end
3603
+ * end
3604
+ * `
3583
3605
  * @param name render target name
3584
3606
  * @param parameters table of buffer parameters, see the description for available keys and values
3585
3607
  * @return render_target new render target
@@ -3900,65 +3922,145 @@ Transient frame buffer types are only valid while the render target is active, i
3900
3922
  declare namespace resource {
3901
3923
 
3902
3924
  /**
3903
- * LIVEUPDATE_BUNDLED_RESOURCE_MISMATCH
3925
+ * BASIS_UASTC compression type
3904
3926
  */
3905
- export let LIVEUPDATE_BUNDLED_RESOURCE_MISMATCH: any
3927
+ export let COMPRESSION_TYPE_BASIS_UASTC: any
3906
3928
 
3907
3929
  /**
3908
- * LIVEUPDATE_ENGINE_VERSION_MISMATCH
3930
+ * COMPRESSION_TYPE_DEFAULT compression type
3909
3931
  */
3910
- export let LIVEUPDATE_ENGINE_VERSION_MISMATCH: any
3932
+ export let COMPRESSION_TYPE_DEFAULT: any
3911
3933
 
3912
3934
  /**
3913
- * LIVEUPDATE_FORMAT_ERROR
3935
+ * luminance type texture format
3914
3936
  */
3915
- export let LIVEUPDATE_FORMAT_ERROR: any
3937
+ export let TEXTURE_FORMAT_LUMINANCE: any
3916
3938
 
3917
3939
  /**
3918
- * LIVEUPDATE_INVALID_RESOURCE
3940
+ * R16F type texture format
3919
3941
  */
3920
- export let LIVEUPDATE_INVALID_RESOURCE: any
3942
+ export let TEXTURE_FORMAT_R16F: any
3921
3943
 
3922
3944
  /**
3923
- * LIVEUPDATE_OK
3945
+ * R32F type texture format
3924
3946
  */
3925
- export let LIVEUPDATE_OK: any
3947
+ export let TEXTURE_FORMAT_R32F: any
3926
3948
 
3927
3949
  /**
3928
- * LIVEUPDATE_SCHEME_MISMATCH
3950
+ * RG16F type texture format
3929
3951
  */
3930
- export let LIVEUPDATE_SCHEME_MISMATCH: any
3952
+ export let TEXTURE_FORMAT_RG16F: any
3931
3953
 
3932
3954
  /**
3933
- * LIVEUPDATE_SIGNATURE_MISMATCH
3955
+ * RG32F type texture format
3934
3956
  */
3935
- export let LIVEUPDATE_SIGNATURE_MISMATCH: any
3957
+ export let TEXTURE_FORMAT_RG32F: any
3936
3958
 
3937
3959
  /**
3938
- * LIVEUPDATE_VERSION_MISMATCH
3960
+ * RGB type texture format
3939
3961
  */
3940
- export let LIVEUPDATE_VERSION_MISMATCH: any
3962
+ export let TEXTURE_FORMAT_RGB: any
3941
3963
 
3942
3964
  /**
3943
- * luminance type texture format
3965
+ * RGB16F type texture format
3944
3966
  */
3945
- export let TEXTURE_FORMAT_LUMINANCE: any
3967
+ export let TEXTURE_FORMAT_RGB16F: any
3946
3968
 
3947
3969
  /**
3948
- * RGB type texture format
3970
+ * RGB32F type texture format
3949
3971
  */
3950
- export let TEXTURE_FORMAT_RGB: any
3972
+ export let TEXTURE_FORMAT_RGB32F: any
3951
3973
 
3952
3974
  /**
3953
3975
  * RGBA type texture format
3954
3976
  */
3955
3977
  export let TEXTURE_FORMAT_RGBA: any
3956
3978
 
3979
+ /**
3980
+ * RGBA16F type texture format
3981
+ */
3982
+ export let TEXTURE_FORMAT_RGBA16F: any
3983
+
3984
+ /**
3985
+ * RGBA32F type texture format
3986
+ */
3987
+ export let TEXTURE_FORMAT_RGBA32F: any
3988
+
3989
+ /**
3990
+ * RGBA_ASTC_4x4 type texture format
3991
+ */
3992
+ export let TEXTURE_FORMAT_RGBA_ASTC_4x4: any
3993
+
3994
+ /**
3995
+ * RGBA_BC3 type texture format
3996
+ */
3997
+ export let TEXTURE_FORMAT_RGBA_BC3: any
3998
+
3999
+ /**
4000
+ * RGBA_BC7 type texture format
4001
+ */
4002
+ export let TEXTURE_FORMAT_RGBA_BC7: any
4003
+
4004
+ /**
4005
+ * RGBA_ETC2 type texture format
4006
+ */
4007
+ export let TEXTURE_FORMAT_RGBA_ETC2: any
4008
+
4009
+ /**
4010
+ * RGBA_PVRTC_2BPPV1 type texture format
4011
+ */
4012
+ export let TEXTURE_FORMAT_RGBA_PVRTC_2BPPV1: any
4013
+
4014
+ /**
4015
+ * RGBA_PVRTC_4BPPV1 type texture format
4016
+ */
4017
+ export let TEXTURE_FORMAT_RGBA_PVRTC_4BPPV1: any
4018
+
4019
+ /**
4020
+ * RGB_BC1 type texture format
4021
+ */
4022
+ export let TEXTURE_FORMAT_RGB_BC1: any
4023
+
4024
+ /**
4025
+ * RGB_ETC1 type texture format
4026
+ */
4027
+ export let TEXTURE_FORMAT_RGB_ETC1: any
4028
+
4029
+ /**
4030
+ * RGB_PVRTC_2BPPV1 type texture format
4031
+ */
4032
+ export let TEXTURE_FORMAT_RGB_PVRTC_2BPPV1: any
4033
+
4034
+ /**
4035
+ * RGB_PVRTC_4BPPV1 type texture format
4036
+ */
4037
+ export let TEXTURE_FORMAT_RGB_PVRTC_4BPPV1: any
4038
+
4039
+ /**
4040
+ * RG_BC5 type texture format
4041
+ */
4042
+ export let TEXTURE_FORMAT_RG_BC5: any
4043
+
4044
+ /**
4045
+ * R_BC4 type texture format
4046
+ */
4047
+ export let TEXTURE_FORMAT_R_BC4: any
4048
+
3957
4049
  /**
3958
4050
  * 2D texture type
3959
4051
  */
3960
4052
  export let TEXTURE_TYPE_2D: any
3961
4053
 
4054
+ /**
4055
+ * 2D Array texture type
4056
+ */
4057
+ export let TEXTURE_TYPE_2D_ARRAY: any
4058
+
4059
+ /**
4060
+ * Cube map texture type
4061
+ */
4062
+ export let TEXTURE_TYPE_CUBE_MAP: any
4063
+
3962
4064
  /**
3963
4065
  * Constructor-like function with two purposes:
3964
4066
  *
@@ -3983,6 +4085,216 @@ declare namespace resource {
3983
4085
  */
3984
4086
  export function buffer(path?: string): hash
3985
4087
 
4088
+ /**
4089
+ * This function creates a new atlas resource that can be used in the same way as any atlas created during build time.
4090
+ * The path used for creating the atlas must be unique, trying to create a resource at a path that is already
4091
+ * registered will trigger an error. If the intention is to instead modify an existing atlas, use the resource.set_atlas
4092
+ * function. Also note that the path to the new atlas resource must have a '.texturesetc' extension,
4093
+ * meaning "/path/my_atlas" is not a valid path but "/path/my_atlas.texturesetc" is.
4094
+ * When creating the atlas, at least one geometry and one animation is required, and an error will be
4095
+ * raised if these requirements are not met. A reference to the resource will be held by the collection
4096
+ * that created the resource and will automatically be released when that collection is destroyed.
4097
+ * Note that releasing a resource essentially means decreasing the reference count of that resource,
4098
+ * and not necessarily that it will be deleted.
4099
+ * @param path The path to the resource.
4100
+ * @param table A table containing info about how to create the texture. Supported entries:
4101
+
4102
+
4103
+
4104
+ `texture`
4105
+ the path to the texture resource, e.g "/main/my_texture.texturec"
4106
+
4107
+
4108
+
4109
+
4110
+ `animations`
4111
+ a list of the animations in the atlas. Supports the following fields:
4112
+
4113
+
4114
+
4115
+
4116
+ `id`
4117
+ the id of the animation, used in e.g sprite.play_animation
4118
+
4119
+
4120
+
4121
+
4122
+ `width`
4123
+ the width of the animation
4124
+
4125
+
4126
+
4127
+
4128
+ `height`
4129
+ the height of the animation
4130
+
4131
+
4132
+
4133
+
4134
+ `frame_start`
4135
+ index to the first geometry of the animation. Indices are lua based and must be in the range of 1 .. in atlas.
4136
+
4137
+
4138
+
4139
+
4140
+ `frame_end`
4141
+ index to the last geometry of the animation (non-inclusive). Indices are lua based and must be in the range of 1 .. in atlas.
4142
+
4143
+
4144
+
4145
+
4146
+ `playback`
4147
+ optional playback mode of the animation, the default value is go.PLAYBACK_ONCE_FORWARD
4148
+
4149
+
4150
+
4151
+
4152
+ `fps`
4153
+ optional fps of the animation, the default value is 30
4154
+
4155
+
4156
+
4157
+
4158
+ `flip_vertical`
4159
+ optional flip the animation vertically, the default value is false
4160
+
4161
+
4162
+
4163
+
4164
+ `flip_horizontal`
4165
+ optional flip the animation horizontally, the default value is false
4166
+
4167
+
4168
+
4169
+
4170
+ `geometries`
4171
+ A list of the geometries that should map to the texture data. Supports the following fields:
4172
+
4173
+
4174
+
4175
+
4176
+ `vertices`
4177
+ a list of the vertices in texture space of the geometry in the form {px0, py0, px1, py1, ..., pxn, pyn}
4178
+
4179
+
4180
+
4181
+
4182
+ `uvs`
4183
+ a list of the uv coordinates in texture space of the geometry in the form of {u0, v0, u1, v1, ..., un, vn}
4184
+
4185
+
4186
+
4187
+
4188
+ `indices`
4189
+ a list of the indices of the geometry in the form {i0, i1, i2, ..., in}. Each tripe in the list represents a triangle.
4190
+
4191
+
4192
+
4193
+ * @return path Returns the atlas resource path
4194
+ */
4195
+ export function create_atlas(path: string, table: any): hash
4196
+
4197
+ /**
4198
+ * This function creates a new buffer resource that can be used in the same way as any buffer created during build time.
4199
+ * The function requires a valid buffer created from either buffer.create or another pre-existing buffer resource.
4200
+ * By default, the new resource will take ownership of the buffer lua reference, meaning the buffer will not automatically be removed
4201
+ * when the lua reference to the buffer is garbage collected. This behaviour can be overruled by specifying 'transfer_ownership = false'
4202
+ * in the argument table. If the new buffer resource is created from a buffer object that is created by another resource,
4203
+ * the buffer object will be copied and the new resource will effectively own a copy of the buffer instead.
4204
+ * Note that the path to the new resource must have the '.bufferc' extension, "/path/my_buffer" is not a valid path but "/path/my_buffer.bufferc" is.
4205
+ * The path must also be unique, attempting to create a buffer with the same name as an existing resource will raise an error.
4206
+ * @param path The path to the resource.
4207
+ * @param table A table containing info about how to create the buffer. Supported entries:
4208
+
4209
+
4210
+
4211
+ `buffer`
4212
+ the buffer to bind to this resource
4213
+
4214
+
4215
+
4216
+
4217
+ `transfer_ownership`
4218
+ optional flag to determine wether or not the resource should take over ownership of the buffer object (default true)
4219
+
4220
+
4221
+
4222
+ * @return path Returns the buffer resource path
4223
+ */
4224
+ export function create_buffer(path: string, table: any): hash
4225
+
4226
+ /**
4227
+ * Creates a new texture resource that can be used in the same way as any texture created during build time.
4228
+ * The path used for creating the texture must be unique, trying to create a resource at a path that is already
4229
+ * registered will trigger an error. If the intention is to instead modify an existing texture, use the resource.set_texture
4230
+ * function. Also note that the path to the new texture resource must have a '.texturec' extension,
4231
+ * meaning "/path/my_texture" is not a valid path but "/path/my_texture.texturec" is.
4232
+ * @param path The path to the resource.
4233
+ * @param table A table containing info about how to create the texture. Supported entries:
4234
+
4235
+ `type`
4236
+ The texture type. Supported values:
4237
+
4238
+
4239
+ - `resource.TEXTURE_TYPE_2D`
4240
+ - `resource.TEXTURE_TYPE_CUBE_MAP`
4241
+
4242
+
4243
+ `width`
4244
+ The width of the texture (in pixels)
4245
+ `height`
4246
+ The width of the texture (in pixels)
4247
+ `format`
4248
+ The texture format, note that some of these formats might not be supported by the running device. Supported values:
4249
+
4250
+
4251
+ - `resource.TEXTURE_FORMAT_LUMINANCE`
4252
+ - `resource.TEXTURE_FORMAT_RGB`
4253
+ - `resource.TEXTURE_FORMAT_RGBA`
4254
+
4255
+ These constants might not be available on the device:
4256
+ - `resource.TEXTURE_FORMAT_RGB_PVRTC_2BPPV1`
4257
+ - `resource.TEXTURE_FORMAT_RGB_PVRTC_4BPPV1`
4258
+ - `resource.TEXTURE_FORMAT_RGBA_PVRTC_2BPPV1`
4259
+ - `resource.TEXTURE_FORMAT_RGBA_PVRTC_4BPPV1`
4260
+ - `resource.TEXTURE_FORMAT_RGB_ETC1`
4261
+ - `resource.TEXTURE_FORMAT_RGBA_ETC2`
4262
+ - `resource.TEXTURE_FORMAT_RGBA_ASTC_4x4`
4263
+ - `resource.TEXTURE_FORMAT_RGB_BC1`
4264
+ - `resource.TEXTURE_FORMAT_RGBA_BC3`
4265
+ - `resource.TEXTURE_FORMAT_R_BC4`
4266
+ - `resource.TEXTURE_FORMAT_RG_BC5`
4267
+ - `resource.TEXTURE_FORMAT_RGBA_BC7`
4268
+ - `resource.TEXTURE_FORMAT_RGB16F`
4269
+ - `resource.TEXTURE_FORMAT_RGB32F`
4270
+ - `resource.TEXTURE_FORMAT_RGBA16F`
4271
+ - `resource.TEXTURE_FORMAT_RGBA32F`
4272
+ - `resource.TEXTURE_FORMAT_R16F`
4273
+ - `resource.TEXTURE_FORMAT_RG16F`
4274
+ - `resource.TEXTURE_FORMAT_R32F`
4275
+ - `resource.TEXTURE_FORMAT_RG32F`
4276
+ You can test if the device supports these values by checking if a specific enum is nil or not:
4277
+ `if resource.TEXTURE_FORMAT_RGBA16F ~= nil then
4278
+ -- it is safe to use this format
4279
+ end
4280
+ `
4281
+
4282
+
4283
+ `max_mipmaps`
4284
+ optional max number of mipmaps. Defaults to zero, i.e no mipmap support
4285
+ `compression_type`
4286
+ optional specify the compression type for the data in the buffer object that holds the texture data. Will only be used when a compressed buffer has been passed into the function.
4287
+ Creating an empty texture with no buffer data is not supported as a core feature. Defaults to resource.COMPRESSION_TYPE_DEFAULT, i.e no compression. Supported values:
4288
+
4289
+
4290
+ - `COMPRESSION_TYPE_DEFAULT`
4291
+ - `COMPRESSION_TYPE_BASIS_UASTC`
4292
+
4293
+ * @param buffer optional buffer of precreated pixel data
4294
+ * @return path The path to the resource.
4295
+ */
4296
+ export function create_texture(path: string, table: any, buffer?: buffer): hash
4297
+
3986
4298
  /**
3987
4299
  * Constructor-like function with two purposes:
3988
4300
  *
@@ -3995,6 +4307,19 @@ declare namespace resource {
3995
4307
  */
3996
4308
  export function font(path?: string): hash
3997
4309
 
4310
+ /**
4311
+ * Returns the atlas data for an atlas
4312
+ * @param path The path to the atlas resource
4313
+ * @return data A table with the following entries:
4314
+
4315
+ - texture
4316
+ - geometries
4317
+ - animations
4318
+
4319
+ See resource.set_atlas for a detailed description of each field
4320
+ */
4321
+ export function get_atlas(path: hash | string): any
4322
+
3998
4323
  /**
3999
4324
  * gets the buffer from a resource
4000
4325
  * @param path The path to the resource
@@ -4002,12 +4327,6 @@ declare namespace resource {
4002
4327
  */
4003
4328
  export function get_buffer(path: hash | string): buffer
4004
4329
 
4005
- /**
4006
- * Return a reference to the Manifest that is currently loaded.
4007
- * @return manifest_reference reference to the Manifest that is currently loaded
4008
- */
4009
- export function get_current_manifest(): number
4010
-
4011
4330
  /**
4012
4331
  * Gets the text metrics from a font
4013
4332
  * @param url the font to get the (unscaled) metrics from
@@ -4019,7 +4338,7 @@ The width of the text field. Not used if `line_break` is false.
4019
4338
  `leading`
4020
4339
  The leading (default 1.0)
4021
4340
  `tracking`
4022
- The leading (default 0.0)
4341
+ The tracking (default 0.0)
4023
4342
  `line_break`
4024
4343
  If the calculation should consider line breaks (default false)
4025
4344
 
@@ -4034,11 +4353,30 @@ If the calculation should consider line breaks (default false)
4034
4353
  export function get_text_metrics(url: hash, text: string, options?: any): any
4035
4354
 
4036
4355
  /**
4037
- * Is any liveupdate data mounted and currently in use?
4038
- * This can be used to determine if a new manifest or zip file should be downloaded.
4039
- * @return bool true if a liveupdate archive (any format) has been loaded
4356
+ * Gets texture info from a texture resource path or a texture handle
4357
+ * @param path The path to the resource or a texture handle
4358
+ * @return table A table containing info about the texture:
4359
+
4360
+ `handle`
4361
+ the opaque handle to the texture resource
4362
+ `width`
4363
+ width of the texture
4364
+ `height`
4365
+ height of the texture
4366
+ `depth`
4367
+ depth of the texture (i.e 1 for a 2D texture and 6 for a cube map)
4368
+ `mipmaps`
4369
+ number of mipmaps of the texture
4370
+ `type`
4371
+ The texture type. Supported values:
4372
+
4373
+
4374
+ - `resource.TEXTURE_TYPE_2D`
4375
+ - `resource.TEXTURE_TYPE_CUBE_MAP`
4376
+ - `resource.TEXTURE_TYPE_2D_ARRAY`
4377
+
4040
4378
  */
4041
- export function is_using_liveupdate_data(): any
4379
+ export function get_texture_info(path: any): any
4042
4380
 
4043
4381
  /**
4044
4382
  * Loads the resource data for a specific resource.
@@ -4059,6 +4397,13 @@ If the calculation should consider line breaks (default false)
4059
4397
  */
4060
4398
  export function material(path?: string): hash
4061
4399
 
4400
+ /**
4401
+ * Release a resource.
4402
+ * ⚠ This is a potentially dangerous operation, releasing resources currently being used can cause unexpected behaviour.
4403
+ * @param path The path to the resource.
4404
+ */
4405
+ export function release(path: hash | string): void
4406
+
4062
4407
  /**
4063
4408
  * Sets the resource data for a specific resource
4064
4409
  * @param path The path to the resource
@@ -4066,6 +4411,115 @@ If the calculation should consider line breaks (default false)
4066
4411
  */
4067
4412
  export function set(path: string | hash, buffer: buffer): void
4068
4413
 
4414
+ /**
4415
+ * Sets the data for a specific atlas resource. Setting new atlas data is specified by passing in
4416
+ * a texture path for the backing texture of the atlas, a list of geometries and a list of animations
4417
+ * that map to the entries in the geometry list. The geometry entries are represented by three lists:
4418
+ * vertices, uvs and indices that together represent triangles that are used in other parts of the
4419
+ * engine to produce render objects from.
4420
+ * Vertex and uv coordinates for the geometries are expected to be
4421
+ * in pixel coordinates where 0,0 is the top left corner of the texture.
4422
+ * There is no automatic padding or margin support when setting custom data,
4423
+ * which could potentially cause filtering artifacts if used with a material sampler that has linear filtering.
4424
+ * If that is an issue, you need to calculate padding and margins manually before passing in the geometry data to
4425
+ * this function.
4426
+ * @param path The path to the atlas resource
4427
+ * @param table A table containing info about the atlas. Supported entries:
4428
+
4429
+
4430
+
4431
+ `texture`
4432
+ the path to the texture resource, e.g "/main/my_texture.texturec"
4433
+
4434
+
4435
+
4436
+
4437
+ `animations`
4438
+ a list of the animations in the atlas. Supports the following fields:
4439
+
4440
+
4441
+
4442
+
4443
+ `id`
4444
+ the id of the animation, used in e.g sprite.play_animation
4445
+
4446
+
4447
+
4448
+
4449
+ `width`
4450
+ the width of the animation
4451
+
4452
+
4453
+
4454
+
4455
+ `height`
4456
+ the height of the animation
4457
+
4458
+
4459
+
4460
+
4461
+ `frame_start`
4462
+ index to the first geometry of the animation. Indices are lua based and must be in the range of 1 .. in atlas.
4463
+
4464
+
4465
+
4466
+
4467
+ `frame_end`
4468
+ index to the last geometry of the animation (non-inclusive). Indices are lua based and must be in the range of 1 .. in atlas.
4469
+
4470
+
4471
+
4472
+
4473
+ `playback`
4474
+ optional playback mode of the animation, the default value is go.PLAYBACK_ONCE_FORWARD
4475
+
4476
+
4477
+
4478
+
4479
+ `fps`
4480
+ optional fps of the animation, the default value is 30
4481
+
4482
+
4483
+
4484
+
4485
+ `flip_vertical`
4486
+ optional flip the animation vertically, the default value is false
4487
+
4488
+
4489
+
4490
+
4491
+ `flip_horizontal`
4492
+ optional flip the animation horizontally, the default value is false
4493
+
4494
+
4495
+
4496
+
4497
+ `geometries`
4498
+ A list of the geometries that should map to the texture data. Supports the following fields:
4499
+
4500
+
4501
+
4502
+
4503
+ `vertices`
4504
+ a list of the vertices in texture space of the geometry in the form {px0, py0, px1, py1, ..., pxn, pyn}
4505
+
4506
+
4507
+
4508
+
4509
+ `uvs`
4510
+ a list of the uv coordinates in texture space of the geometry in the form of {u0, v0, u1, v1, ..., un, vn}
4511
+
4512
+
4513
+
4514
+
4515
+ `indices`
4516
+ a list of the indices of the geometry in the form {i0, i1, i2, ..., in}. Each tripe in the list represents a triangle.
4517
+
4518
+
4519
+
4520
+ */
4521
+ export function set_atlas(path: hash | string, table: any): void
4522
+
4069
4523
  /**
4070
4524
  * sets the buffer of a resource
4071
4525
  * @param path The path to the resource
@@ -4090,6 +4544,7 @@ The texture type. Supported values:
4090
4544
 
4091
4545
 
4092
4546
  - `resource.TEXTURE_TYPE_2D`
4547
+ - `resource.TEXTURE_TYPE_CUBE_MAP`
4093
4548
 
4094
4549
 
4095
4550
  `width`
@@ -4097,90 +4552,58 @@ The width of the texture (in pixels)
4097
4552
  `height`
4098
4553
  The width of the texture (in pixels)
4099
4554
  `format`
4100
- The texture format. Supported values:
4555
+ The texture format, note that some of these formats are platform specific. Supported values:
4101
4556
 
4102
4557
 
4103
4558
  - `resource.TEXTURE_FORMAT_LUMINANCE`
4104
4559
  - `resource.TEXTURE_FORMAT_RGB`
4105
4560
  - `resource.TEXTURE_FORMAT_RGBA`
4106
4561
 
4107
- * @param buffer The buffer of precreated pixel data
4108
- Currently, only 1 mipmap is generated.
4109
- */
4110
- export function set_texture(path: hash | string, table: any, buffer: buffer): void
4111
-
4112
- /**
4113
- * Stores a zip file and uses it for live update content. The contents of the
4114
- * zip file will be verified against the manifest to ensure file integrity.
4115
- * It is possible to opt out of the resource verification using an option passed
4116
- * to this function.
4117
- * The path is stored in the (internal) live update location.
4118
- * @param path the path to the original file on disc
4119
- * @param callback the callback function
4120
- executed after the storage has completed
4121
-
4122
- `self`
4123
- The current object.
4124
- `status`
4125
- the status of the store operation (See resource.store_manifest)
4126
-
4127
- * @param options optional table with extra parameters. Supported entries:
4128
-
4129
- `verify`: if archive should be verified as well as stored (defaults to true)
4130
-
4131
- */
4132
- export function store_archive(path: string, callback: any, options?: any): void
4133
-
4134
- /**
4135
- * Create a new manifest from a buffer. The created manifest is verified
4136
- * by ensuring that the manifest was signed using the bundled public/private
4137
- * key-pair during the bundle process and that the manifest supports the current
4138
- * running engine version. Once the manifest is verified it is stored on device.
4139
- * The next time the engine starts (or is rebooted) it will look for the stored
4140
- * manifest before loading resources. Storing a new manifest allows the
4141
- * developer to update the game, modify existing resources, or add new
4142
- * resources to the game through LiveUpdate.
4143
- * @param manifest_buffer the binary data that represents the manifest
4144
- * @param callback the callback function
4145
- executed once the engine has attempted to store the manifest.
4562
+ These constants might not be available on the device:
4563
+ - `resource.TEXTURE_FORMAT_RGB_PVRTC_2BPPV1`
4564
+ - `resource.TEXTURE_FORMAT_RGB_PVRTC_4BPPV1`
4565
+ - `resource.TEXTURE_FORMAT_RGBA_PVRTC_2BPPV1`
4566
+ - `resource.TEXTURE_FORMAT_RGBA_PVRTC_4BPPV1`
4567
+ - `resource.TEXTURE_FORMAT_RGB_ETC1`
4568
+ - `resource.TEXTURE_FORMAT_RGBA_ETC2`
4569
+ - `resource.TEXTURE_FORMAT_RGBA_ASTC_4x4`
4570
+ - `resource.TEXTURE_FORMAT_RGB_BC1`
4571
+ - `resource.TEXTURE_FORMAT_RGBA_BC3`
4572
+ - `resource.TEXTURE_FORMAT_R_BC4`
4573
+ - `resource.TEXTURE_FORMAT_RG_BC5`
4574
+ - `resource.TEXTURE_FORMAT_RGBA_BC7`
4575
+ - `resource.TEXTURE_FORMAT_RGB16F`
4576
+ - `resource.TEXTURE_FORMAT_RGB32F`
4577
+ - `resource.TEXTURE_FORMAT_RGBA16F`
4578
+ - `resource.TEXTURE_FORMAT_RGBA32F`
4579
+ - `resource.TEXTURE_FORMAT_R16F`
4580
+ - `resource.TEXTURE_FORMAT_RG16F`
4581
+ - `resource.TEXTURE_FORMAT_R32F`
4582
+ - `resource.TEXTURE_FORMAT_RG32F`
4583
+ You can test if the device supports these values by checking if a specific enum is nil or not:
4584
+ `if resource.TEXTURE_FORMAT_RGBA16F ~= nil then
4585
+ -- it is safe to use this format
4586
+ end
4587
+ `
4146
4588
 
4147
- `self`
4148
- The current object.
4149
- `status`
4150
- the status of the store operation:
4151
4589
 
4590
+ `x`
4591
+ optional x offset of the texture (in pixels)
4592
+ `y`
4593
+ optional y offset of the texture (in pixels)
4594
+ `mipmap`
4595
+ optional mipmap to upload the data to
4596
+ `compression_type`
4597
+ optional specify the compression type for the data in the buffer object that holds the texture data. Defaults to resource.COMPRESSION_TYPE_DEFAULT, i.e no compression. Supported values:
4152
4598
 
4153
- - `resource.LIVEUPATE_OK`
4154
- - `resource.LIVEUPATE_INVALID_RESOURCE`
4155
- - `resource.LIVEUPATE_VERSION_MISMATCH`
4156
- - `resource.LIVEUPATE_ENGINE_VERSION_MISMATCH`
4157
- - `resource.LIVEUPATE_SIGNATURE_MISMATCH`
4158
- - `resource.LIVEUPDATE_BUNDLED_RESOURCE_MISMATCH`
4159
- - `resource.LIVEUPDATE_FORMAT_ERROR`
4160
4599
 
4161
- */
4162
- export function store_manifest(manifest_buffer: string, callback: any): void
4163
-
4164
- /**
4165
- * add a resource to the data archive and runtime index. The resource will be verified
4166
- * internally before being added to the data archive.
4167
- * @param manifest_reference The manifest to check against.
4168
- * @param data The resource data that should be stored.
4169
- * @param hexdigest The expected hash for the resource,
4170
- retrieved through collectionproxy.missing_resources.
4171
- * @param callback The callback
4172
- function that is executed once the engine has been attempted to store
4173
- the resource.
4174
-
4175
- `self`
4176
- The current object.
4177
- `hexdigest`
4178
- The hexdigest of the resource.
4179
- `status`
4180
- Whether or not the resource was successfully stored.
4600
+ - `COMPRESSION_TYPE_DEFAULT`
4601
+ - `COMPRESSION_TYPE_BASIS_UASTC`
4181
4602
 
4603
+ * @param buffer The buffer of precreated pixel data
4604
+ ⚠ To update a cube map texture you need to pass in six times the amount of data via the buffer, since a cube map has six sides!
4182
4605
  */
4183
- export function store_resource(manifest_reference: number, data: string, hexdigest: string, callback: any): void
4606
+ export function set_texture(path: hash | string, table: any, buffer: buffer): void
4184
4607
 
4185
4608
  /**
4186
4609
  * Constructor-like function with two purposes:
@@ -4322,21 +4745,28 @@ declare namespace sys {
4322
4745
  export function get_application_path(): string
4323
4746
 
4324
4747
  /**
4325
- * Get config value from the game.project configuration file.
4326
- * In addition to the project file, configuration values can also be passed
4327
- * to the runtime as command line arguments with the `--config` argument.
4748
+ * Get integer config value from the game.project configuration file with optional default value
4328
4749
  * @param key key to get value for. The syntax is SECTION.KEY
4329
- * @return value config value as a string. nil if the config key doesn't exists
4750
+ * @param default_value (optional) default value to return if the value does not exist
4751
+ * @return value config value as an integer. default_value if the config key does not exist. 0 if no default value was supplied.
4330
4752
  */
4331
- export function get_config(key: string): string
4753
+ export function get_config_int(key: string, default_value?: any): any
4332
4754
 
4333
4755
  /**
4334
- * Get config value from the game.project configuration file with default value
4756
+ * Get number config value from the game.project configuration file with optional default value
4335
4757
  * @param key key to get value for. The syntax is SECTION.KEY
4336
- * @param default_value default value to return if the value does not exist
4337
- * @return value config value as a string. default_value if the config key does not exist
4758
+ * @param default_value (optional) default value to return if the value does not exist
4759
+ * @return value config value as an number. default_value if the config key does not exist. 0 if no default value was supplied.
4338
4760
  */
4339
- export function get_config(key: string, default_value: string): string
4761
+ export function get_config_number(key: string, default_value?: number): number
4762
+
4763
+ /**
4764
+ * Get string config value from the game.project configuration file with optional default value
4765
+ * @param key key to get value for. The syntax is SECTION.KEY
4766
+ * @param default_value (optional) default value to return if the value does not exist
4767
+ * @return value config value as a string. default_value if the config key does not exist. nil if no default value was supplied.
4768
+ */
4769
+ export function get_config_string(key: string, default_value?: string): string
4340
4770
 
4341
4771
  /**
4342
4772
  * 🤖 Returns the current network connectivity status
@@ -4365,6 +4795,14 @@ If the engine is a debug or release version
4365
4795
  */
4366
4796
  export function get_engine_info(): any
4367
4797
 
4798
+ /**
4799
+ * Create a path to the host device for unit testing
4800
+ * Useful for saving logs etc during development
4801
+ * @param filename file to read from
4802
+ * @return host_path the path prefixed with the proper host mount
4803
+ */
4804
+ export function get_host_path(filename: string): string
4805
+
4368
4806
  /**
4369
4807
  * Returns an array of tables with information on network interfaces.
4370
4808
  * @return ifaddrs an array of tables. Each table entry contain the following fields:
@@ -4393,7 +4831,7 @@ might be nil if not available.
4393
4831
 
4394
4832
  /**
4395
4833
  * Returns a table with system information.
4396
- * @param options (optional) options table
4834
+ * @param options optional options table
4397
4835
  this flag ignores values might be secured by OS e.g. `device_ident`
4398
4836
  * @return sys_info table with system information in the following fields:
4399
4837
 
@@ -4786,6 +5224,15 @@ declare namespace buffer {
4786
5224
  */
4787
5225
  export function get_bytes(buffer: buffer, stream_name: hash): string
4788
5226
 
5227
+ /**
5228
+ * Get a named metadata entry from a buffer along with its type.
5229
+ * @param buf the buffer to get the metadata from
5230
+ * @param metadata_name name of the metadata entry
5231
+ * @return values table of metadata values or nil if the entry does not exist
5232
+ * @return value_type numeric type of values or nil
5233
+ */
5234
+ export function get_metadata(buf: buffer, metadata_name: hash | string): LuaMultiReturn<[any, any]>
5235
+
4789
5236
  /**
4790
5237
  * Get a specified stream from a buffer.
4791
5238
  * @param buffer the buffer to get the stream from
@@ -4794,6 +5241,16 @@ declare namespace buffer {
4794
5241
  */
4795
5242
  export function get_stream(buffer: buffer, stream_name: hash | string): bufferstream
4796
5243
 
5244
+ /**
5245
+ * Creates or updates a metadata array entry on a buffer.
5246
+ * ⚠ The value type and count given when updating the entry should match those used when first creating it.
5247
+ * @param buf the buffer to set the metadata on
5248
+ * @param metadata_name name of the metadata entry
5249
+ * @param values actual metadata, an array of numeric values
5250
+ * @param value_type type of values when stored
5251
+ */
5252
+ export function set_metadata(buf: buffer, metadata_name: hash | string, values: any, value_type: any): void
5253
+
4797
5254
  }
4798
5255
  // =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= //
4799
5256
 
@@ -4923,6 +5380,12 @@ declare namespace json {
4923
5380
  */
4924
5381
  export function encode(tbl: any): string
4925
5382
 
5383
+ /**
5384
+ * null
5385
+ */
5386
+ let null$: any
5387
+ export { null$ as null }
5388
+
4926
5389
  }
4927
5390
  // =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= //
4928
5391
 
@@ -5016,10 +5479,25 @@ The handle of the timer
5016
5479
  `time_elapsed`
5017
5480
  The elapsed time - on first trigger it is time since timer.delay call, otherwise time since last trigger
5018
5481
 
5019
- * @return handle identifier for the create timer, returns timer.INVALID_TIMER_HANDLE if the timer can not be created
5482
+ * @return handle identifier for the create timer, returns timer.INVALID_TIMER_HANDLE if the timer can not be created
5020
5483
  */
5021
5484
  export function delay(delay: number, repeat: boolean, callback: any): hash
5022
5485
 
5486
+ /**
5487
+ * Get information about timer.
5488
+ * @param handle the timer handle returned by timer.delay()
5489
+ * @return data or nil if timer is cancelled/completed. table with data in the following fields:
5490
+
5491
+ `time_remaining`
5492
+ Time remaining until the next time a timer.delay() fires.
5493
+ `delay`
5494
+ Time interval.
5495
+ `repeating`
5496
+ true = repeat timer until cancel, false = one-shot timer.
5497
+
5498
+ */
5499
+ export function get_info(handle: hash): any
5500
+
5023
5501
  /**
5024
5502
  * Manual triggering a callback for a timer.
5025
5503
  * @param handle the timer handle returned by timer.delay()
@@ -5533,6 +6011,13 @@ declare namespace camera {
5533
6011
  */
5534
6012
  export type acquire_camera_focus = "acquire_camera_focus"
5535
6013
 
6014
+ /**
6015
+ * The ratio between the frustum width and height. Used when calculating the
6016
+ * projection of a perspective camera.
6017
+ * The type of the property is number.
6018
+ */
6019
+ export let aspect_ratio: any
6020
+
5536
6021
  /**
5537
6022
  * Camera frustum far plane.
5538
6023
  * The type of the property is float.
@@ -5557,6 +6042,12 @@ declare namespace camera {
5557
6042
  */
5558
6043
  export let orthographic_zoom: any
5559
6044
 
6045
+ /**
6046
+ * READ ONLY The calculated projection matrix of the camera.
6047
+ * The type of the property is matrix4.
6048
+ */
6049
+ export let projection: any
6050
+
5560
6051
  /**
5561
6052
  *
5562
6053
  * Post this message to a camera-component to deactivate it. The camera is then removed from the active cameras.
@@ -5572,6 +6063,12 @@ declare namespace camera {
5572
6063
  */
5573
6064
  export type set_camera = "set_camera"
5574
6065
 
6066
+ /**
6067
+ * READ ONLY The calculated view matrix of the camera.
6068
+ * The type of the property is matrix4.
6069
+ */
6070
+ export let view: any
6071
+
5575
6072
  }
5576
6073
  // =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= //
5577
6074
 
@@ -5646,6 +6143,14 @@ True if resource were loaded successfully
5646
6143
  */
5647
6144
  export function load(url?: string | hash | url, complete_function?: any): void
5648
6145
 
6146
+ /**
6147
+ * Changes the prototype for the collection factory.
6148
+ * Setting the prototype to "nil" will revert back to the original prototype.
6149
+ * @param url the collection factory component
6150
+ * @param prototype the path to the new prototype, or nil
6151
+ */
6152
+ export function set_prototype(url?: string | hash | url, prototype?: any): void
6153
+
5649
6154
  /**
5650
6155
  * This decreases the reference count for each resource loaded with collectionfactory.load. If reference is zero, the resource is destroyed.
5651
6156
  * Calling this function when the factory is not marked as dynamic loading does nothing.
@@ -5666,6 +6171,31 @@ declare namespace collectionproxy {
5666
6171
  */
5667
6172
  export type async_load = "async_load"
5668
6173
 
6174
+ /**
6175
+ * return an indexed table of resources for a collection proxy. Each
6176
+ * entry is a hexadecimal string that represents the data of the specific
6177
+ * resource. This representation corresponds with the filename for each
6178
+ * individual resource that is exported when you bundle an application with
6179
+ * LiveUpdate functionality.
6180
+ * @param collectionproxy the collectionproxy to check for resources.
6181
+ * @return resources the resources
6182
+ */
6183
+ export function get_resources(collectionproxy: url): any
6184
+
6185
+ /**
6186
+ * return an array of missing resources for a collection proxy. Each
6187
+ * entry is a hexadecimal string that represents the data of the specific
6188
+ * resource. This representation corresponds with the filename for each
6189
+ * individual resource that is exported when you bundle an application with
6190
+ * LiveUpdate functionality. It should be considered good practise to always
6191
+ * check whether or not there are any missing resources in a collection proxy
6192
+ * before attempting to load the collection proxy.
6193
+ * @param collectionproxy the collectionproxy to check for missing
6194
+ resources.
6195
+ * @return resources the missing resources
6196
+ */
6197
+ export function missing_resources(collectionproxy: url): any
6198
+
5669
6199
  /**
5670
6200
  * Post this message to a collection-proxy-component to disable the referenced collection, which in turn disables the contained game objects and components.
5671
6201
  */
@@ -5793,6 +6323,13 @@ True if resources were loaded successfully
5793
6323
  */
5794
6324
  export function load(url?: string | hash | url, complete_function?: any): void
5795
6325
 
6326
+ /**
6327
+ * Changes the prototype for the factory.
6328
+ * @param url the factory component
6329
+ * @param prototype the path to the new prototype, or nil
6330
+ */
6331
+ export function set_prototype(url?: string | hash | url, prototype?: any): void
6332
+
5796
6333
  /**
5797
6334
  * This decreases the reference count for each resource loaded with factory.load. If reference is zero, the resource is destroyed.
5798
6335
  * Calling this function when the factory is not marked as dynamic loading does nothing.
@@ -5832,6 +6369,19 @@ declare namespace label {
5832
6369
  */
5833
6370
  export function set_text(url: string | hash | url, text: string): void
5834
6371
 
6372
+ /**
6373
+ * The leading of the label. This value is used to scale the line spacing of text.
6374
+ * The type of the property is number.
6375
+ */
6376
+ export let leading: any
6377
+
6378
+ /**
6379
+ * The line break of the label.
6380
+ * This value is used to adjust the vertical spacing of characters in the text.
6381
+ * The type of the property is boolean.
6382
+ */
6383
+ export let line_break: any
6384
+
5835
6385
  /**
5836
6386
  * The material used when rendering the label. The type of the property is hash.
5837
6387
  */
@@ -5859,6 +6409,13 @@ declare namespace label {
5859
6409
  */
5860
6410
  export let size: any
5861
6411
 
6412
+ /**
6413
+ * The tracking of the label.
6414
+ * This value is used to adjust the vertical spacing of characters in the text.
6415
+ * The type of the property is number.
6416
+ */
6417
+ export let tracking: any
6418
+
5862
6419
  }
5863
6420
  // =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= //
5864
6421
 
@@ -6323,6 +6880,11 @@ declare namespace sprite {
6323
6880
  */
6324
6881
  export let cursor: any
6325
6882
 
6883
+ /**
6884
+ * READ ONLY The frame count of the currently playing animation.
6885
+ */
6886
+ export let frame_count: any
6887
+
6326
6888
  /**
6327
6889
  * The image used when rendering the sprite. The type of the property is hash.
6328
6890
  */
@@ -6350,8 +6912,9 @@ declare namespace sprite {
6350
6912
  export let scale: any
6351
6913
 
6352
6914
  /**
6353
- * READ ONLY Returns the size of the sprite, not allowing for any additional scaling that may be applied.
6354
- * The type of the property is vector3.
6915
+ * The size of the sprite, not allowing for any additional scaling that may be applied.
6916
+ * The type of the property is vector3. It is not possible to set the size if the size mode
6917
+ * of the sprite is set to auto.
6355
6918
  */
6356
6919
  export let size: any
6357
6920
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ts-defold/types",
3
- "version": "1.2.20",
3
+ "version": "1.2.22",
4
4
  "description": "TypeScript definitions for Defold",
5
5
  "repository": "github:ts-defold/types",
6
6
  "keywords": [
@@ -27,11 +27,11 @@
27
27
  "lua-types": "^2.10.1"
28
28
  },
29
29
  "devDependencies": {
30
- "@ts-defold/type-gen": "^0.5.2",
31
- "typescript": "4.3.4",
32
- "typescript-to-lua": "^1.0.1"
30
+ "@ts-defold/type-gen": "^0.5.3",
31
+ "typescript": "~5.1.0",
32
+ "typescript-to-lua": "~1.16.0"
33
33
  },
34
34
  "peerDependencies": {
35
- "typescript-to-lua": "^1.0.1"
35
+ "typescript-to-lua": "^1.10.0"
36
36
  }
37
37
  }