@defold-typescript/types 0.49.0 → 0.50.0

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 (76) hide show
  1. package/api-availability.json +696 -624
  2. package/api-signatures.json +6799 -160
  3. package/api-targets.json +393 -2
  4. package/examples/translations.json +12 -0
  5. package/generated/b2d.d.ts +15 -0
  6. package/generated/bullet3d.d.ts +16 -0
  7. package/generated/font.d.ts +7 -3
  8. package/generated/graphics.d.ts +7 -0
  9. package/generated/gui.d.ts +5 -4
  10. package/generated/label.d.ts +3 -3
  11. package/generated/render.d.ts +16 -1
  12. package/generated/versions/defold-1.13.2/b2d.d.ts +709 -0
  13. package/generated/versions/defold-1.13.2/b2d_body.d.ts +593 -0
  14. package/generated/versions/defold-1.13.2/b2d_chain.d.ts +105 -0
  15. package/generated/versions/defold-1.13.2/b2d_fixture.d.ts +175 -0
  16. package/generated/versions/defold-1.13.2/b2d_joint.d.ts +1301 -0
  17. package/generated/versions/defold-1.13.2/b2d_shape.d.ts +423 -0
  18. package/generated/versions/defold-1.13.2/b2d_world.d.ts +308 -0
  19. package/generated/versions/defold-1.13.2/buffer.d.ts +192 -0
  20. package/generated/versions/defold-1.13.2/bullet3d.d.ts +91 -0
  21. package/generated/versions/defold-1.13.2/bullet3d_collision_object.d.ts +433 -0
  22. package/generated/versions/defold-1.13.2/bullet3d_constraint.d.ts +818 -0
  23. package/generated/versions/defold-1.13.2/bullet3d_rigid_body.d.ts +429 -0
  24. package/generated/versions/defold-1.13.2/bullet3d_shape.d.ts +123 -0
  25. package/generated/versions/defold-1.13.2/bullet3d_world.d.ts +492 -0
  26. package/generated/versions/defold-1.13.2/camera.d.ts +300 -0
  27. package/generated/versions/defold-1.13.2/collectionfactory.d.ts +148 -0
  28. package/generated/versions/defold-1.13.2/collectionproxy.d.ts +109 -0
  29. package/generated/versions/defold-1.13.2/compute.d.ts +107 -0
  30. package/generated/versions/defold-1.13.2/crash.d.ts +157 -0
  31. package/generated/versions/defold-1.13.2/editor-vm/http.d.ts +139 -0
  32. package/generated/versions/defold-1.13.2/editor-vm/image.d.ts +48 -0
  33. package/generated/versions/defold-1.13.2/editor-vm/json.d.ts +21 -0
  34. package/generated/versions/defold-1.13.2/editor-vm/localization.d.ts +42 -0
  35. package/generated/versions/defold-1.13.2/editor-vm/tilemap_tiles.d.ts +126 -0
  36. package/generated/versions/defold-1.13.2/editor-vm/zip.d.ts +38 -0
  37. package/generated/versions/defold-1.13.2/editor-vm/zlib.d.ts +24 -0
  38. package/generated/versions/defold-1.13.2/editor.d.ts +2177 -0
  39. package/generated/versions/defold-1.13.2/factory.d.ts +121 -0
  40. package/generated/versions/defold-1.13.2/font.d.ts +123 -0
  41. package/generated/versions/defold-1.13.2/go.d.ts +1166 -0
  42. package/generated/versions/defold-1.13.2/graphics.d.ts +613 -0
  43. package/generated/versions/defold-1.13.2/gui.d.ts +2212 -0
  44. package/generated/versions/defold-1.13.2/html5.d.ts +55 -0
  45. package/generated/versions/defold-1.13.2/http.d.ts +83 -0
  46. package/generated/versions/defold-1.13.2/image.d.ts +181 -0
  47. package/generated/versions/defold-1.13.2/index.d.ts +63 -0
  48. package/generated/versions/defold-1.13.2/json.d.ts +94 -0
  49. package/generated/versions/defold-1.13.2/kinds/editor-script.d.ts +14 -0
  50. package/generated/versions/defold-1.13.2/label.d.ts +164 -0
  51. package/generated/versions/defold-1.13.2/liveupdate.d.ts +143 -0
  52. package/generated/versions/defold-1.13.2/material.d.ts +490 -0
  53. package/generated/versions/defold-1.13.2/model.d.ts +287 -0
  54. package/generated/versions/defold-1.13.2/msg.d.ts +10 -0
  55. package/generated/versions/defold-1.13.2/particlefx.d.ts +155 -0
  56. package/generated/versions/defold-1.13.2/physics.d.ts +789 -0
  57. package/generated/versions/defold-1.13.2/profiler.d.ts +228 -0
  58. package/generated/versions/defold-1.13.2/render.d.ts +1153 -0
  59. package/generated/versions/defold-1.13.2/resource.d.ts +1628 -0
  60. package/generated/versions/defold-1.13.2/socket.d.ts +797 -0
  61. package/generated/versions/defold-1.13.2/sound.d.ts +323 -0
  62. package/generated/versions/defold-1.13.2/sprite.d.ts +179 -0
  63. package/generated/versions/defold-1.13.2/sys.d.ts +754 -0
  64. package/generated/versions/defold-1.13.2/tilemap.d.ts +206 -0
  65. package/generated/versions/defold-1.13.2/timer.d.ts +136 -0
  66. package/generated/versions/defold-1.13.2/types.d.ts +61 -0
  67. package/generated/versions/defold-1.13.2/vmath.d.ts +775 -0
  68. package/generated/versions/defold-1.13.2/window.d.ts +196 -0
  69. package/generated/versions/defold-1.13.2/zlib.d.ts +41 -0
  70. package/identity-vocabulary.json +1 -0
  71. package/package.json +2 -2
  72. package/scripts/import-defold-release.ts +3 -31
  73. package/scripts/materialize-version.ts +13 -7
  74. package/scripts/regen.ts +63 -29
  75. package/scripts/sync-api-docs.ts +31 -2
  76. package/src/emit-dts.ts +25 -3
@@ -0,0 +1,433 @@
1
+ /** @noSelfInFile */
2
+ import type { Opaque, Quaternion, Vector3 } from "../../../src/core-types";
3
+
4
+ declare global {
5
+ /**
6
+ * Functions shared by rigid bodies and trigger ghost objects. Defold keeps
7
+ * ownership of each object's user pointer, motion state, collision shape, and
8
+ * world membership. Logical child shapes are inspected and mutated through
9
+ * `bullet3d.shape`; ownership is not transferred to Lua.
10
+ *
11
+ * Positions, distances, and CCD thresholds use Defold units. Rotations,
12
+ * coefficients, flags, activation state, and time values use Bullet values.
13
+ * Floating-point and vector inputs must be finite. CCD radii and motion
14
+ * thresholds must also be non-negative.
15
+ */
16
+ namespace bullet3d.collision_object {
17
+ type ACTIVATION_STATE = typeof bullet3d.collision_object.ACTIVE_TAG | typeof bullet3d.collision_object.ISLAND_SLEEPING | typeof bullet3d.collision_object.WANTS_DEACTIVATION | typeof bullet3d.collision_object.DISABLE_DEACTIVATION | typeof bullet3d.collision_object.DISABLE_SIMULATION;
18
+ type COLLISION_FLAG = typeof bullet3d.collision_object.CF_DYNAMIC_OBJECT | typeof bullet3d.collision_object.CF_STATIC_OBJECT | typeof bullet3d.collision_object.CF_KINEMATIC_OBJECT | typeof bullet3d.collision_object.CF_NO_CONTACT_RESPONSE | typeof bullet3d.collision_object.CF_CUSTOM_MATERIAL_CALLBACK | typeof bullet3d.collision_object.CF_CHARACTER_OBJECT | typeof bullet3d.collision_object.CF_DISABLE_VISUALIZE_OBJECT | typeof bullet3d.collision_object.CF_DISABLE_SPU_COLLISION_PROCESSING;
19
+ type INTERNAL_TYPE = typeof bullet3d.collision_object.CO_COLLISION_OBJECT | typeof bullet3d.collision_object.CO_RIGID_BODY | typeof bullet3d.collision_object.CO_GHOST_OBJECT | typeof bullet3d.collision_object.CO_SOFT_BODY | typeof bullet3d.collision_object.CO_HF_FLUID;
20
+ /**
21
+ * Active simulation state.
22
+ */
23
+ const ACTIVE_TAG: number & { readonly __brand: "bullet3d.collision_object.ACTIVE_TAG" };
24
+ /**
25
+ * Character collision object flag.
26
+ */
27
+ const CF_CHARACTER_OBJECT: number & { readonly __brand: "bullet3d.collision_object.CF_CHARACTER_OBJECT" };
28
+ /**
29
+ * Custom material callback flag.
30
+ */
31
+ const CF_CUSTOM_MATERIAL_CALLBACK: number & { readonly __brand: "bullet3d.collision_object.CF_CUSTOM_MATERIAL_CALLBACK" };
32
+ /**
33
+ * Disable SPU collision processing flag.
34
+ */
35
+ const CF_DISABLE_SPU_COLLISION_PROCESSING: number & { readonly __brand: "bullet3d.collision_object.CF_DISABLE_SPU_COLLISION_PROCESSING" };
36
+ /**
37
+ * Disable debug visualization flag.
38
+ */
39
+ const CF_DISABLE_VISUALIZE_OBJECT: number & { readonly __brand: "bullet3d.collision_object.CF_DISABLE_VISUALIZE_OBJECT" };
40
+ /**
41
+ * Zero-valued default dynamic-object flag. Compare the complete collision-flags value with this constant; do not pass it to `has_collision_flag`, since zero is not a bit that can be tested.
42
+ */
43
+ const CF_DYNAMIC_OBJECT: number & { readonly __brand: "bullet3d.collision_object.CF_DYNAMIC_OBJECT" };
44
+ /**
45
+ * Kinematic collision object flag.
46
+ */
47
+ const CF_KINEMATIC_OBJECT: number & { readonly __brand: "bullet3d.collision_object.CF_KINEMATIC_OBJECT" };
48
+ /**
49
+ * Disable contact response flag.
50
+ */
51
+ const CF_NO_CONTACT_RESPONSE: number & { readonly __brand: "bullet3d.collision_object.CF_NO_CONTACT_RESPONSE" };
52
+ /**
53
+ * Static collision object flag.
54
+ */
55
+ const CF_STATIC_OBJECT: number & { readonly __brand: "bullet3d.collision_object.CF_STATIC_OBJECT" };
56
+ /**
57
+ * Generic collision object type.
58
+ */
59
+ const CO_COLLISION_OBJECT: number & { readonly __brand: "bullet3d.collision_object.CO_COLLISION_OBJECT" };
60
+ /**
61
+ * Ghost collision object type.
62
+ */
63
+ const CO_GHOST_OBJECT: number & { readonly __brand: "bullet3d.collision_object.CO_GHOST_OBJECT" };
64
+ /**
65
+ * Height-field fluid collision object type.
66
+ */
67
+ const CO_HF_FLUID: number & { readonly __brand: "bullet3d.collision_object.CO_HF_FLUID" };
68
+ /**
69
+ * Rigid body collision object type.
70
+ */
71
+ const CO_RIGID_BODY: number & { readonly __brand: "bullet3d.collision_object.CO_RIGID_BODY" };
72
+ /**
73
+ * Soft body collision object type.
74
+ */
75
+ const CO_SOFT_BODY: number & { readonly __brand: "bullet3d.collision_object.CO_SOFT_BODY" };
76
+ /**
77
+ * Disable automatic deactivation.
78
+ */
79
+ const DISABLE_DEACTIVATION: number & { readonly __brand: "bullet3d.collision_object.DISABLE_DEACTIVATION" };
80
+ /**
81
+ * Disable simulation.
82
+ */
83
+ const DISABLE_SIMULATION: number & { readonly __brand: "bullet3d.collision_object.DISABLE_SIMULATION" };
84
+ /**
85
+ * Sleeping simulation state.
86
+ */
87
+ const ISLAND_SLEEPING: number & { readonly __brand: "bullet3d.collision_object.ISLAND_SLEEPING" };
88
+ /**
89
+ * Wants-deactivation simulation state.
90
+ */
91
+ const WANTS_DEACTIVATION: number & { readonly __brand: "bullet3d.collision_object.WANTS_DEACTIVATION" };
92
+ /**
93
+ * Activate a collision object
94
+ *
95
+ * @param object - collision object
96
+ * @param force - force activation of a static or kinematic object; defaults to `false`
97
+ */
98
+ function activate(object: Opaque<"btCollisionObject" | "btRigidBody">, force?: boolean): void;
99
+ /**
100
+ * Force the activation state
101
+ *
102
+ * @param object - collision object
103
+ * @param state - activation state
104
+ */
105
+ function force_activation_state(object: Opaque<"btCollisionObject" | "btRigidBody">, state: bullet3d.collision_object.ACTIVATION_STATE): void;
106
+ /**
107
+ * Get the activation state
108
+ *
109
+ * @param object - collision object
110
+ * @returns activation state
111
+ */
112
+ function get_activation_state(object: Opaque<"btCollisionObject" | "btRigidBody">): bullet3d.collision_object.ACTIVATION_STATE;
113
+ /**
114
+ * Get the CCD motion threshold
115
+ *
116
+ * @param object - collision object
117
+ * @returns threshold in Defold units
118
+ */
119
+ function get_ccd_motion_threshold(object: Opaque<"btCollisionObject" | "btRigidBody">): number;
120
+ /**
121
+ * Get the CCD swept sphere radius
122
+ *
123
+ * @param object - collision object
124
+ * @returns radius in Defold units
125
+ */
126
+ function get_ccd_swept_sphere_radius(object: Opaque<"btCollisionObject" | "btRigidBody">): number;
127
+ /**
128
+ * Returns the raw unsigned 16-bit filter group that Defold assigned to the
129
+ * object's Bullet broadphase proxy. Use this value as `category_bits` in a
130
+ * `bullet3d.world` query filter. Bullet applies reciprocal filtering: the
131
+ * query's `mask_bits` must include this group, and the query's `category_bits`
132
+ * must be included in the object's filter mask.
133
+ *
134
+ * @param object - collision object in a Bullet world
135
+ * @returns raw unsigned 16-bit collision filter group
136
+ */
137
+ function get_collision_filter_group(object: Opaque<"btCollisionObject" | "btRigidBody">): number;
138
+ /**
139
+ * Returns the raw unsigned 16-bit filter mask that Defold assigned to the
140
+ * object's Bullet broadphase proxy. Use this value as `mask_bits` in a
141
+ * `bullet3d.world` query filter. Bullet applies reciprocal filtering: the
142
+ * query's `category_bits` must be included in this mask, and the query's
143
+ * `mask_bits` must include the object's filter group.
144
+ *
145
+ * @param object - collision object in a Bullet world
146
+ * @returns raw unsigned 16-bit collision filter mask
147
+ */
148
+ function get_collision_filter_mask(object: Opaque<"btCollisionObject" | "btRigidBody">): number;
149
+ /**
150
+ * Get collision flags
151
+ *
152
+ * @param object - collision object
153
+ * @returns bit field of `CF_*` constants
154
+ */
155
+ function get_collision_flags(object: Opaque<"btCollisionObject" | "btRigidBody">): number;
156
+ /**
157
+ * Get the contact processing threshold
158
+ *
159
+ * @param object - collision object
160
+ * @returns threshold in Defold units
161
+ */
162
+ function get_contact_processing_threshold(object: Opaque<"btCollisionObject" | "btRigidBody">): number;
163
+ /**
164
+ * Get deactivation time
165
+ *
166
+ * @param object - collision object
167
+ * @returns deactivation time
168
+ */
169
+ function get_deactivation_time(object: Opaque<"btCollisionObject" | "btRigidBody">): number;
170
+ /**
171
+ * Get friction
172
+ *
173
+ * @param object - collision object
174
+ * @returns friction coefficient
175
+ */
176
+ function get_friction(object: Opaque<"btCollisionObject" | "btRigidBody">): number;
177
+ /**
178
+ * Get the Bullet collision object type
179
+ *
180
+ * @param object - collision object
181
+ * @returns native collision object type
182
+ */
183
+ function get_internal_type(object: Opaque<"btCollisionObject" | "btRigidBody">): bullet3d.collision_object.INTERNAL_TYPE;
184
+ /**
185
+ * Get the world position
186
+ *
187
+ * @param object - collision object
188
+ * @returns world position in Defold units
189
+ */
190
+ function get_position(object: Opaque<"btCollisionObject" | "btRigidBody">): Vector3;
191
+ /**
192
+ * Get restitution
193
+ *
194
+ * @param object - collision object
195
+ * @returns restitution coefficient
196
+ */
197
+ function get_restitution(object: Opaque<"btCollisionObject" | "btRigidBody">): number;
198
+ /**
199
+ * Get the world rotation
200
+ *
201
+ * @param object - collision object
202
+ * @returns world rotation
203
+ */
204
+ function get_rotation(object: Opaque<"btCollisionObject" | "btRigidBody">): Quaternion;
205
+ /**
206
+ * Get one attached shape by one-based index.
207
+ *
208
+ * @param object - collision object
209
+ * @param shape_index - one-based shape index. **⚠️ 1-based; passed to Defold unchanged.**
210
+ * @returns borrowed logical shape handle
211
+ */
212
+ function get_shape(object: Opaque<"btCollisionObject" | "btRigidBody">, shape_index: number): bullet3d.shape.btCollisionShape;
213
+ /**
214
+ * Get the number of shapes attached to a collision object.
215
+ *
216
+ * @param object - collision object
217
+ * @returns shape count
218
+ */
219
+ function get_shape_count(object: Opaque<"btCollisionObject" | "btRigidBody">): number;
220
+ /**
221
+ * Get all attached shapes.
222
+ *
223
+ * @param object - collision object
224
+ * @returns array of borrowed shape handles
225
+ * @example
226
+ * ```ts
227
+ * // Enumerate the logical shapes attached to a collision object:
228
+ * export default defineScript({
229
+ * init() {
230
+ * const object = bullet3d.get_collision_object("#collisionobject");
231
+ * if (object === undefined) return;
232
+ * for (const shape of bullet3d.collision_object.get_shapes(object)) {
233
+ * const index = bullet3d.shape.get_index(shape);
234
+ * const data = bullet3d.shape.get_shape(shape);
235
+ * print("shape", index, "type", data.type);
236
+ * }
237
+ * },
238
+ * });
239
+ * ```
240
+ */
241
+ function get_shapes(object: Opaque<"btCollisionObject" | "btRigidBody">): bullet3d.shape.btCollisionShape[];
242
+ /**
243
+ * Get the world transform
244
+ *
245
+ * @param object - collision object
246
+ */
247
+ function get_world_transform(object: Opaque<"btCollisionObject" | "btRigidBody">): LuaMultiReturn<[Vector3, Quaternion]>;
248
+ /**
249
+ * Test a collision flag
250
+ *
251
+ * @param object - collision object
252
+ * @param flag - collision flag or mask
253
+ * @returns `true` when all requested flag bits are set
254
+ */
255
+ function has_collision_flag(object: Opaque<"btCollisionObject" | "btRigidBody">, flag: number): boolean;
256
+ /**
257
+ * Test whether the object responds to contacts
258
+ *
259
+ * @param object - collision object
260
+ * @returns contact response state
261
+ */
262
+ function has_contact_response(object: Opaque<"btCollisionObject" | "btRigidBody">): boolean;
263
+ /**
264
+ * This exposes Bullet's native `btCollisionObject::isActive` result. It is
265
+ * `false` for `ISLAND_SLEEPING` and `DISABLE_SIMULATION`, and `true` for the
266
+ * other activation states available to Defold collision objects. It is
267
+ * unrelated to whether the Defold component is enabled.
268
+ *
269
+ * @param object - collision object
270
+ * @returns active state
271
+ */
272
+ function is_active(object: Opaque<"btCollisionObject" | "btRigidBody">): boolean;
273
+ /**
274
+ * Box2D-style name for the same simulation state returned by
275
+ * bullet3d.collision_object.is_active.
276
+ *
277
+ * @param object - collision object
278
+ * @returns `false` when sleeping or simulation is disabled
279
+ */
280
+ function is_awake(object: Opaque<"btCollisionObject" | "btRigidBody">): boolean;
281
+ /**
282
+ * Test whether the object is a ghost trigger
283
+ *
284
+ * @param object - collision object
285
+ * @returns ghost object state
286
+ */
287
+ function is_ghost_object(object: Opaque<"btCollisionObject" | "btRigidBody">): boolean;
288
+ /**
289
+ * Test whether the object is kinematic
290
+ *
291
+ * @param object - collision object
292
+ * @returns kinematic state
293
+ */
294
+ function is_kinematic(object: Opaque<"btCollisionObject" | "btRigidBody">): boolean;
295
+ /**
296
+ * Test whether the object is a rigid body
297
+ *
298
+ * @param object - collision object
299
+ * @returns rigid body state
300
+ */
301
+ function is_rigid_body(object: Opaque<"btCollisionObject" | "btRigidBody">): boolean;
302
+ /**
303
+ * Test whether the object is static
304
+ *
305
+ * @param object - collision object
306
+ * @returns static state
307
+ */
308
+ function is_static(object: Opaque<"btCollisionObject" | "btRigidBody">): boolean;
309
+ /**
310
+ * Test whether the object is static or kinematic
311
+ *
312
+ * @param object - collision object
313
+ * @returns static or kinematic state
314
+ */
315
+ function is_static_or_kinematic(object: Opaque<"btCollisionObject" | "btRigidBody">): boolean;
316
+ /**
317
+ * Test whether a collision object handle is valid
318
+ *
319
+ * @param object - collision object
320
+ * @returns `true` if the native object still exists
321
+ */
322
+ function is_valid(object: Opaque<"btCollisionObject" | "btRigidBody">): boolean;
323
+ /**
324
+ * Set the activation state
325
+ *
326
+ * @param object - collision object
327
+ * @param state - activation state
328
+ */
329
+ function set_activation_state(object: Opaque<"btCollisionObject" | "btRigidBody">, state: bullet3d.collision_object.ACTIVATION_STATE): void;
330
+ /**
331
+ * Passing `true` calls Bullet's `activate()`. Passing `false` requests the
332
+ * native `ISLAND_SLEEPING` state. As in Bullet, static or kinematic objects are
333
+ * not activated without force, and protected `DISABLE_DEACTIVATION` or
334
+ * `DISABLE_SIMULATION` states are not replaced by a sleeping request.
335
+ *
336
+ * @param object - collision object
337
+ * @param awake - requested awake state
338
+ */
339
+ function set_awake(object: Opaque<"btCollisionObject" | "btRigidBody">, awake: boolean): void;
340
+ /**
341
+ * Set the CCD motion threshold
342
+ *
343
+ * @param object - collision object
344
+ * @param threshold - finite non-negative threshold in Defold units
345
+ * @example
346
+ * ```ts
347
+ * // Enable continuous collision detection for a small, fast-moving body:
348
+ * export default defineScript({
349
+ * init() {
350
+ * const body = bullet3d.get_rigid_body("#collisionobject");
351
+ * if (body === undefined) return;
352
+ * bullet3d.collision_object.set_ccd_swept_sphere_radius(body, 0.25);
353
+ * bullet3d.collision_object.set_ccd_motion_threshold(body, 0.5);
354
+ * },
355
+ * });
356
+ * ```
357
+ */
358
+ function set_ccd_motion_threshold(object: Opaque<"btCollisionObject" | "btRigidBody">, threshold: number): void;
359
+ /**
360
+ * Set the CCD swept sphere radius
361
+ *
362
+ * @param object - collision object
363
+ * @param radius - finite non-negative radius in Defold units
364
+ */
365
+ function set_ccd_swept_sphere_radius(object: Opaque<"btCollisionObject" | "btRigidBody">, radius: number): void;
366
+ /**
367
+ * Set the contact processing threshold
368
+ *
369
+ * @param object - collision object
370
+ * @param threshold - finite threshold in Defold units
371
+ */
372
+ function set_contact_processing_threshold(object: Opaque<"btCollisionObject" | "btRigidBody">, threshold: number): void;
373
+ /**
374
+ * Set deactivation time
375
+ *
376
+ * @param object - collision object
377
+ * @param seconds - finite deactivation time
378
+ */
379
+ function set_deactivation_time(object: Opaque<"btCollisionObject" | "btRigidBody">, seconds: number): void;
380
+ /**
381
+ * Set friction
382
+ *
383
+ * @param object - collision object
384
+ * @param friction - finite friction coefficient
385
+ */
386
+ function set_friction(object: Opaque<"btCollisionObject" | "btRigidBody">, friction: number): void;
387
+ /**
388
+ * The owning game object's position is updated as well.
389
+ *
390
+ * @param object - collision object
391
+ * @param position - finite world position in Defold units
392
+ */
393
+ function set_position(object: Opaque<"btCollisionObject" | "btRigidBody">, position: Vector3): void;
394
+ /**
395
+ * Set restitution
396
+ *
397
+ * @param object - collision object
398
+ * @param restitution - finite restitution coefficient
399
+ */
400
+ function set_restitution(object: Opaque<"btCollisionObject" | "btRigidBody">, restitution: number): void;
401
+ /**
402
+ * The owning game object's rotation is updated as well.
403
+ *
404
+ * @param object - collision object
405
+ * @param rotation - finite, non-zero world rotation; normalized by the binding
406
+ */
407
+ function set_rotation(object: Opaque<"btCollisionObject" | "btRigidBody">, rotation: Quaternion): void;
408
+ /**
409
+ * The owning game object's position and rotation are updated as well, so the
410
+ * transform persists when Defold synchronizes game objects into Bullet.
411
+ *
412
+ * @param object - collision object
413
+ * @param position - finite world position in Defold units
414
+ * @param rotation - finite, non-zero world rotation; normalized by the binding
415
+ * @example
416
+ * ```ts
417
+ * // Move a collision object while preserving its rotation:
418
+ * export default defineScript({
419
+ * init() {
420
+ * const object = bullet3d.get_collision_object("#collisionobject");
421
+ * if (object === undefined) return;
422
+ * const [position, rotation] = bullet3d.collision_object.get_world_transform(object);
423
+ * bullet3d.collision_object.set_world_transform(object, position.add(vmath.vector3(0, 5, 0)), rotation);
424
+ * bullet3d.collision_object.activate(object, true);
425
+ * },
426
+ * });
427
+ * ```
428
+ */
429
+ function set_world_transform(object: Opaque<"btCollisionObject" | "btRigidBody">, position: Vector3, rotation: Quaternion): void;
430
+ }
431
+ }
432
+
433
+ export {};