@defold-typescript/types 0.5.2 → 0.5.3

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.
@@ -8,30 +8,30 @@ declare global {
8
8
  * @param url - target url
9
9
  * @param method - HTTP/HTTPS method, e.g. "GET", "PUT", "POST" etc.
10
10
  * @param callback - response callback function
11
- `self`
12
- object The script instance
13
- `id`
14
- hash Internal message identifier. Do not use!
15
- `response`
16
- table The response data. Contains the fields:
17
- - number `status`: the status of the response
18
- - string `response`: the response data (if not saved on disc)
19
- - table `headers`: all the returned headers (if status is 200 or 206)
20
- - string `path`: the stored path (if saved to disc)
21
- - string `error`: if any unforeseen errors occurred (e.g. file I/O)
22
- - number `bytes_received`: the amount of bytes received/sent for a request, only if option `report_progress` is true
23
- - number `bytes_total`: the total amount of bytes for a request, only if option `report_progress` is true
24
- - number `range_start`: the start offset into the requested file
25
- - number `range_end`: the end offset into the requested file (inclusive)
26
- - number `document_size`: the full size of the requested file
11
+ * `self`
12
+ * object The script instance
13
+ * `id`
14
+ * hash Internal message identifier. Do not use!
15
+ * `response`
16
+ * table The response data. Contains the fields:
17
+ * - number `status`: the status of the response
18
+ * - string `response`: the response data (if not saved on disc)
19
+ * - table `headers`: all the returned headers (if status is 200 or 206)
20
+ * - string `path`: the stored path (if saved to disc)
21
+ * - string `error`: if any unforeseen errors occurred (e.g. file I/O)
22
+ * - number `bytes_received`: the amount of bytes received/sent for a request, only if option `report_progress` is true
23
+ * - number `bytes_total`: the total amount of bytes for a request, only if option `report_progress` is true
24
+ * - number `range_start`: the start offset into the requested file
25
+ * - number `range_end`: the end offset into the requested file (inclusive)
26
+ * - number `document_size`: the full size of the requested file
27
27
  * @param headers - optional table with custom headers
28
28
  * @param post_data - optional data to send
29
29
  * @param options - optional table with request parameters. Supported entries:
30
- - number `timeout`: timeout in seconds
31
- - string `path`: path on disc where to download the file. Only overwrites the path if status is 200. Path should be absolute
32
- - boolean `ignore_cache`: don't return cached data if we get a 304. Not available in HTML5 build
33
- - boolean `chunked_transfer`: use chunked transfer encoding for https requests larger than 16kb. Defaults to true. Not available in HTML5 build
34
- - boolean `report_progress`: when it is true, the amount of bytes sent and/or received for a request will be passed into the callback function
30
+ * - number `timeout`: timeout in seconds
31
+ * - string `path`: path on disc where to download the file. Only overwrites the path if status is 200. Path should be absolute
32
+ * - boolean `ignore_cache`: don't return cached data if we get a 304. Not available in HTML5 build
33
+ * - boolean `chunked_transfer`: use chunked transfer encoding for https requests larger than 16kb. Defaults to true. Not available in HTML5 build
34
+ * - boolean `report_progress`: when it is true, the amount of bytes sent and/or received for a request will be passed into the callback function
35
35
  * @example
36
36
  * ```lua
37
37
  * Basic HTTP-GET request. The callback receives a table with the response
@@ -6,7 +6,7 @@ declare global {
6
6
  *
7
7
  * @param payload - The iac payload.
8
8
  * @param type - The type of iac, an iac.TYPE_ enumeration. It can be one of the predefined constants below
9
- - `iac.TYPE_INVOCATION`
9
+ * - `iac.TYPE_INVOCATION`
10
10
  */
11
11
  function set_listener(payload: Record<string | number, unknown>, type: number): void;
12
12
  }
@@ -26,10 +26,10 @@ declare global {
26
26
  * Get current iap provider
27
27
  *
28
28
  * @returns one of the following values
29
- - `iap.PROVIDER_ID_GOOGLE`
30
- - `iap.PROVIDER_ID_AMAZON`
31
- - `iap.PROVIDER_ID_APPLE`
32
- - `iap.PROVIDER_ID_FACEBOOK`
29
+ * - `iap.PROVIDER_ID_GOOGLE`
30
+ * - `iap.PROVIDER_ID_AMAZON`
31
+ * - `iap.PROVIDER_ID_APPLE`
32
+ * - `iap.PROVIDER_ID_FACEBOOK`
33
33
  */
34
34
  function get_provider_id(): Opaque<"constant">;
35
35
  /**
@@ -24,12 +24,12 @@ declare global {
24
24
  *
25
25
  * @param buffer - .astc file data buffer
26
26
  * @returns header or `nil` if buffer is not a valid .astc. The header has these fields:
27
- - number `width`: image width
28
- - number `height`: image height
29
- - number `depth`: image depth
30
- - number `block_size_x`: block size x
31
- - number `block_size_y`: block size y
32
- - number `block_size_z`: block size z
27
+ * - number `width`: image width
28
+ * - number `height`: image height
29
+ * - number `depth`: image depth
30
+ * - number `block_size_x`: block size x
31
+ * - number `block_size_y`: block size y
32
+ * - number `block_size_z`: block size z
33
33
  * @example
34
34
  * ```lua
35
35
  * How to get the block size and dimensions from a .astc file
@@ -44,19 +44,19 @@ declare global {
44
44
  *
45
45
  * @param buffer - image data buffer
46
46
  * @param options - An optional table containing parameters for loading the image. Supported entries:
47
- `premultiply_alpha`
48
- boolean True if alpha should be premultiplied into the color components. Defaults to `false`.
49
- `flip_vertically`
50
- boolean True if the image contents should be flipped vertically. Defaults to `false`.
47
+ * `premultiply_alpha`
48
+ * boolean True if alpha should be premultiplied into the color components. Defaults to `false`.
49
+ * `flip_vertically`
50
+ * boolean True if the image contents should be flipped vertically. Defaults to `false`.
51
51
  * @returns object or `nil` if loading fails. The object is a table with the following fields:
52
- - number `width`: image width
53
- - number `height`: image height
54
- - constant `type`: image type
55
- - `image.TYPE_RGB`
56
- - `image.TYPE_RGBA`
57
- - `image.TYPE_LUMINANCE`
58
- - `image.TYPE_LUMINANCE_ALPHA`
59
- - string `buffer`: the raw image data
52
+ * - number `width`: image width
53
+ * - number `height`: image height
54
+ * - constant `type`: image type
55
+ * - `image.TYPE_RGB`
56
+ * - `image.TYPE_RGBA`
57
+ * - `image.TYPE_LUMINANCE`
58
+ * - `image.TYPE_LUMINANCE_ALPHA`
59
+ * - string `buffer`: the raw image data
60
60
  * @example
61
61
  * ```lua
62
62
  * How to load an image from an URL and create a GUI texture from it:
@@ -73,19 +73,19 @@ declare global {
73
73
  *
74
74
  * @param buffer - image data buffer
75
75
  * @param options - An optional table containing parameters for loading the image. Supported entries:
76
- `premultiply_alpha`
77
- boolean True if alpha should be premultiplied into the color components. Defaults to `false`.
78
- `flip_vertically`
79
- boolean True if the image contents should be flipped vertically. Defaults to `false`.
76
+ * `premultiply_alpha`
77
+ * boolean True if alpha should be premultiplied into the color components. Defaults to `false`.
78
+ * `flip_vertically`
79
+ * boolean True if the image contents should be flipped vertically. Defaults to `false`.
80
80
  * @returns object or `nil` if loading fails. The object is a table with the following fields:
81
- - number `width`: image width
82
- - number `height`: image height
83
- - constant `type`: image type
84
- - `image.TYPE_RGB`
85
- - `image.TYPE_RGBA`
86
- - `image.TYPE_LUMINANCE`
87
- - `image.TYPE_LUMINANCE_ALPHA`
88
- - buffer `buffer`: the script buffer that holds the decompressed image data. See buffer.create how to use the buffer.
81
+ * - number `width`: image width
82
+ * - number `height`: image height
83
+ * - constant `type`: image type
84
+ * - `image.TYPE_RGB`
85
+ * - `image.TYPE_RGBA`
86
+ * - `image.TYPE_LUMINANCE`
87
+ * - `image.TYPE_LUMINANCE_ALPHA`
88
+ * - buffer `buffer`: the script buffer that holds the decompressed image data. See buffer.create how to use the buffer.
89
89
  * @example
90
90
  * ```lua
91
91
  * Load an image from an URL as a buffer and create a texture resource from it:
@@ -11,7 +11,7 @@ declare global {
11
11
  *
12
12
  * @param json - json data
13
13
  * @param options - table with decode options
14
- - boolean `decode_null_as_userdata`: wether to decode a JSON null value as json.null or nil (default is nil)
14
+ * - boolean `decode_null_as_userdata`: wether to decode a JSON null value as json.null or nil (default is nil)
15
15
  * @returns decoded json
16
16
  * @example
17
17
  * ```lua
@@ -42,7 +42,7 @@ declare global {
42
42
  *
43
43
  * @param tbl - lua table to encode
44
44
  * @param options - table with encode options
45
- - string `encode_empty_table_as_object`: wether to encode an empty table as an JSON object or array (default is object)
45
+ * - string `encode_empty_table_as_object`: wether to encode an empty table as an JSON object or array (default is object)
46
46
  * @returns encoded json
47
47
  * @example
48
48
  * ```lua
@@ -1,4 +1,5 @@
1
1
  import "../../src/go-overloads";
2
+ import "../../src/message-guard";
2
3
  import "../../src/msg-overloads";
3
4
  import "../b2d";
4
5
  import "../buffer";
@@ -1,4 +1,5 @@
1
1
  import "../../src/go-overloads";
2
+ import "../../src/message-guard";
2
3
  import "../../src/msg-overloads";
3
4
  import "../b2d";
4
5
  import "../buffer";
@@ -1,4 +1,5 @@
1
1
  import "../../src/go-overloads";
2
+ import "../../src/message-guard";
2
3
  import "../../src/msg-overloads";
3
4
  import "../b2d";
4
5
  import "../buffer";
@@ -87,31 +87,31 @@ declare global {
87
87
  * @param url - the model for which to play the animation
88
88
  * @param anim_id - id of the animation to play
89
89
  * @param playback - playback mode of the animation
90
- - `go.PLAYBACK_ONCE_FORWARD`
91
- - `go.PLAYBACK_ONCE_BACKWARD`
92
- - `go.PLAYBACK_ONCE_PINGPONG`
93
- - `go.PLAYBACK_LOOP_FORWARD`
94
- - `go.PLAYBACK_LOOP_BACKWARD`
95
- - `go.PLAYBACK_LOOP_PINGPONG`
90
+ * - `go.PLAYBACK_ONCE_FORWARD`
91
+ * - `go.PLAYBACK_ONCE_BACKWARD`
92
+ * - `go.PLAYBACK_ONCE_PINGPONG`
93
+ * - `go.PLAYBACK_LOOP_FORWARD`
94
+ * - `go.PLAYBACK_LOOP_BACKWARD`
95
+ * - `go.PLAYBACK_LOOP_PINGPONG`
96
96
  * @param play_properties - optional table with properties
97
- Play properties table:
98
- `blend_duration`
99
- number Duration of a linear blend between the current and new animation.
100
- `offset`
101
- number The normalized initial value of the animation cursor when the animation starts playing.
102
- `playback_rate`
103
- number The rate with which the animation will be played. Must be positive.
97
+ * Play properties table:
98
+ * `blend_duration`
99
+ * number Duration of a linear blend between the current and new animation.
100
+ * `offset`
101
+ * number The normalized initial value of the animation cursor when the animation starts playing.
102
+ * `playback_rate`
103
+ * number The rate with which the animation will be played. Must be positive.
104
104
  * @param complete_function - function to call when the animation has completed.
105
- `self`
106
- object The current object.
107
- `message_id`
108
- hash The name of the completion message, `"model_animation_done"`.
109
- `message`
110
- table Information about the completion:
111
- - hash `animation_id` - the animation that was completed.
112
- - constant `playback` - the playback mode for the animation.
113
- `sender`
114
- url The invoker of the callback: the model component.
105
+ * `self`
106
+ * object The current object.
107
+ * `message_id`
108
+ * hash The name of the completion message, `"model_animation_done"`.
109
+ * `message`
110
+ * table Information about the completion:
111
+ * - hash `animation_id` - the animation that was completed.
112
+ * - constant `playback` - the playback mode for the animation.
113
+ * `sender`
114
+ * url The invoker of the callback: the model component.
115
115
  * @example
116
116
  * ```lua
117
117
  * The following examples assumes that the model has id "model".
@@ -27,18 +27,18 @@ declare global {
27
27
  *
28
28
  * @param url - the particle fx that should start playing.
29
29
  * @param emitter_state_function - optional callback function that will be called when an emitter attached to this particlefx changes state.
30
- `self`
31
- object The current object
32
- `id`
33
- hash The id of the particle fx component
34
- `emitter`
35
- hash The id of the emitter
36
- `state`
37
- constant the new state of the emitter:
38
- - `particlefx.EMITTER_STATE_SLEEPING`
39
- - `particlefx.EMITTER_STATE_PRESPAWN`
40
- - `particlefx.EMITTER_STATE_SPAWNING`
41
- - `particlefx.EMITTER_STATE_POSTSPAWN`
30
+ * `self`
31
+ * object The current object
32
+ * `id`
33
+ * hash The id of the particle fx component
34
+ * `emitter`
35
+ * hash The id of the emitter
36
+ * `state`
37
+ * constant the new state of the emitter:
38
+ * - `particlefx.EMITTER_STATE_SLEEPING`
39
+ * - `particlefx.EMITTER_STATE_PRESPAWN`
40
+ * - `particlefx.EMITTER_STATE_SPAWNING`
41
+ * - `particlefx.EMITTER_STATE_POSTSPAWN`
42
42
  * @example
43
43
  * ```lua
44
44
  * How to play a particle fx when a game object is created.
@@ -107,7 +107,7 @@ declare global {
107
107
  *
108
108
  * @param url - the particle fx that should stop playing
109
109
  * @param options - Options when stopping the particle fx. Supported options:
110
- - boolean `clear`: instantly clear spawned particles
110
+ * - boolean `clear`: instantly clear spawned particles
111
111
  * @example
112
112
  * ```lua
113
113
  * How to stop a particle fx when a game object is deleted and immediately also clear
@@ -42,8 +42,8 @@ declare global {
42
42
  * @param collisionobject_b - second collision object
43
43
  * @param position_b - local position where to attach the joint on the second collision object
44
44
  * @param properties - optional joint specific properties table
45
- See each joint type for possible properties field. The one field that is accepted for all joint types is:
46
- - boolean `collide_connected`: Set this flag to true if the attached bodies should collide.
45
+ * See each joint type for possible properties field. The one field that is accepted for all joint types is:
46
+ * - boolean `collide_connected`: Set this flag to true if the attached bodies should collide.
47
47
  */
48
48
  function create_joint(joint_type: number, collisionobject_a: string | Hash | Url, joint_id: string | Hash, position_a: Vector3, collisionobject_b: string | Hash | Url, position_b: Vector3, properties?: Record<string | number, unknown>): void;
49
49
  /**
@@ -77,11 +77,11 @@ declare global {
77
77
  *
78
78
  * @param url - the collision object to return the group of.
79
79
  * @returns hash value of the group.
80
- `local function check_is_enemy()
81
- local group = physics.get_group("#collisionobject")
82
- return group == hash("enemy")
83
- end
84
- `
80
+ * `local function check_is_enemy()
81
+ * local group = physics.get_group("#collisionobject")
82
+ * return group == hash("enemy")
83
+ * end
84
+ * `
85
85
  */
86
86
  function get_group(url: string | Hash | Url): Hash;
87
87
  /**
@@ -92,7 +92,7 @@ declare global {
92
92
  * @param collisionobject - collision object where the joint exist
93
93
  * @param joint_id - id of the joint
94
94
  * @returns properties table. See the joint types for what fields are available, the only field available for all types is:
95
- - boolean `collide_connected`: Set this flag to true if the attached bodies should collide.
95
+ * - boolean `collide_connected`: Set this flag to true if the attached bodies should collide.
96
96
  */
97
97
  function get_joint_properties(collisionobject: string | Hash | Url, joint_id: string | Hash): { collide_connected: boolean };
98
98
  /**
@@ -122,12 +122,12 @@ declare global {
122
122
  * @param url - the collision object to check the mask of.
123
123
  * @param group - the name of the group to check for.
124
124
  * @returns boolean value of the maskbit. 'true' if present, 'false' otherwise.
125
- `local function is_invincible()
126
- -- check if the collisionobject would collide with the "bullet" group
127
- local invincible = physics.get_maskbit("#collisionobject", "bullet")
128
- return invincible
129
- end
130
- `
125
+ * `local function is_invincible()
126
+ * -- check if the collisionobject would collide with the "bullet" group
127
+ * local invincible = physics.get_maskbit("#collisionobject", "bullet")
128
+ * return invincible
129
+ * end
130
+ * `
131
131
  */
132
132
  function get_maskbit(url: string | Hash | Url, group: string): boolean;
133
133
  /**
@@ -136,30 +136,30 @@ declare global {
136
136
  * @param url - the collision object.
137
137
  * @param shape - the name of the shape to get data for.
138
138
  * @returns A table containing meta data about the physics shape
139
- `type`
140
- number The shape type. Supported values:
141
- - `physics.SHAPE_TYPE_SPHERE`
142
- - `physics.SHAPE_TYPE_BOX`
143
- - `physics.SHAPE_TYPE_CAPSULE` *Only supported for 3D physics*
144
- - `physics.SHAPE_TYPE_HULL`
145
- The returned table contains different fields depending on which type the shape is.
146
- If the shape is a sphere:
147
- `diameter`
148
- number the diameter of the sphere shape
149
- If the shape is a box:
150
- `dimensions`
151
- vector3 a `vmath.vector3` of the box dimensions
152
- If the shape is a capsule:
153
- `diameter`
154
- number the diameter of the capsule poles
155
- `height`
156
- number the height of the capsule
157
- `local function get_shape_meta()
158
- local sphere = physics.get_shape("#collisionobject", "my_sphere_shape")
159
- -- returns a table with sphere.diameter
160
- return sphere
161
- end
162
- `
139
+ * `type`
140
+ * number The shape type. Supported values:
141
+ * - `physics.SHAPE_TYPE_SPHERE`
142
+ * - `physics.SHAPE_TYPE_BOX`
143
+ * - `physics.SHAPE_TYPE_CAPSULE` *Only supported for 3D physics*
144
+ * - `physics.SHAPE_TYPE_HULL`
145
+ * The returned table contains different fields depending on which type the shape is.
146
+ * If the shape is a sphere:
147
+ * `diameter`
148
+ * number the diameter of the sphere shape
149
+ * If the shape is a box:
150
+ * `dimensions`
151
+ * vector3 a `vmath.vector3` of the box dimensions
152
+ * If the shape is a capsule:
153
+ * `diameter`
154
+ * number the diameter of the capsule poles
155
+ * `height`
156
+ * number the height of the capsule
157
+ * `local function get_shape_meta()
158
+ * local sphere = physics.get_shape("#collisionobject", "my_sphere_shape")
159
+ * -- returns a table with sphere.diameter
160
+ * return sphere
161
+ * end
162
+ * `
163
163
  */
164
164
  function get_shape(url: string | Hash | Url, shape: string | Hash): { type: number; diameter: number; dimensions: Vector3; diameter: number; height: number };
165
165
  /**
@@ -174,8 +174,8 @@ declare global {
174
174
  * @param to - the world position of the end of the ray
175
175
  * @param groups - a lua table containing the hashed groups for which to test collisions against
176
176
  * @param options - a lua table containing options for the raycast.
177
- `all`
178
- boolean Set to `true` to return all ray cast hits. If `false`, it will only return the closest hit.
177
+ * `all`
178
+ * boolean Set to `true` to return all ray cast hits. If `false`, it will only return the closest hit.
179
179
  * @returns It returns a list. If missed it returns `nil`. See ray_cast_response for details on the returned values.
180
180
  * @example
181
181
  * ```lua
@@ -239,17 +239,17 @@ declare global {
239
239
  * Only one physics world event listener can be set at a time.
240
240
  *
241
241
  * @param callback - A callback that receives an information about all the physics interactions in this physics world.
242
- `self`
243
- object The calling script
244
- `event`
245
- constant The type of event. Can be one of these messages:
246
- - contact_point_event
247
- - collision_event
248
- - trigger_event
249
- - ray_cast_response
250
- - ray_cast_missed
251
- `data`
252
- table The callback value data is a table that contains event-related data. See the documentation for details on the messages.
242
+ * `self`
243
+ * object The calling script
244
+ * `event`
245
+ * constant The type of event. Can be one of these messages:
246
+ * - contact_point_event
247
+ * - collision_event
248
+ * - trigger_event
249
+ * - ray_cast_response
250
+ * - ray_cast_missed
251
+ * `data`
252
+ * table The callback value data is a table that contains event-related data. See the documentation for details on the messages.
253
253
  * @example
254
254
  * ```lua
255
255
  * local function physics_world_listener(self, events)
@@ -352,10 +352,10 @@ declare global {
352
352
  *
353
353
  * @param url - the collision object affected.
354
354
  * @param group - the new group name to be assigned.
355
- `local function change_collision_group()
356
- physics.set_group("#collisionobject", "enemy")
357
- end
358
- `
355
+ * `local function change_collision_group()
356
+ * physics.set_group("#collisionobject", "enemy")
357
+ * end
358
+ * `
359
359
  */
360
360
  function set_group(url: string | Hash | Url, group: string): void;
361
361
  /**
@@ -380,7 +380,7 @@ declare global {
380
380
  * @param collisionobject - collision object where the joint exist
381
381
  * @param joint_id - id of the joint
382
382
  * @param properties - joint specific properties table
383
- Note: The `collide_connected` field cannot be updated/changed after a connection has been made.
383
+ * Note: The `collide_connected` field cannot be updated/changed after a connection has been made.
384
384
  */
385
385
  function set_joint_properties(collisionobject: string | Hash | Url, joint_id: string | Hash, properties: Record<string | number, unknown>): void;
386
386
  /**
@@ -389,11 +389,11 @@ declare global {
389
389
  * @param url - the collision object to change the mask of.
390
390
  * @param group - the name of the group (maskbit) to modify in the mask.
391
391
  * @param maskbit - boolean value of the new maskbit. 'true' to enable, 'false' to disable.
392
- `local function make_invincible()
393
- -- no longer collide with the "bullet" group
394
- physics.set_maskbit("#collisionobject", "bullet", false)
395
- end
396
- `
392
+ * `local function make_invincible()
393
+ * -- no longer collide with the "bullet" group
394
+ * physics.set_maskbit("#collisionobject", "bullet", false)
395
+ * end
396
+ * `
397
397
  */
398
398
  function set_maskbit(url: string | Hash | Url, group: string, maskbit: boolean): void;
399
399
  /**
@@ -404,26 +404,26 @@ declare global {
404
404
  * @param url - the collision object.
405
405
  * @param shape - the name of the shape to get data for.
406
406
  * @param table - the shape data to update the shape with.
407
- See physics.get_shape for a detailed description of each field in the data table.
408
- `local function set_shape_data()
409
- -- set capsule shape data
410
- local data = {}
411
- data.type = physics.SHAPE_TYPE_CAPSULE
412
- data.diameter = 10
413
- data.height = 20
414
- physics.set_shape("#collisionobject", "my_capsule_shape", data)
415
- -- set sphere shape data
416
- data = {}
417
- data.type = physics.SHAPE_TYPE_SPHERE
418
- data.diameter = 10
419
- physics.set_shape("#collisionobject", "my_sphere_shape", data)
420
- -- set box shape data
421
- data = {}
422
- data.type = physics.SHAPE_TYPE_BOX
423
- data.dimensions = vmath.vector3(10, 10, 5)
424
- physics.set_shape("#collisionobject", "my_box_shape", data)
425
- end
426
- `
407
+ * See physics.get_shape for a detailed description of each field in the data table.
408
+ * `local function set_shape_data()
409
+ * -- set capsule shape data
410
+ * local data = {}
411
+ * data.type = physics.SHAPE_TYPE_CAPSULE
412
+ * data.diameter = 10
413
+ * data.height = 20
414
+ * physics.set_shape("#collisionobject", "my_capsule_shape", data)
415
+ * -- set sphere shape data
416
+ * data = {}
417
+ * data.type = physics.SHAPE_TYPE_SPHERE
418
+ * data.diameter = 10
419
+ * physics.set_shape("#collisionobject", "my_sphere_shape", data)
420
+ * -- set box shape data
421
+ * data = {}
422
+ * data.type = physics.SHAPE_TYPE_BOX
423
+ * data.dimensions = vmath.vector3(10, 10, 5)
424
+ * physics.set_shape("#collisionobject", "my_box_shape", data)
425
+ * end
426
+ * `
427
427
  */
428
428
  function set_shape(url: string | Hash | Url, shape: string | Hash, table: { type?: number; diameter?: number; dimensions?: Vector3; diameter?: number; height?: number }): void;
429
429
  /**
@@ -457,12 +457,12 @@ declare global {
457
457
  * efficiency reasons. This function wakes them up.
458
458
  *
459
459
  * @param url - the collision object to wake.
460
- `function on_input(self, action_id, action)
461
- if action_id == hash("test") and action.pressed then
462
- physics.wakeup("#collisionobject")
463
- end
464
- end
465
- `
460
+ * `function on_input(self, action_id, action)
461
+ * if action_id == hash("test") and action.pressed then
462
+ * physics.wakeup("#collisionobject")
463
+ * end
464
+ * end
465
+ * `
466
466
  */
467
467
  function wakeup(url: string | Hash | Url): void;
468
468
  interface properties {
@@ -144,13 +144,13 @@ declare global {
144
144
  * Set the on-screen profile mode - run, pause, record or show peak frame
145
145
  *
146
146
  * @param mode - the mode to set the ui profiler in
147
- - `profiler.MODE_RUN` This is default mode that continously shows the last frame
148
- - `profiler.MODE_PAUSE` Pauses on the currently displayed frame
149
- - `profiler.MODE_SHOW_PEAK_FRAME` Pauses on the currently displayed frame but shows a new frame if that frame is slower
150
- - `profiler.MODE_RECORD` Records all incoming frames to the recording buffer
151
- To stop recording, switch to a different mode such as `MODE_PAUSE` or `MODE_RUN`.
152
- You can also use the `view_recorded_frame` function to display a recorded frame. Doing so stops the recording as well.
153
- Every time you switch to recording mode the recording buffer is cleared.
147
+ * - `profiler.MODE_RUN` This is default mode that continously shows the last frame
148
+ * - `profiler.MODE_PAUSE` Pauses on the currently displayed frame
149
+ * - `profiler.MODE_SHOW_PEAK_FRAME` Pauses on the currently displayed frame but shows a new frame if that frame is slower
150
+ * - `profiler.MODE_RECORD` Records all incoming frames to the recording buffer
151
+ * To stop recording, switch to a different mode such as `MODE_PAUSE` or `MODE_RUN`.
152
+ * You can also use the `view_recorded_frame` function to display a recorded frame. Doing so stops the recording as well.
153
+ * Every time you switch to recording mode the recording buffer is cleared.
154
154
  * @example
155
155
  * ```lua
156
156
  * function start_recording()
@@ -167,8 +167,8 @@ declare global {
167
167
  * Set the on-screen profile view mode - minimized or expanded
168
168
  *
169
169
  * @param mode - the view mode to set the ui profiler in
170
- - `profiler.VIEW_MODE_FULL` The default mode which displays all the ui profiler details
171
- - `profiler.VIEW_MODE_MINIMIZED` Minimized mode which only shows the top header (fps counters and ui profiler mode)
170
+ * - `profiler.VIEW_MODE_FULL` The default mode which displays all the ui profiler details
171
+ * - `profiler.VIEW_MODE_MINIMIZED` Minimized mode which only shows the top header (fps counters and ui profiler mode)
172
172
  * @example
173
173
  * ```lua
174
174
  * -- Minimize the profiler view
@@ -201,8 +201,8 @@ declare global {
201
201
  * The frame to show can either be an absolute frame or a relative frame to the current frame.
202
202
  *
203
203
  * @param frame_index - a table where you specify one of the following parameters:
204
- - `distance` The offset from the currently displayed frame (this is truncated between zero and the number of recorded frames)
205
- - `frame` The frame index in the recording buffer (1 is first recorded frame)
204
+ * - `distance` The offset from the currently displayed frame (this is truncated between zero and the number of recorded frames)
205
+ * - `frame` The frame index in the recording buffer (1 is first recorded frame)
206
206
  * @example
207
207
  * ```lua
208
208
  * -- Go back one frame