@ts-defold/types 1.2.46 → 1.2.47
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 +172 -15
- 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.9.0 (d6882f432beca85d460ec42497888157c356d058)
|
|
6
6
|
// =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= =^..^= //
|
|
7
7
|
|
|
8
8
|
|
|
@@ -315,13 +315,6 @@ declare namespace b2d.body {
|
|
|
315
315
|
*/
|
|
316
316
|
export function get_angular_damping(body: any): number
|
|
317
317
|
|
|
318
|
-
/**
|
|
319
|
-
* Set the angular velocity.
|
|
320
|
-
* @param body body
|
|
321
|
-
* @param omega the new angular velocity in radians/second.
|
|
322
|
-
*/
|
|
323
|
-
export function get_angular_velocity(body: any, omega: number): void
|
|
324
|
-
|
|
325
318
|
/**
|
|
326
319
|
* Get the angular velocity.
|
|
327
320
|
* @param body body
|
|
@@ -529,6 +522,13 @@ declare namespace b2d.body {
|
|
|
529
522
|
*/
|
|
530
523
|
export function set_angular_damping(body: any, damping: number): void
|
|
531
524
|
|
|
525
|
+
/**
|
|
526
|
+
* Set the angular velocity.
|
|
527
|
+
* @param body body
|
|
528
|
+
* @param omega the new angular velocity in radians/second.
|
|
529
|
+
*/
|
|
530
|
+
export function set_angular_velocity(body: any, omega: number): void
|
|
531
|
+
|
|
532
532
|
/**
|
|
533
533
|
* Set the sleep state of the body. A sleeping body has very low CPU cost.
|
|
534
534
|
* @param body body
|
|
@@ -4096,6 +4096,23 @@ declare namespace render {
|
|
|
4096
4096
|
*/
|
|
4097
4097
|
export function disable_texture(binding: number | string | hash): void
|
|
4098
4098
|
|
|
4099
|
+
/**
|
|
4100
|
+
* Dispatches the currently enabled compute program. The dispatch call takes three arguments x,y,z which constitutes
|
|
4101
|
+
* the 'global working group' of the compute dispatch. Together with the 'local working group' specified in the compute shader
|
|
4102
|
+
* as a layout qualifier, these two sets of parameters forms the number of invocations the compute shader will execute.
|
|
4103
|
+
* An optional constant buffer can be provided to override the default constants. If no constants buffer is provided, a default
|
|
4104
|
+
* system constants buffer is used containing constants as defined in the compute program.
|
|
4105
|
+
* @param x global work group size X
|
|
4106
|
+
* @param y global work group size Y
|
|
4107
|
+
* @param z global work group size Z
|
|
4108
|
+
* @param options optional table with properties:
|
|
4109
|
+
|
|
4110
|
+
`constants`
|
|
4111
|
+
optional constants to use while rendering
|
|
4112
|
+
|
|
4113
|
+
*/
|
|
4114
|
+
export function dispatch_compute(x: number, y: number, z: number, options?: any): void
|
|
4115
|
+
|
|
4099
4116
|
/**
|
|
4100
4117
|
* Draws all objects that match a specified predicate. An optional constant buffer can be
|
|
4101
4118
|
* provided to override the default constants. If no constants buffer is provided, a default
|
|
@@ -4455,6 +4472,14 @@ If true, the renderer will use the cameras view-projection matrix for frustum cu
|
|
|
4455
4472
|
*/
|
|
4456
4473
|
export function set_color_mask(red: boolean, green: boolean, blue: boolean, alpha: boolean): void
|
|
4457
4474
|
|
|
4475
|
+
/**
|
|
4476
|
+
* The name of the compute program must be specified in the ".render" resource set
|
|
4477
|
+
* in the "game.project" setting. If nil (or no arguments) are passed to this function,
|
|
4478
|
+
* the current compute program will instead be disabled.
|
|
4479
|
+
* @param compute compute id to use, or nil to disable
|
|
4480
|
+
*/
|
|
4481
|
+
export function set_compute(compute: any): void
|
|
4482
|
+
|
|
4458
4483
|
/**
|
|
4459
4484
|
* Specifies whether front- or back-facing polygons can be culled
|
|
4460
4485
|
* when polygon culling is enabled. Polygon culling is initially disabled.
|
|
@@ -4800,6 +4825,21 @@ declare namespace resource {
|
|
|
4800
4825
|
*/
|
|
4801
4826
|
export let TEXTURE_TYPE_CUBE_MAP: any
|
|
4802
4827
|
|
|
4828
|
+
/**
|
|
4829
|
+
* Usage hint for creating textures that uses temporary memory
|
|
4830
|
+
*/
|
|
4831
|
+
export let TEXTURE_USAGE_FLAG_MEMORYLESS: any
|
|
4832
|
+
|
|
4833
|
+
/**
|
|
4834
|
+
* Usage hint for creating textures that can be sampled in a shader
|
|
4835
|
+
*/
|
|
4836
|
+
export let TEXTURE_USAGE_FLAG_SAMPLE: any
|
|
4837
|
+
|
|
4838
|
+
/**
|
|
4839
|
+
* Usage hint for creating textures that can be used for writing in a shader
|
|
4840
|
+
*/
|
|
4841
|
+
export let TEXTURE_USAGE_FLAG_STORAGE: any
|
|
4842
|
+
|
|
4803
4843
|
/**
|
|
4804
4844
|
* Constructor-like function with two purposes:
|
|
4805
4845
|
*
|
|
@@ -4984,6 +5024,7 @@ The texture type. Supported values:
|
|
|
4984
5024
|
|
|
4985
5025
|
- `resource.TEXTURE_TYPE_2D`
|
|
4986
5026
|
- `resource.TEXTURE_TYPE_CUBE_MAP`
|
|
5027
|
+
- `resource.TEXTURE_TYPE_IMAGE_2D`
|
|
4987
5028
|
|
|
4988
5029
|
|
|
4989
5030
|
`width`
|
|
@@ -5028,6 +5069,16 @@ end
|
|
|
5028
5069
|
`
|
|
5029
5070
|
|
|
5030
5071
|
|
|
5072
|
+
`flags`
|
|
5073
|
+
Texture creation flags that can be used to dictate how the texture is created. The default value is resource.TEXTURE_USAGE_FLAG_SAMPLE, which means that the texture can be sampled from a shader.
|
|
5074
|
+
These flags may or may not be supported on the running device and/or the underlying graphics API and is simply used internally as a 'hint' when creating the texture. There is no guarantee that any of these will have any effect. Supported values:
|
|
5075
|
+
|
|
5076
|
+
|
|
5077
|
+
- `resource.TEXTURE_USAGE_FLAG_SAMPLE` - The texture can be sampled from a shader (default)
|
|
5078
|
+
- `resource.TEXTURE_USAGE_FLAG_MEMORYLESS` - The texture can be used as a memoryless texture, i.e only transient memory for the texture is used during rendering
|
|
5079
|
+
- `resource.TEXTURE_USAGE_FLAG_STORAGE` - The texture can be used as a storage texture, which is required for a shader to write to the texture
|
|
5080
|
+
|
|
5081
|
+
|
|
5031
5082
|
`max_mipmaps`
|
|
5032
5083
|
optional max number of mipmaps. Defaults to zero, i.e no mipmap support
|
|
5033
5084
|
`compression_type`
|
|
@@ -5100,6 +5151,15 @@ These constants might not be available on the device:
|
|
|
5100
5151
|
- `resource.TEXTURE_FORMAT_R32F`
|
|
5101
5152
|
- `resource.TEXTURE_FORMAT_RG32F`
|
|
5102
5153
|
|
|
5154
|
+
|
|
5155
|
+
`flags`
|
|
5156
|
+
Texture creation flags that can be used to dictate how the texture is created. Supported values:
|
|
5157
|
+
|
|
5158
|
+
|
|
5159
|
+
- `resource.TEXTURE_USAGE_FLAG_SAMPLE` - The texture can be sampled from a shader (default)
|
|
5160
|
+
- `resource.TEXTURE_USAGE_FLAG_MEMORYLESS` - The texture can be used as a memoryless texture, i.e only transient memory for the texture is used during rendering
|
|
5161
|
+
- `resource.TEXTURE_USAGE_FLAG_STORAGE` - The texture can be used as a storage texture, which is required for a shader to write to the texture
|
|
5162
|
+
|
|
5103
5163
|
You can test if the device supports these values by checking if a specific enum is nil or not:
|
|
5104
5164
|
`if resource.TEXTURE_FORMAT_RGBA16F ~= nil then
|
|
5105
5165
|
-- it is safe to use this format
|
|
@@ -5237,11 +5297,14 @@ height of the texture
|
|
|
5237
5297
|
depth of the texture (i.e 1 for a 2D texture and 6 for a cube map)
|
|
5238
5298
|
`mipmaps`
|
|
5239
5299
|
number of mipmaps of the texture
|
|
5300
|
+
`flags`
|
|
5301
|
+
usage hints of the texture.
|
|
5240
5302
|
`type`
|
|
5241
5303
|
The texture type. Supported values:
|
|
5242
5304
|
|
|
5243
5305
|
|
|
5244
5306
|
- `resource.TEXTURE_TYPE_2D`
|
|
5307
|
+
- `resource.TEXTURE_TYPE_IMAGE_2D`
|
|
5245
5308
|
- `resource.TEXTURE_TYPE_CUBE_MAP`
|
|
5246
5309
|
- `resource.TEXTURE_TYPE_2D_ARRAY`
|
|
5247
5310
|
|
|
@@ -5870,7 +5933,7 @@ If the request was successfull, this will contain the request payload in a buffe
|
|
|
5870
5933
|
* @param arg5 argument 5
|
|
5871
5934
|
* @param arg6 argument 6
|
|
5872
5935
|
*/
|
|
5873
|
-
export function reboot(arg1
|
|
5936
|
+
export function reboot(arg1?: string, arg2?: string, arg3?: string, arg4?: string, arg5?: string, arg6?: string): void
|
|
5874
5937
|
|
|
5875
5938
|
/**
|
|
5876
5939
|
* The table can later be loaded by `sys.load`.
|
|
@@ -7014,6 +7077,98 @@ declare namespace camera {
|
|
|
7014
7077
|
*/
|
|
7015
7078
|
export let aspect_ratio: any
|
|
7016
7079
|
|
|
7080
|
+
/**
|
|
7081
|
+
* get aspect ratio
|
|
7082
|
+
* @param camera camera id
|
|
7083
|
+
* @return aspect_ratio the aspect ratio.
|
|
7084
|
+
*/
|
|
7085
|
+
export function get_aspect_ratio(camera: any): number
|
|
7086
|
+
|
|
7087
|
+
/**
|
|
7088
|
+
* This function returns a table with all the camera URLs that have been
|
|
7089
|
+
* registered in the render context.
|
|
7090
|
+
* @param camera camera id
|
|
7091
|
+
* @return cameras a table with all camera URLs
|
|
7092
|
+
*/
|
|
7093
|
+
export function get_cameras(camera: any): any
|
|
7094
|
+
|
|
7095
|
+
/**
|
|
7096
|
+
* get far z
|
|
7097
|
+
* @param camera camera id
|
|
7098
|
+
* @return far_z the far z.
|
|
7099
|
+
*/
|
|
7100
|
+
export function get_far_z(camera: any): number
|
|
7101
|
+
|
|
7102
|
+
/**
|
|
7103
|
+
* get field of view
|
|
7104
|
+
* @param camera camera id
|
|
7105
|
+
* @return fov the field of view.
|
|
7106
|
+
*/
|
|
7107
|
+
export function get_fov(camera: any): number
|
|
7108
|
+
|
|
7109
|
+
/**
|
|
7110
|
+
* get near z
|
|
7111
|
+
* @param camera camera id
|
|
7112
|
+
* @return near_z the near z.
|
|
7113
|
+
*/
|
|
7114
|
+
export function get_near_z(camera: any): number
|
|
7115
|
+
|
|
7116
|
+
/**
|
|
7117
|
+
* get orthographic zoom
|
|
7118
|
+
* @param camera camera id
|
|
7119
|
+
* @return orthographic_zoom true if the camera is using an orthographic projection.
|
|
7120
|
+
*/
|
|
7121
|
+
export function get_orthographic_zoom(camera: any): boolean
|
|
7122
|
+
|
|
7123
|
+
/**
|
|
7124
|
+
* get projection matrix
|
|
7125
|
+
* @param camera camera id
|
|
7126
|
+
* @return projection the projection matrix.
|
|
7127
|
+
*/
|
|
7128
|
+
export function get_projection(camera: any): vmath.matrix4
|
|
7129
|
+
|
|
7130
|
+
/**
|
|
7131
|
+
* get view matrix
|
|
7132
|
+
* @param camera camera id
|
|
7133
|
+
* @return view the view matrix.
|
|
7134
|
+
*/
|
|
7135
|
+
export function get_view(camera: any): vmath.matrix4
|
|
7136
|
+
|
|
7137
|
+
/**
|
|
7138
|
+
* set aspect ratio
|
|
7139
|
+
* @param camera camera id
|
|
7140
|
+
* @param aspect_ratio the aspect ratio.
|
|
7141
|
+
*/
|
|
7142
|
+
export function set_aspect_ratio(camera: any, aspect_ratio: number): void
|
|
7143
|
+
|
|
7144
|
+
/**
|
|
7145
|
+
* set far z
|
|
7146
|
+
* @param camera camera id
|
|
7147
|
+
* @param far_z the far z.
|
|
7148
|
+
*/
|
|
7149
|
+
export function set_far_z(camera: any, far_z: number): void
|
|
7150
|
+
|
|
7151
|
+
/**
|
|
7152
|
+
* set field of view
|
|
7153
|
+
* @param camera camera id
|
|
7154
|
+
* @param fov the field of view.
|
|
7155
|
+
*/
|
|
7156
|
+
export function set_fov(camera: any, fov: number): void
|
|
7157
|
+
|
|
7158
|
+
/**
|
|
7159
|
+
* set near z
|
|
7160
|
+
* @param camera camera id
|
|
7161
|
+
* @param near_z the near z.
|
|
7162
|
+
*/
|
|
7163
|
+
export function set_near_z(camera: any, near_z: number): void
|
|
7164
|
+
|
|
7165
|
+
/**
|
|
7166
|
+
* set orthographic zoom
|
|
7167
|
+
* @param camera camera id
|
|
7168
|
+
* @param orthographic_zoom true if the camera is using an orthographic projection.
|
|
7169
|
+
*/
|
|
7170
|
+
export function set_orthographic_zoom(camera: any, orthographic_zoom: boolean): void
|
|
7171
|
+
|
|
7017
7172
|
/**
|
|
7018
7173
|
* Camera frustum far plane.
|
|
7019
7174
|
* The type of the property is float.
|
|
@@ -7160,13 +7315,15 @@ declare namespace collectionproxy {
|
|
|
7160
7315
|
export type async_load = "async_load"
|
|
7161
7316
|
|
|
7162
7317
|
/**
|
|
7163
|
-
* return an indexed table of resources for a collection proxy
|
|
7164
|
-
*
|
|
7165
|
-
*
|
|
7166
|
-
*
|
|
7167
|
-
* LiveUpdate
|
|
7318
|
+
* return an indexed table of resources for a collection proxy where the
|
|
7319
|
+
* referenced collection has been excluded using LiveUpdate. Each entry is a
|
|
7320
|
+
* hexadecimal string that represents the data of the specific resource.
|
|
7321
|
+
* This representation corresponds with the filename for each individual
|
|
7322
|
+
* resource that is exported when you bundle an application with LiveUpdate
|
|
7323
|
+
* functionality.
|
|
7168
7324
|
* @param collectionproxy the collectionproxy to check for resources.
|
|
7169
|
-
* @return resources the resources
|
|
7325
|
+
* @return resources the resources, or an empty list if the
|
|
7326
|
+
collection was not excluded.
|
|
7170
7327
|
*/
|
|
7171
7328
|
export function get_resources(collectionproxy: url): any
|
|
7172
7329
|
|