@defold-typescript/types 0.51.0 → 0.53.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 (228) hide show
  1. package/api-availability.json +4 -58
  2. package/api-signatures.json +2804 -3172
  3. package/api-targets.json +15 -5
  4. package/examples/translations.json +19 -71
  5. package/generated/b2d.d.ts +39 -39
  6. package/generated/b2d_body.d.ts +11 -11
  7. package/generated/b2d_chain.d.ts +3 -3
  8. package/generated/b2d_fixture.d.ts +5 -5
  9. package/generated/b2d_joint.d.ts +29 -29
  10. package/generated/b2d_shape.d.ts +13 -13
  11. package/generated/b2d_world.d.ts +15 -15
  12. package/generated/buffer.d.ts +10 -11
  13. package/generated/bullet3d.d.ts +6 -6
  14. package/generated/bullet3d_collision_object.d.ts +10 -10
  15. package/generated/bullet3d_constraint.d.ts +173 -71
  16. package/generated/bullet3d_rigid_body.d.ts +3 -3
  17. package/generated/bullet3d_shape.d.ts +11 -11
  18. package/generated/bullet3d_world.d.ts +20 -20
  19. package/generated/camera.d.ts +4 -4
  20. package/generated/collectionfactory.d.ts +2 -3
  21. package/generated/collectionproxy.d.ts +5 -5
  22. package/generated/compute.d.ts +5 -5
  23. package/generated/crash.d.ts +7 -7
  24. package/generated/editor-vm/http.d.ts +13 -13
  25. package/generated/editor-vm/image.d.ts +4 -4
  26. package/generated/editor-vm/json.d.ts +1 -1
  27. package/generated/editor-vm/tilemap_tiles.d.ts +9 -9
  28. package/generated/editor-vm/zip.d.ts +4 -4
  29. package/generated/editor.d.ts +183 -183
  30. package/generated/factory.d.ts +2 -3
  31. package/generated/font.d.ts +4 -4
  32. package/generated/go.d.ts +122 -230
  33. package/generated/graphics.d.ts +23 -25
  34. package/generated/gui.d.ts +186 -423
  35. package/generated/http.d.ts +3 -3
  36. package/generated/image.d.ts +63 -11
  37. package/generated/json.d.ts +4 -4
  38. package/generated/kinds/gui-script.d.ts +2 -0
  39. package/generated/kinds/render-script.d.ts +14 -15
  40. package/generated/label.d.ts +5 -5
  41. package/generated/liveupdate.d.ts +7 -3
  42. package/generated/material.d.ts +49 -49
  43. package/generated/model.d.ts +46 -14
  44. package/generated/particlefx.d.ts +24 -5
  45. package/generated/physics.d.ts +64 -20
  46. package/generated/profiler.d.ts +3 -5
  47. package/generated/render-script-modules/b2d.d.ts +711 -0
  48. package/generated/render-script-modules/bullet3d.d.ts +73 -0
  49. package/generated/render-script-modules/collectionfactory.d.ts +24 -0
  50. package/generated/render-script-modules/collectionproxy.d.ts +39 -0
  51. package/generated/render-script-modules/factory.d.ts +24 -0
  52. package/generated/render-script-modules/go.d.ts +434 -0
  53. package/generated/render-script-modules/label.d.ts +105 -0
  54. package/generated/render-script-modules/model.d.ts +121 -0
  55. package/generated/render-script-modules/particlefx.d.ts +59 -0
  56. package/generated/render-script-modules/physics.d.ts +333 -0
  57. package/generated/render-script-modules/resource.d.ts +1232 -0
  58. package/generated/render-script-modules/sound.d.ts +227 -0
  59. package/generated/render-script-modules/sprite.d.ts +68 -0
  60. package/generated/render-script-modules/tilemap.d.ts +43 -0
  61. package/generated/render.d.ts +172 -47
  62. package/generated/resource.d.ts +81 -61
  63. package/generated/socket.d.ts +18 -23
  64. package/generated/sound.d.ts +6 -6
  65. package/generated/sprite.d.ts +51 -3
  66. package/generated/sys.d.ts +87 -24
  67. package/generated/tilemap.d.ts +3 -3
  68. package/generated/timer.d.ts +3 -3
  69. package/generated/versions/defold-1.12.4/b2d.d.ts +2 -2
  70. package/generated/versions/defold-1.12.4/b2d_body.d.ts +2 -2
  71. package/generated/versions/defold-1.12.4/buffer.d.ts +8 -8
  72. package/generated/versions/defold-1.12.4/go.d.ts +117 -345
  73. package/generated/versions/defold-1.12.4/graphics.d.ts +2 -1
  74. package/generated/versions/defold-1.12.4/gui.d.ts +169 -532
  75. package/generated/versions/defold-1.12.4/http.d.ts +2 -2
  76. package/generated/versions/defold-1.12.4/image.d.ts +82 -2
  77. package/generated/versions/defold-1.12.4/index.d.ts +1 -0
  78. package/generated/versions/defold-1.12.4/label.d.ts +1 -1
  79. package/generated/versions/defold-1.12.4/liveupdate.d.ts +4 -0
  80. package/generated/versions/defold-1.12.4/model.d.ts +42 -10
  81. package/generated/versions/defold-1.12.4/particlefx.d.ts +23 -2
  82. package/generated/versions/defold-1.12.4/physics.d.ts +46 -2
  83. package/generated/versions/defold-1.12.4/render.d.ts +83 -7
  84. package/generated/versions/defold-1.12.4/resource.d.ts +50 -17
  85. package/generated/versions/defold-1.12.4/socket.d.ts +12 -12
  86. package/generated/versions/defold-1.12.4/sound.d.ts +1 -1
  87. package/generated/versions/defold-1.12.4/sprite.d.ts +59 -2
  88. package/generated/versions/defold-1.12.4/sys.d.ts +103 -8
  89. package/generated/versions/defold-1.12.4/tilemap.d.ts +1 -1
  90. package/generated/versions/defold-1.12.4/vmath.d.ts +0 -24
  91. package/generated/versions/defold-1.12.4/window.d.ts +3 -4
  92. package/generated/versions/defold-1.13.0/b2d.d.ts +2 -2
  93. package/generated/versions/defold-1.13.0/b2d_body.d.ts +2 -2
  94. package/generated/versions/defold-1.13.0/b2d_chain.d.ts +1 -1
  95. package/generated/versions/defold-1.13.0/b2d_joint.d.ts +1 -1
  96. package/generated/versions/defold-1.13.0/b2d_shape.d.ts +1 -1
  97. package/generated/versions/defold-1.13.0/buffer.d.ts +8 -8
  98. package/generated/versions/defold-1.13.0/camera.d.ts +1 -1
  99. package/generated/versions/defold-1.13.0/go.d.ts +117 -372
  100. package/generated/versions/defold-1.13.0/graphics.d.ts +2 -1
  101. package/generated/versions/defold-1.13.0/gui.d.ts +169 -532
  102. package/generated/versions/defold-1.13.0/http.d.ts +2 -2
  103. package/generated/versions/defold-1.13.0/image.d.ts +82 -2
  104. package/generated/versions/defold-1.13.0/index.d.ts +1 -0
  105. package/generated/versions/defold-1.13.0/label.d.ts +1 -1
  106. package/generated/versions/defold-1.13.0/liveupdate.d.ts +4 -0
  107. package/generated/versions/defold-1.13.0/material.d.ts +3 -1
  108. package/generated/versions/defold-1.13.0/model.d.ts +42 -10
  109. package/generated/versions/defold-1.13.0/particlefx.d.ts +23 -2
  110. package/generated/versions/defold-1.13.0/physics.d.ts +46 -2
  111. package/generated/versions/defold-1.13.0/render.d.ts +147 -9
  112. package/generated/versions/defold-1.13.0/resource.d.ts +50 -17
  113. package/generated/versions/defold-1.13.0/socket.d.ts +12 -12
  114. package/generated/versions/defold-1.13.0/sound.d.ts +1 -1
  115. package/generated/versions/defold-1.13.0/sprite.d.ts +59 -2
  116. package/generated/versions/defold-1.13.0/sys.d.ts +103 -8
  117. package/generated/versions/defold-1.13.0/tilemap.d.ts +1 -1
  118. package/generated/versions/defold-1.13.0/vmath.d.ts +0 -24
  119. package/generated/versions/defold-1.13.0/window.d.ts +3 -4
  120. package/generated/versions/defold-1.13.1/b2d.d.ts +2 -2
  121. package/generated/versions/defold-1.13.1/b2d_body.d.ts +2 -2
  122. package/generated/versions/defold-1.13.1/b2d_chain.d.ts +1 -1
  123. package/generated/versions/defold-1.13.1/b2d_joint.d.ts +1 -1
  124. package/generated/versions/defold-1.13.1/b2d_shape.d.ts +1 -1
  125. package/generated/versions/defold-1.13.1/buffer.d.ts +8 -8
  126. package/generated/versions/defold-1.13.1/camera.d.ts +1 -1
  127. package/generated/versions/defold-1.13.1/go.d.ts +117 -372
  128. package/generated/versions/defold-1.13.1/graphics.d.ts +2 -1
  129. package/generated/versions/defold-1.13.1/gui.d.ts +169 -548
  130. package/generated/versions/defold-1.13.1/http.d.ts +2 -2
  131. package/generated/versions/defold-1.13.1/image.d.ts +82 -2
  132. package/generated/versions/defold-1.13.1/index.d.ts +2 -0
  133. package/generated/versions/defold-1.13.1/label.d.ts +1 -1
  134. package/generated/versions/defold-1.13.1/liveupdate.d.ts +4 -0
  135. package/generated/versions/defold-1.13.1/material.d.ts +3 -1
  136. package/generated/versions/defold-1.13.1/model.d.ts +42 -10
  137. package/generated/versions/defold-1.13.1/particlefx.d.ts +23 -2
  138. package/generated/versions/defold-1.13.1/physics.d.ts +46 -2
  139. package/generated/versions/defold-1.13.1/render.d.ts +147 -9
  140. package/generated/versions/defold-1.13.1/resource.d.ts +50 -17
  141. package/generated/versions/defold-1.13.1/socket.d.ts +12 -12
  142. package/generated/versions/defold-1.13.1/sound.d.ts +1 -1
  143. package/generated/versions/defold-1.13.1/sprite.d.ts +59 -2
  144. package/generated/versions/defold-1.13.1/sys.d.ts +103 -8
  145. package/generated/versions/defold-1.13.1/tilemap.d.ts +1 -1
  146. package/generated/versions/defold-1.13.1/vmath.d.ts +0 -24
  147. package/generated/versions/defold-1.13.1/window.d.ts +3 -4
  148. package/generated/versions/defold-1.13.2/b2d.d.ts +39 -39
  149. package/generated/versions/defold-1.13.2/b2d_body.d.ts +11 -11
  150. package/generated/versions/defold-1.13.2/b2d_chain.d.ts +3 -3
  151. package/generated/versions/defold-1.13.2/b2d_fixture.d.ts +5 -5
  152. package/generated/versions/defold-1.13.2/b2d_joint.d.ts +29 -29
  153. package/generated/versions/defold-1.13.2/b2d_shape.d.ts +13 -13
  154. package/generated/versions/defold-1.13.2/b2d_world.d.ts +15 -15
  155. package/generated/versions/defold-1.13.2/buffer.d.ts +10 -11
  156. package/generated/versions/defold-1.13.2/bullet3d.d.ts +6 -6
  157. package/generated/versions/defold-1.13.2/bullet3d_collision_object.d.ts +10 -10
  158. package/generated/versions/defold-1.13.2/bullet3d_constraint.d.ts +173 -71
  159. package/generated/versions/defold-1.13.2/bullet3d_rigid_body.d.ts +3 -3
  160. package/generated/versions/defold-1.13.2/bullet3d_shape.d.ts +11 -11
  161. package/generated/versions/defold-1.13.2/bullet3d_world.d.ts +20 -20
  162. package/generated/versions/defold-1.13.2/camera.d.ts +4 -4
  163. package/generated/versions/defold-1.13.2/collectionfactory.d.ts +2 -3
  164. package/generated/versions/defold-1.13.2/collectionproxy.d.ts +5 -5
  165. package/generated/versions/defold-1.13.2/compute.d.ts +5 -5
  166. package/generated/versions/defold-1.13.2/crash.d.ts +7 -7
  167. package/generated/versions/defold-1.13.2/editor-vm/http.d.ts +13 -13
  168. package/generated/versions/defold-1.13.2/editor-vm/image.d.ts +4 -4
  169. package/generated/versions/defold-1.13.2/editor-vm/json.d.ts +1 -1
  170. package/generated/versions/defold-1.13.2/editor-vm/tilemap_tiles.d.ts +9 -9
  171. package/generated/versions/defold-1.13.2/editor-vm/zip.d.ts +4 -4
  172. package/generated/versions/defold-1.13.2/editor.d.ts +183 -183
  173. package/generated/versions/defold-1.13.2/factory.d.ts +2 -3
  174. package/generated/versions/defold-1.13.2/font.d.ts +4 -4
  175. package/generated/versions/defold-1.13.2/go.d.ts +122 -230
  176. package/generated/versions/defold-1.13.2/graphics.d.ts +22 -24
  177. package/generated/versions/defold-1.13.2/gui.d.ts +186 -423
  178. package/generated/versions/defold-1.13.2/http.d.ts +3 -3
  179. package/generated/versions/defold-1.13.2/image.d.ts +63 -11
  180. package/generated/versions/defold-1.13.2/index.d.ts +2 -0
  181. package/generated/versions/defold-1.13.2/json.d.ts +4 -4
  182. package/generated/versions/defold-1.13.2/label.d.ts +5 -5
  183. package/generated/versions/defold-1.13.2/liveupdate.d.ts +7 -3
  184. package/generated/versions/defold-1.13.2/material.d.ts +49 -49
  185. package/generated/versions/defold-1.13.2/model.d.ts +46 -14
  186. package/generated/versions/defold-1.13.2/particlefx.d.ts +24 -5
  187. package/generated/versions/defold-1.13.2/physics.d.ts +64 -20
  188. package/generated/versions/defold-1.13.2/profiler.d.ts +3 -5
  189. package/generated/versions/defold-1.13.2/render.d.ts +161 -46
  190. package/generated/versions/defold-1.13.2/resource.d.ts +81 -61
  191. package/generated/versions/defold-1.13.2/socket.d.ts +18 -23
  192. package/generated/versions/defold-1.13.2/sound.d.ts +6 -6
  193. package/generated/versions/defold-1.13.2/sprite.d.ts +51 -3
  194. package/generated/versions/defold-1.13.2/sys.d.ts +87 -24
  195. package/generated/versions/defold-1.13.2/tilemap.d.ts +3 -3
  196. package/generated/versions/defold-1.13.2/timer.d.ts +3 -3
  197. package/generated/versions/defold-1.13.2/vmath.d.ts +0 -25
  198. package/generated/versions/defold-1.13.2/window.d.ts +8 -10
  199. package/generated/vmath.d.ts +0 -25
  200. package/generated/window.d.ts +8 -10
  201. package/identity-vocabulary.json +86 -34
  202. package/index.d.ts +2 -0
  203. package/package.json +3 -1
  204. package/scripts/generate-api-availability.ts +10 -24
  205. package/scripts/generate-api-signatures.ts +75 -14
  206. package/scripts/materialize-version.ts +48 -7
  207. package/scripts/regen.ts +214 -19
  208. package/scripts/shared-handle-methods.ts +3 -2
  209. package/scripts/signature-store-fs.ts +1 -0
  210. package/scripts/target-version.ts +26 -0
  211. package/src/api-doc.ts +34 -0
  212. package/src/api-identity.ts +32 -1
  213. package/src/component-properties.d.ts +96 -7
  214. package/src/core-types.ts +71 -28
  215. package/src/doc-corrections.ts +62 -5
  216. package/src/emit-dts.ts +1423 -401
  217. package/src/engine-globals.d.ts +5 -1
  218. package/src/engine-type-name.ts +33 -0
  219. package/src/go-overloads.d.ts +74 -19
  220. package/src/gui-overloads.d.ts +489 -0
  221. package/src/gui-texture-removal.d.ts +41 -0
  222. package/src/index.ts +3 -0
  223. package/src/lifecycle.ts +32 -23
  224. package/src/msg-overloads.d.ts +25 -13
  225. package/src/signature-store.ts +50 -0
  226. package/src/socket-types.d.ts +3 -3
  227. package/src/timers.d.ts +2 -1
  228. package/src/vmath-overloads.d.ts +26 -0
@@ -27,7 +27,7 @@ declare global {
27
27
  /**
28
28
  * Universal and hinge2 constraint parameters
29
29
  */
30
- interface anchor_axes_params {
30
+ interface AnchorAxesParams {
31
31
  /**
32
32
  * world-space anchor
33
33
  */
@@ -45,11 +45,11 @@ declare global {
45
45
  */
46
46
  collide_connected?: boolean;
47
47
  }
48
- type btTypedConstraint = Opaque<"btTypedConstraint">;
48
+ type BtTypedConstraint = Opaque<"btTypedConstraint">;
49
49
  /**
50
50
  * The frame-B fields are required for a two-body constraint.
51
51
  */
52
- interface cone_twist_params {
52
+ interface ConeTwistParams {
53
53
  /**
54
54
  * local body-A frame position
55
55
  */
@@ -78,7 +78,7 @@ declare global {
78
78
  /**
79
79
  * The frame-B fields are required for a two-body constraint.
80
80
  */
81
- interface generic_6dof_params {
81
+ interface Generic6DofParams {
82
82
  /**
83
83
  * local body-A frame position
84
84
  */
@@ -103,7 +103,7 @@ declare global {
103
103
  /**
104
104
  * Generic spring 6-DOF constraint parameters
105
105
  */
106
- interface generic_6dof_spring_params {
106
+ interface Generic6DofSpringParams {
107
107
  /**
108
108
  * local body-A frame position
109
109
  */
@@ -128,7 +128,7 @@ declare global {
128
128
  /**
129
129
  * The frame-B fields are required for a two-body constraint.
130
130
  */
131
- interface hinge_params {
131
+ interface HingeParams {
132
132
  /**
133
133
  * local body-A frame position
134
134
  */
@@ -162,7 +162,7 @@ declare global {
162
162
  * `pivot_b` is required for a two-body constraint. For a one-body constraint,
163
163
  * it is an optional world-space anchor.
164
164
  */
165
- interface point_to_point_params {
165
+ interface PointToPointParams {
166
166
  /**
167
167
  * local body-A pivot
168
168
  */
@@ -179,7 +179,7 @@ declare global {
179
179
  /**
180
180
  * The frame-B fields are required for a two-body constraint.
181
181
  */
182
- interface slider_params {
182
+ interface SliderParams {
183
183
  /**
184
184
  * local body-A frame position
185
185
  */
@@ -205,7 +205,7 @@ declare global {
205
205
  */
206
206
  collide_connected?: boolean;
207
207
  }
208
- type CONSTRAINT_TYPE = typeof bullet3d.constraint.CONSTRAINT_TYPE_CONE_TWIST | typeof bullet3d.constraint.CONSTRAINT_TYPE_GENERIC_6DOF | typeof bullet3d.constraint.CONSTRAINT_TYPE_GENERIC_6DOF_SPRING | typeof bullet3d.constraint.CONSTRAINT_TYPE_HINGE | typeof bullet3d.constraint.CONSTRAINT_TYPE_HINGE2 | typeof bullet3d.constraint.CONSTRAINT_TYPE_POINT_TO_POINT | typeof bullet3d.constraint.CONSTRAINT_TYPE_SLIDER | typeof bullet3d.constraint.CONSTRAINT_TYPE_UNIVERSAL;
208
+ type ConstraintType = typeof bullet3d.constraint.CONSTRAINT_TYPE_CONE_TWIST | typeof bullet3d.constraint.CONSTRAINT_TYPE_GENERIC_6DOF | typeof bullet3d.constraint.CONSTRAINT_TYPE_GENERIC_6DOF_SPRING | typeof bullet3d.constraint.CONSTRAINT_TYPE_HINGE | typeof bullet3d.constraint.CONSTRAINT_TYPE_HINGE2 | typeof bullet3d.constraint.CONSTRAINT_TYPE_POINT_TO_POINT | typeof bullet3d.constraint.CONSTRAINT_TYPE_SLIDER | typeof bullet3d.constraint.CONSTRAINT_TYPE_UNIVERSAL;
209
209
  /**
210
210
  * Cone-twist constraint type
211
211
  */
@@ -246,7 +246,29 @@ declare global {
246
246
  * @param params - local frames and options
247
247
  * @returns cone-twist constraint
248
248
  */
249
- function create_cone_twist(body_a: Opaque<"btRigidBody">, body_b: Opaque<"btRigidBody"> | undefined, params: bullet3d.constraint.cone_twist_params): bullet3d.constraint.btTypedConstraint;
249
+ function create_cone_twist(body_a: Opaque<"btRigidBody">, body_b: Opaque<"btRigidBody"> | undefined, params: bullet3d.constraint.ConeTwistParams & Required<Pick<bullet3d.constraint.ConeTwistParams, "frame_b_position" | "frame_b_rotation">>): bullet3d.constraint.BtTypedConstraint;
250
+ /**
251
+ * The world is derived from `body_a`.
252
+ *
253
+ * @param body_a - first body
254
+ * @param body_b - second body or world
255
+ * @param params - local frames and options
256
+ * @returns cone-twist constraint
257
+ */
258
+ function create_cone_twist(body_a: Opaque<"btRigidBody">, body_b: undefined, params: bullet3d.constraint.ConeTwistParams): bullet3d.constraint.BtTypedConstraint;
259
+ /**
260
+ * The params table requires local frame A and, for a two-body constraint,
261
+ * local frame B. It optionally accepts `collide_connected`. The world is
262
+ * derived from `body_a`. The active 6-DOF solver ignores its legacy
263
+ * linear-reference-frame selector, so that field is rejected rather than
264
+ * silently accepted.
265
+ *
266
+ * @param body_a - first body
267
+ * @param body_b - second body or world
268
+ * @param params - local frames and options
269
+ * @returns generic 6-DOF constraint
270
+ */
271
+ function create_generic_6dof(body_a: Opaque<"btRigidBody">, body_b: Opaque<"btRigidBody"> | undefined, params: bullet3d.constraint.Generic6DofParams & Required<Pick<bullet3d.constraint.Generic6DofParams, "frame_b_position" | "frame_b_rotation">>): bullet3d.constraint.BtTypedConstraint;
250
272
  /**
251
273
  * The params table requires local frame A and, for a two-body constraint,
252
274
  * local frame B. It optionally accepts `collide_connected`. The world is
@@ -259,7 +281,7 @@ declare global {
259
281
  * @param params - local frames and options
260
282
  * @returns generic 6-DOF constraint
261
283
  */
262
- function create_generic_6dof(body_a: Opaque<"btRigidBody">, body_b: Opaque<"btRigidBody"> | undefined, params: bullet3d.constraint.generic_6dof_params): bullet3d.constraint.btTypedConstraint;
284
+ function create_generic_6dof(body_a: Opaque<"btRigidBody">, body_b: undefined, params: bullet3d.constraint.Generic6DofParams): bullet3d.constraint.BtTypedConstraint;
263
285
  /**
264
286
  * Both bodies and both local frames are required. The params table optionally
265
287
  * accepts `collide_connected`. The world is derived from `body_a`. The active
@@ -277,7 +299,7 @@ declare global {
277
299
  * init() {
278
300
  * const body_a = bullet3d.get_rigid_body("/body_a#collisionobject");
279
301
  * const body_b = bullet3d.get_rigid_body("/body_b#collisionobject");
280
- * let spring: bullet3d.constraint.btTypedConstraint | undefined;
302
+ * let spring: bullet3d.constraint.BtTypedConstraint | undefined;
281
303
  * if (body_a !== undefined && body_b !== undefined) {
282
304
  * spring = bullet3d.constraint.create_generic_6dof_spring(body_a, body_b, {
283
305
  * frame_a_position: vmath.vector3(),
@@ -302,7 +324,7 @@ declare global {
302
324
  * });
303
325
  * ```
304
326
  */
305
- function create_generic_6dof_spring(body_a: Opaque<"btRigidBody">, body_b: Opaque<"btRigidBody">, params: bullet3d.constraint.generic_6dof_spring_params): bullet3d.constraint.btTypedConstraint;
327
+ function create_generic_6dof_spring(body_a: Opaque<"btRigidBody">, body_b: Opaque<"btRigidBody">, params: bullet3d.constraint.Generic6DofSpringParams): bullet3d.constraint.BtTypedConstraint;
306
328
  /**
307
329
  * The world is derived from `body_a`.
308
330
  *
@@ -317,7 +339,7 @@ declare global {
317
339
  * init() {
318
340
  * const body_a = bullet3d.get_rigid_body("/door#collisionobject");
319
341
  * const body_b = bullet3d.get_rigid_body("/frame#collisionobject");
320
- * let hinge: bullet3d.constraint.btTypedConstraint | undefined;
342
+ * let hinge: bullet3d.constraint.BtTypedConstraint | undefined;
321
343
  * if (body_a !== undefined) {
322
344
  * hinge = bullet3d.constraint.create_hinge(body_a, body_b, {
323
345
  * frame_a_position: vmath.vector3(-0.5, 0, 0),
@@ -339,7 +361,44 @@ declare global {
339
361
  * });
340
362
  * ```
341
363
  */
342
- function create_hinge(body_a: Opaque<"btRigidBody">, body_b: Opaque<"btRigidBody"> | undefined, params: bullet3d.constraint.hinge_params): bullet3d.constraint.btTypedConstraint;
364
+ function create_hinge(body_a: Opaque<"btRigidBody">, body_b: Opaque<"btRigidBody"> | undefined, params: bullet3d.constraint.HingeParams & Required<Pick<bullet3d.constraint.HingeParams, "frame_b_position" | "frame_b_rotation">>): bullet3d.constraint.BtTypedConstraint;
365
+ /**
366
+ * The world is derived from `body_a`.
367
+ *
368
+ * @param body_a - first body
369
+ * @param body_b - second body or world
370
+ * @param params - local frames and options
371
+ * @returns hinge constraint
372
+ * @example
373
+ * ```ts
374
+ * // Create a motorized hinge with a 90-degree range:
375
+ * export default defineScript({
376
+ * init() {
377
+ * const body_a = bullet3d.get_rigid_body("/door#collisionobject");
378
+ * const body_b = bullet3d.get_rigid_body("/frame#collisionobject");
379
+ * let hinge: bullet3d.constraint.BtTypedConstraint | undefined;
380
+ * if (body_a !== undefined) {
381
+ * hinge = bullet3d.constraint.create_hinge(body_a, body_b, {
382
+ * frame_a_position: vmath.vector3(-0.5, 0, 0),
383
+ * frame_a_rotation: vmath.quat(),
384
+ * frame_b_position: vmath.vector3(0.5, 0, 0),
385
+ * frame_b_rotation: vmath.quat(),
386
+ * });
387
+ * bullet3d.constraint.set_hinge_limits(hinge, -math.pi / 4, math.pi / 4);
388
+ * bullet3d.constraint.set_hinge_motor(hinge, true, 1.5, 2.5);
389
+ * }
390
+ * return { hinge };
391
+ * },
392
+ *
393
+ * final(self) {
394
+ * if (self.hinge !== undefined && bullet3d.constraint.is_valid(self.hinge)) {
395
+ * bullet3d.constraint.destroy(self.hinge);
396
+ * }
397
+ * },
398
+ * });
399
+ * ```
400
+ */
401
+ function create_hinge(body_a: Opaque<"btRigidBody">, body_b: undefined, params: bullet3d.constraint.HingeParams): bullet3d.constraint.BtTypedConstraint;
343
402
  /**
344
403
  * Both bodies are required. Its initial linear suspension travel is one Defold
345
404
  * unit in either direction. The world is derived from `body_a`.
@@ -349,7 +408,7 @@ declare global {
349
408
  * @param params - anchor, axes, and options
350
409
  * @returns hinge2 constraint
351
410
  */
352
- function create_hinge2(body_a: Opaque<"btRigidBody">, body_b: Opaque<"btRigidBody">, params: bullet3d.constraint.anchor_axes_params): bullet3d.constraint.btTypedConstraint;
411
+ function create_hinge2(body_a: Opaque<"btRigidBody">, body_b: Opaque<"btRigidBody">, params: bullet3d.constraint.AnchorAxesParams): bullet3d.constraint.BtTypedConstraint;
353
412
  /**
354
413
  * The world is derived from `body_a`; both bodies must belong to that same world.
355
414
  *
@@ -365,7 +424,7 @@ declare global {
365
424
  * init() {
366
425
  * const body_a = bullet3d.get_rigid_body("/body_a#collisionobject");
367
426
  * const body_b = bullet3d.get_rigid_body("/body_b#collisionobject");
368
- * let constraint: bullet3d.constraint.btTypedConstraint | undefined;
427
+ * let constraint: bullet3d.constraint.BtTypedConstraint | undefined;
369
428
  * if (body_a !== undefined) {
370
429
  * constraint = bullet3d.constraint.create_point_to_point(body_a, body_b, {
371
430
  * pivot_a: vmath.vector3(0.5, 0, 0),
@@ -383,7 +442,50 @@ declare global {
383
442
  * });
384
443
  * ```
385
444
  */
386
- function create_point_to_point(body_a: Opaque<"btRigidBody">, body_b: Opaque<"btRigidBody"> | undefined, params: bullet3d.constraint.point_to_point_params): bullet3d.constraint.btTypedConstraint;
445
+ function create_point_to_point(body_a: Opaque<"btRigidBody">, body_b: Opaque<"btRigidBody"> | undefined, params: bullet3d.constraint.PointToPointParams & Required<Pick<bullet3d.constraint.PointToPointParams, "pivot_b">>): bullet3d.constraint.BtTypedConstraint;
446
+ /**
447
+ * The world is derived from `body_a`; both bodies must belong to that same world.
448
+ *
449
+ * @param body_a - first body
450
+ * @param body_b - second body or world
451
+ * @param params - pivots and options
452
+ * @returns point-to-point constraint
453
+ * @example
454
+ * ```ts
455
+ * // Join two bodies at matching local pivots and explicitly destroy the
456
+ * // constraint when the script is finalized:
457
+ * export default defineScript({
458
+ * init() {
459
+ * const body_a = bullet3d.get_rigid_body("/body_a#collisionobject");
460
+ * const body_b = bullet3d.get_rigid_body("/body_b#collisionobject");
461
+ * let constraint: bullet3d.constraint.BtTypedConstraint | undefined;
462
+ * if (body_a !== undefined) {
463
+ * constraint = bullet3d.constraint.create_point_to_point(body_a, body_b, {
464
+ * pivot_a: vmath.vector3(0.5, 0, 0),
465
+ * pivot_b: vmath.vector3(-0.5, 0, 0),
466
+ * });
467
+ * }
468
+ * return { constraint };
469
+ * },
470
+ *
471
+ * final(self) {
472
+ * if (self.constraint !== undefined && bullet3d.constraint.is_valid(self.constraint)) {
473
+ * bullet3d.constraint.destroy(self.constraint);
474
+ * }
475
+ * },
476
+ * });
477
+ * ```
478
+ */
479
+ function create_point_to_point(body_a: Opaque<"btRigidBody">, body_b: undefined, params: bullet3d.constraint.PointToPointParams): bullet3d.constraint.BtTypedConstraint;
480
+ /**
481
+ * The world is derived from `body_a`.
482
+ *
483
+ * @param body_a - first body
484
+ * @param body_b - second body or world
485
+ * @param params - local frames and options
486
+ * @returns slider constraint
487
+ */
488
+ function create_slider(body_a: Opaque<"btRigidBody">, body_b: Opaque<"btRigidBody"> | undefined, params: bullet3d.constraint.SliderParams & Required<Pick<bullet3d.constraint.SliderParams, "frame_b_position" | "frame_b_rotation">>): bullet3d.constraint.BtTypedConstraint;
387
489
  /**
388
490
  * The world is derived from `body_a`.
389
491
  *
@@ -392,7 +494,7 @@ declare global {
392
494
  * @param params - local frames and options
393
495
  * @returns slider constraint
394
496
  */
395
- function create_slider(body_a: Opaque<"btRigidBody">, body_b: Opaque<"btRigidBody"> | undefined, params: bullet3d.constraint.slider_params): bullet3d.constraint.btTypedConstraint;
497
+ function create_slider(body_a: Opaque<"btRigidBody">, body_b: undefined, params: bullet3d.constraint.SliderParams): bullet3d.constraint.BtTypedConstraint;
396
498
  /**
397
499
  * Both bodies are required. The world is derived from `body_a`.
398
500
  *
@@ -401,20 +503,20 @@ declare global {
401
503
  * @param params - anchor, axes, and options
402
504
  * @returns universal constraint
403
505
  */
404
- function create_universal(body_a: Opaque<"btRigidBody">, body_b: Opaque<"btRigidBody">, params: bullet3d.constraint.anchor_axes_params): bullet3d.constraint.btTypedConstraint;
506
+ function create_universal(body_a: Opaque<"btRigidBody">, body_b: Opaque<"btRigidBody">, params: bullet3d.constraint.AnchorAxesParams): bullet3d.constraint.BtTypedConstraint;
405
507
  /**
406
508
  * Destroy a constraint
407
509
  *
408
510
  * @param constraint - constraint
409
511
  */
410
- function destroy(constraint: bullet3d.constraint.btTypedConstraint): void;
512
+ function destroy(constraint: bullet3d.constraint.BtTypedConstraint): void;
411
513
  /**
412
514
  * Enable or disable the cone-twist motor
413
515
  *
414
516
  * @param constraint - cone-twist constraint
415
517
  * @param enabled - motor state
416
518
  */
417
- function enable_cone_twist_motor(constraint: bullet3d.constraint.btTypedConstraint, enabled: boolean): void;
519
+ function enable_cone_twist_motor(constraint: bullet3d.constraint.BtTypedConstraint, enabled: boolean): void;
418
520
  /**
419
521
  * Enable or disable a spring axis
420
522
  *
@@ -422,7 +524,7 @@ declare global {
422
524
  * @param axis - one-based axis from 1 to 6. **⚠️ 1-based; passed to Defold unchanged.**
423
525
  * @param enabled - spring state
424
526
  */
425
- function enable_spring(constraint: bullet3d.constraint.btTypedConstraint, axis: number, enabled: boolean): void;
527
+ function enable_spring(constraint: bullet3d.constraint.BtTypedConstraint, axis: number, enabled: boolean): void;
426
528
  /**
427
529
  * Get a current 6-DOF angle
428
530
  *
@@ -430,7 +532,7 @@ declare global {
430
532
  * @param axis - one-based angular-axis index from 1 to 3. **⚠️ 1-based; passed to Defold unchanged.**
431
533
  * @returns current angle in radians
432
534
  */
433
- function get_6dof_angle(constraint: bullet3d.constraint.btTypedConstraint, axis: number): number;
535
+ function get_6dof_angle(constraint: bullet3d.constraint.BtTypedConstraint, axis: number): number;
434
536
  /**
435
537
  * Get a current 6-DOF angular axis
436
538
  *
@@ -438,7 +540,7 @@ declare global {
438
540
  * @param axis - one-based angular-axis index from 1 to 3. **⚠️ 1-based; passed to Defold unchanged.**
439
541
  * @returns world-space unit axis
440
542
  */
441
- function get_6dof_axis(constraint: bullet3d.constraint.btTypedConstraint, axis: number): Vector3;
543
+ function get_6dof_axis(constraint: bullet3d.constraint.BtTypedConstraint, axis: number): Vector3;
442
544
  /**
443
545
  * Axes 1-3 are linear and axes 4-6 are angular. Generic 6-DOF, generic spring
444
546
  * 6-DOF, and universal constraints support bounce only on angular axes; hinge2
@@ -449,7 +551,7 @@ declare global {
449
551
  * @param constraint - 6-DOF-derived constraint
450
552
  * @param axis - one-based axis from 1 to 6. **⚠️ 1-based; passed to Defold unchanged.**
451
553
  */
452
- function get_6dof_motor(constraint: bullet3d.constraint.btTypedConstraint, axis: number): LuaMultiReturn<[boolean, number, number, number]>;
554
+ function get_6dof_motor(constraint: bullet3d.constraint.BtTypedConstraint, axis: number): LuaMultiReturn<[boolean, number, number, number]>;
453
555
  /**
454
556
  * Get a current 6-DOF linear position
455
557
  *
@@ -457,52 +559,52 @@ declare global {
457
559
  * @param axis - one-based linear-axis index from 1 to 3. **⚠️ 1-based; passed to Defold unchanged.**
458
560
  * @returns relative position in Defold units
459
561
  */
460
- function get_6dof_position(constraint: bullet3d.constraint.btTypedConstraint, axis: number): number;
562
+ function get_6dof_position(constraint: bullet3d.constraint.BtTypedConstraint, axis: number): number;
461
563
  /**
462
564
  * Get universal or hinge2 anchors
463
565
  *
464
566
  * @param constraint - universal or hinge2 constraint
465
567
  */
466
- function get_anchors(constraint: bullet3d.constraint.btTypedConstraint): LuaMultiReturn<[Vector3, Vector3]>;
568
+ function get_anchors(constraint: bullet3d.constraint.BtTypedConstraint): LuaMultiReturn<[Vector3, Vector3]>;
467
569
  /**
468
570
  * Get universal or hinge2 angles
469
571
  *
470
572
  * @param constraint - universal or hinge2 constraint
471
573
  */
472
- function get_angles(constraint: bullet3d.constraint.btTypedConstraint): LuaMultiReturn<[number, number]>;
574
+ function get_angles(constraint: bullet3d.constraint.BtTypedConstraint): LuaMultiReturn<[number, number]>;
473
575
  /**
474
576
  * Get universal or hinge2 axes
475
577
  *
476
578
  * @param constraint - universal or hinge2 constraint
477
579
  */
478
- function get_axes(constraint: bullet3d.constraint.btTypedConstraint): LuaMultiReturn<[Vector3, Vector3]>;
580
+ function get_axes(constraint: bullet3d.constraint.BtTypedConstraint): LuaMultiReturn<[Vector3, Vector3]>;
479
581
  /**
480
582
  * Get the first linked body
481
583
  *
482
584
  * @param constraint - constraint
483
585
  * @returns first body
484
586
  */
485
- function get_body_a(constraint: bullet3d.constraint.btTypedConstraint): Opaque<"btRigidBody">;
587
+ function get_body_a(constraint: bullet3d.constraint.BtTypedConstraint): Opaque<"btRigidBody">;
486
588
  /**
487
589
  * Get the second linked body
488
590
  *
489
591
  * @param constraint - constraint
490
592
  * @returns second body, or nil for a world constraint
491
593
  */
492
- function get_body_b(constraint: bullet3d.constraint.btTypedConstraint): Opaque<"btRigidBody"> | undefined;
594
+ function get_body_b(constraint: bullet3d.constraint.BtTypedConstraint): Opaque<"btRigidBody"> | undefined;
493
595
  /**
494
596
  * Get whether connected bodies can collide
495
597
  *
496
598
  * @param constraint - constraint
497
599
  * @returns whether connected bodies can collide
498
600
  */
499
- function get_collide_connected(constraint: bullet3d.constraint.btTypedConstraint): boolean;
601
+ function get_collide_connected(constraint: bullet3d.constraint.BtTypedConstraint): boolean;
500
602
  /**
501
603
  * Get cone-twist angular spans
502
604
  *
503
605
  * @param constraint - cone-twist constraint
504
606
  */
505
- function get_cone_twist_limits(constraint: bullet3d.constraint.btTypedConstraint): LuaMultiReturn<[number, number, number]>;
607
+ function get_cone_twist_limits(constraint: bullet3d.constraint.BtTypedConstraint): LuaMultiReturn<[number, number, number]>;
506
608
  /**
507
609
  * Supported constraint types are hinge, cone-twist, generic 6-DOF, generic
508
610
  * spring 6-DOF, slider, universal, and hinge2. Point-to-point constraints use
@@ -513,33 +615,33 @@ declare global {
513
615
  *
514
616
  * @param constraint - framed constraint
515
617
  */
516
- function get_frame_a(constraint: bullet3d.constraint.btTypedConstraint): LuaMultiReturn<[Vector3, Quaternion]>;
618
+ function get_frame_a(constraint: bullet3d.constraint.BtTypedConstraint): LuaMultiReturn<[Vector3, Quaternion]>;
517
619
  /**
518
620
  * Supports the same constraint types as `get_frame_a`. For a one-body
519
621
  * constraint, this is the frame attached to the fixed world body.
520
622
  *
521
623
  * @param constraint - framed constraint
522
624
  */
523
- function get_frame_b(constraint: bullet3d.constraint.btTypedConstraint): LuaMultiReturn<[Vector3, Quaternion]>;
625
+ function get_frame_b(constraint: bullet3d.constraint.BtTypedConstraint): LuaMultiReturn<[Vector3, Quaternion]>;
524
626
  /**
525
627
  * Get the current hinge angle
526
628
  *
527
629
  * @param constraint - hinge constraint
528
630
  * @returns angle in radians
529
631
  */
530
- function get_hinge_angle(constraint: bullet3d.constraint.btTypedConstraint): number;
632
+ function get_hinge_angle(constraint: bullet3d.constraint.BtTypedConstraint): number;
531
633
  /**
532
634
  * Get hinge angular limits
533
635
  *
534
636
  * @param constraint - hinge constraint
535
637
  */
536
- function get_hinge_limits(constraint: bullet3d.constraint.btTypedConstraint): LuaMultiReturn<[number, number]>;
638
+ function get_hinge_limits(constraint: bullet3d.constraint.BtTypedConstraint): LuaMultiReturn<[number, number]>;
537
639
  /**
538
640
  * Get hinge motor settings
539
641
  *
540
642
  * @param constraint - hinge constraint
541
643
  */
542
- function get_hinge_motor(constraint: bullet3d.constraint.btTypedConstraint): LuaMultiReturn<[boolean, number, number]>;
644
+ function get_hinge_motor(constraint: bullet3d.constraint.BtTypedConstraint): LuaMultiReturn<[boolean, number, number]>;
543
645
  /**
544
646
  * Axes 1-3 return linear limits in Defold units. Axes 4-6 return angular
545
647
  * limits in radians.
@@ -547,19 +649,19 @@ declare global {
547
649
  * @param constraint - 6-DOF-derived constraint
548
650
  * @param axis - one-based axis from 1 to 6. **⚠️ 1-based; passed to Defold unchanged.**
549
651
  */
550
- function get_limit(constraint: bullet3d.constraint.btTypedConstraint, axis: number): LuaMultiReturn<[number, number]>;
652
+ function get_limit(constraint: bullet3d.constraint.BtTypedConstraint, axis: number): LuaMultiReturn<[number, number]>;
551
653
  /**
552
654
  * Get point-to-point pivots
553
655
  *
554
656
  * @param constraint - point-to-point constraint
555
657
  */
556
- function get_pivots(constraint: bullet3d.constraint.btTypedConstraint): LuaMultiReturn<[Vector3, Vector3]>;
658
+ function get_pivots(constraint: bullet3d.constraint.BtTypedConstraint): LuaMultiReturn<[Vector3, Vector3]>;
557
659
  /**
558
660
  * Get slider limits
559
661
  *
560
662
  * @param constraint - slider constraint
561
663
  */
562
- function get_slider_limits(constraint: bullet3d.constraint.btTypedConstraint): LuaMultiReturn<[number, number, number, number]>;
664
+ function get_slider_limits(constraint: bullet3d.constraint.BtTypedConstraint): LuaMultiReturn<[number, number, number, number]>;
563
665
  /**
564
666
  * The linear motor uses Defold units per second and maximum force. The angular
565
667
  * motor uses radians per second and maximum torque in Defold squared units.
@@ -567,28 +669,28 @@ declare global {
567
669
  * @param constraint - slider constraint
568
670
  * @param motor - `linear` or `angular`
569
671
  */
570
- function get_slider_motor(constraint: bullet3d.constraint.btTypedConstraint, motor: string): LuaMultiReturn<[boolean, number, number]>;
672
+ function get_slider_motor(constraint: bullet3d.constraint.BtTypedConstraint, motor: "linear" | "angular"): LuaMultiReturn<[boolean, number, number]>;
571
673
  /**
572
674
  * Get the current slider position
573
675
  *
574
676
  * @param constraint - slider constraint
575
677
  * @returns current linear position in Defold units
576
678
  */
577
- function get_slider_position(constraint: bullet3d.constraint.btTypedConstraint): number;
679
+ function get_slider_position(constraint: bullet3d.constraint.BtTypedConstraint): number;
578
680
  /**
579
681
  * Get the current cone-twist twist angle
580
682
  *
581
683
  * @param constraint - cone-twist constraint
582
684
  * @returns twist angle in radians
583
685
  */
584
- function get_twist_angle(constraint: bullet3d.constraint.btTypedConstraint): number;
686
+ function get_twist_angle(constraint: bullet3d.constraint.BtTypedConstraint): number;
585
687
  /**
586
688
  * Get the constraint type
587
689
  *
588
690
  * @param constraint - constraint
589
691
  * @returns constraint type
590
692
  */
591
- function get_type(constraint: bullet3d.constraint.btTypedConstraint): bullet3d.constraint.CONSTRAINT_TYPE;
693
+ function get_type(constraint: bullet3d.constraint.BtTypedConstraint): bullet3d.constraint.ConstraintType;
592
694
  /**
593
695
  * Returns a stable lowercase diagnostic name such as `"hinge"` or
594
696
  * `"generic_6dof_spring"`.
@@ -596,35 +698,35 @@ declare global {
596
698
  * @param constraint - constraint
597
699
  * @returns constraint type name
598
700
  */
599
- function get_type_name(constraint: bullet3d.constraint.btTypedConstraint): string;
701
+ function get_type_name(constraint: bullet3d.constraint.BtTypedConstraint): string;
600
702
  /**
601
703
  * Get the slider linear reference-frame choice
602
704
  *
603
705
  * @param constraint - slider constraint
604
706
  * @returns true when linear calculations reference frame A
605
707
  */
606
- function get_use_linear_reference_frame_a(constraint: bullet3d.constraint.btTypedConstraint): boolean;
708
+ function get_use_linear_reference_frame_a(constraint: bullet3d.constraint.BtTypedConstraint): boolean;
607
709
  /**
608
710
  * Get the owning world
609
711
  *
610
712
  * @param constraint - constraint
611
713
  * @returns owning world
612
714
  */
613
- function get_world(constraint: bullet3d.constraint.btTypedConstraint): bullet3d.btDiscreteDynamicsWorld;
715
+ function get_world(constraint: bullet3d.constraint.BtTypedConstraint): bullet3d.BtDiscreteDynamicsWorld;
614
716
  /**
615
717
  * Test whether a constraint is active in its world
616
718
  *
617
719
  * @param constraint - constraint
618
720
  * @returns false while a linked body is disabled
619
721
  */
620
- function is_active(constraint: bullet3d.constraint.btTypedConstraint): boolean;
722
+ function is_active(constraint: bullet3d.constraint.BtTypedConstraint): boolean;
621
723
  /**
622
724
  * Test angular-only mode
623
725
  *
624
726
  * @param constraint - hinge or cone-twist constraint
625
727
  * @returns angular-only state
626
728
  */
627
- function is_angular_only(constraint: bullet3d.constraint.btTypedConstraint): boolean;
729
+ function is_angular_only(constraint: bullet3d.constraint.BtTypedConstraint): boolean;
628
730
  /**
629
731
  * Both a ranged and a locked axis are considered limited; a free axis is not.
630
732
  *
@@ -632,21 +734,21 @@ declare global {
632
734
  * @param axis - one-based axis from 1 to 6. **⚠️ 1-based; passed to Defold unchanged.**
633
735
  * @returns limit state
634
736
  */
635
- function is_limited(constraint: bullet3d.constraint.btTypedConstraint, axis: number): boolean;
737
+ function is_limited(constraint: bullet3d.constraint.BtTypedConstraint, axis: number): boolean;
636
738
  /**
637
739
  * Test whether a cone-twist is past its swing limit
638
740
  *
639
741
  * @param constraint - cone-twist constraint
640
742
  * @returns swing-limit state
641
743
  */
642
- function is_past_swing_limit(constraint: bullet3d.constraint.btTypedConstraint): boolean;
744
+ function is_past_swing_limit(constraint: bullet3d.constraint.BtTypedConstraint): boolean;
643
745
  /**
644
746
  * Test whether a constraint handle is valid
645
747
  *
646
748
  * @param constraint - constraint handle
647
749
  * @returns true while the native constraint exists
648
750
  */
649
- function is_valid(constraint: bullet3d.constraint.btTypedConstraint): boolean;
751
+ function is_valid(constraint: bullet3d.constraint.BtTypedConstraint): boolean;
650
752
  /**
651
753
  * Linear and angular values use the units described by `get_6dof_motor`.
652
754
  *
@@ -657,14 +759,14 @@ declare global {
657
759
  * @param max_force - non-negative maximum motor force for linear axes or torque for angular axes
658
760
  * @param bounce - optional bounce from 0 to 1; defaults to `0`
659
761
  */
660
- function set_6dof_motor(constraint: bullet3d.constraint.btTypedConstraint, axis: number, enabled: boolean, target_velocity: number, max_force: number, bounce?: number): void;
762
+ function set_6dof_motor(constraint: bullet3d.constraint.BtTypedConstraint, axis: number, enabled: boolean, target_velocity: number, max_force: number, bounce?: number): void;
661
763
  /**
662
764
  * Set angular-only mode
663
765
  *
664
766
  * @param constraint - hinge or cone-twist constraint
665
767
  * @param angular_only - angular-only state
666
768
  */
667
- function set_angular_only(constraint: bullet3d.constraint.btTypedConstraint, angular_only: boolean): void;
769
+ function set_angular_only(constraint: bullet3d.constraint.BtTypedConstraint, angular_only: boolean): void;
668
770
  /**
669
771
  * Set cone-twist angular spans
670
772
  *
@@ -676,7 +778,7 @@ declare global {
676
778
  * @param bias - optional bias from 0 to 1; defaults to `0.3`
677
779
  * @param relaxation - optional relaxation from 0 to 1; defaults to `1`
678
780
  */
679
- function set_cone_twist_limits(constraint: bullet3d.constraint.btTypedConstraint, swing_span_1: number, swing_span_2: number, twist_span: number, softness?: number, bias?: number, relaxation?: number): void;
781
+ function set_cone_twist_limits(constraint: bullet3d.constraint.BtTypedConstraint, swing_span_1: number, swing_span_2: number, twist_span: number, softness?: number, bias?: number, relaxation?: number): void;
680
782
  /**
681
783
  * By default, `target` is the desired rotation of body A relative to body B.
682
784
  * With `constraint_space` set, it is the desired rotation of frame A relative
@@ -686,7 +788,7 @@ declare global {
686
788
  * @param target - finite, non-zero target orientation; normalized by the binding
687
789
  * @param constraint_space - optional target-is-in-constraint-space flag; defaults to `false`
688
790
  */
689
- function set_cone_twist_motor_target(constraint: bullet3d.constraint.btTypedConstraint, target: Quaternion, constraint_space?: boolean): void;
791
+ function set_cone_twist_motor_target(constraint: bullet3d.constraint.BtTypedConstraint, target: Quaternion, constraint_space?: boolean): void;
690
792
  /**
691
793
  * Frame mutation is supported for hinge, generic 6-DOF, generic spring 6-DOF,
692
794
  * and slider constraints. Cone-twist, universal, and hinge2 frames are
@@ -696,7 +798,7 @@ declare global {
696
798
  * @param position - finite local position
697
799
  * @param rotation - finite, non-zero local rotation; normalized by the binding
698
800
  */
699
- function set_frame_a(constraint: bullet3d.constraint.btTypedConstraint, position: Vector3, rotation: Quaternion): void;
801
+ function set_frame_a(constraint: bullet3d.constraint.BtTypedConstraint, position: Vector3, rotation: Quaternion): void;
700
802
  /**
701
803
  * Supports the same constraint types as `set_frame_a`. For a one-body
702
804
  * constraint, this changes the frame attached to the fixed world body.
@@ -705,7 +807,7 @@ declare global {
705
807
  * @param position - finite local position or world frame position
706
808
  * @param rotation - finite, non-zero local or world frame rotation; normalized by the binding
707
809
  */
708
- function set_frame_b(constraint: bullet3d.constraint.btTypedConstraint, position: Vector3, rotation: Quaternion): void;
810
+ function set_frame_b(constraint: bullet3d.constraint.BtTypedConstraint, position: Vector3, rotation: Quaternion): void;
709
811
  /**
710
812
  * This function only supports hinges attached to the world. For a two-body
711
813
  * hinge, change both local frames with `set_frame_a` and `set_frame_b`.
@@ -713,7 +815,7 @@ declare global {
713
815
  * @param constraint - one-body hinge constraint
714
816
  * @param axis - non-zero axis in body-A space
715
817
  */
716
- function set_hinge_axis(constraint: bullet3d.constraint.btTypedConstraint, axis: Vector3): void;
818
+ function set_hinge_axis(constraint: bullet3d.constraint.BtTypedConstraint, axis: Vector3): void;
717
819
  /**
718
820
  * Set hinge angular limits
719
821
  *
@@ -723,7 +825,7 @@ declare global {
723
825
  * @param bias - optional limit bias from 0 to 1; defaults to `0.3`
724
826
  * @param relaxation - optional relaxation from 0 to 1; defaults to `1`
725
827
  */
726
- function set_hinge_limits(constraint: bullet3d.constraint.btTypedConstraint, lower: number, upper: number, bias?: number, relaxation?: number): void;
828
+ function set_hinge_limits(constraint: bullet3d.constraint.BtTypedConstraint, lower: number, upper: number, bias?: number, relaxation?: number): void;
727
829
  /**
728
830
  * Set hinge motor settings
729
831
  *
@@ -732,7 +834,7 @@ declare global {
732
834
  * @param target_velocity - angular target velocity in radians per second
733
835
  * @param max_impulse - non-negative maximum angular motor impulse in Defold squared units
734
836
  */
735
- function set_hinge_motor(constraint: bullet3d.constraint.btTypedConstraint, enabled: boolean, target_velocity: number, max_impulse: number): void;
837
+ function set_hinge_motor(constraint: bullet3d.constraint.BtTypedConstraint, enabled: boolean, target_velocity: number, max_impulse: number): void;
736
838
  /**
737
839
  * Set a hinge motor angle target
738
840
  *
@@ -740,7 +842,7 @@ declare global {
740
842
  * @param target_angle - target angle in radians
741
843
  * @param time_step - positive step duration in seconds
742
844
  */
743
- function set_hinge_motor_target(constraint: bullet3d.constraint.btTypedConstraint, target_angle: number, time_step: number): void;
845
+ function set_hinge_motor_target(constraint: bullet3d.constraint.BtTypedConstraint, target_angle: number, time_step: number): void;
744
846
  /**
745
847
  * Axes 1-3 use Defold units and axes 4-6 use radians. A lower value less than
746
848
  * the upper value creates a limited range, equal values lock the axis, and a
@@ -751,7 +853,7 @@ declare global {
751
853
  * @param lower - lower limit
752
854
  * @param upper - upper limit
753
855
  */
754
- function set_limit(constraint: bullet3d.constraint.btTypedConstraint, axis: number, lower: number, upper: number): void;
856
+ function set_limit(constraint: bullet3d.constraint.BtTypedConstraint, axis: number, lower: number, upper: number): void;
755
857
  /**
756
858
  * Set point-to-point pivots
757
859
  *
@@ -759,7 +861,7 @@ declare global {
759
861
  * @param pivot_a - local body-A pivot
760
862
  * @param pivot_b - local body-B pivot or world anchor
761
863
  */
762
- function set_pivots(constraint: bullet3d.constraint.btTypedConstraint, pivot_a: Vector3, pivot_b: Vector3): void;
864
+ function set_pivots(constraint: bullet3d.constraint.BtTypedConstraint, pivot_a: Vector3, pivot_b: Vector3): void;
763
865
  /**
764
866
  * Each lower/upper pair follows Bullet's limit convention: lower less than
765
867
  * upper creates a limited range, equal values lock that axis, and lower greater
@@ -771,7 +873,7 @@ declare global {
771
873
  * @param lower_angular - lower angular limit in radians
772
874
  * @param upper_angular - upper angular limit in radians
773
875
  */
774
- function set_slider_limits(constraint: bullet3d.constraint.btTypedConstraint, lower_linear: number, upper_linear: number, lower_angular: number, upper_angular: number): void;
876
+ function set_slider_limits(constraint: bullet3d.constraint.BtTypedConstraint, lower_linear: number, upper_linear: number, lower_angular: number, upper_angular: number): void;
775
877
  /**
776
878
  * Linear and angular values use the units described by `get_slider_motor`.
777
879
  *
@@ -781,7 +883,7 @@ declare global {
781
883
  * @param target_velocity - linear or angular target velocity
782
884
  * @param max_force - non-negative maximum linear force or angular torque
783
885
  */
784
- function set_slider_motor(constraint: bullet3d.constraint.btTypedConstraint, motor: string, enabled: boolean, target_velocity: number, max_force: number): void;
886
+ function set_slider_motor(constraint: bullet3d.constraint.BtTypedConstraint, motor: "linear" | "angular", enabled: boolean, target_velocity: number, max_force: number): void;
785
887
  /**
786
888
  * Generic spring 6-DOF constraints use a scale-independent damping factor from
787
889
  * 0 to 1, where 1 means no damping. Hinge2 constraints use a damping coefficient
@@ -792,7 +894,7 @@ declare global {
792
894
  * @param axis - one-based axis from 1 to 6. **⚠️ 1-based; passed to Defold unchanged.**
793
895
  * @param damping - damping value in the range required by the constraint type
794
896
  */
795
- function set_spring_damping(constraint: bullet3d.constraint.btTypedConstraint, axis: number, damping: number): void;
897
+ function set_spring_damping(constraint: bullet3d.constraint.BtTypedConstraint, axis: number, damping: number): void;
796
898
  /**
797
899
  * With no axis, captures all current transforms. With an axis and no value,
798
900
  * captures that axis. Linear values use Defold units and angular values use
@@ -802,7 +904,7 @@ declare global {
802
904
  * @param axis - optional one-based axis from 1 to 6. **⚠️ 1-based; passed to Defold unchanged.**
803
905
  * @param value - optional explicit equilibrium value
804
906
  */
805
- function set_spring_equilibrium_point(constraint: bullet3d.constraint.btTypedConstraint, axis?: number, value?: number): void;
907
+ function set_spring_equilibrium_point(constraint: bullet3d.constraint.BtTypedConstraint, axis?: number, value?: number): void;
806
908
  /**
807
909
  * Linear stiffness values are independent of `physics.scale`. Angular
808
910
  * stiffness values are automatically converted using `physics.scale` squared.
@@ -811,7 +913,7 @@ declare global {
811
913
  * @param axis - one-based axis from 1 to 6. **⚠️ 1-based; passed to Defold unchanged.**
812
914
  * @param stiffness - non-negative stiffness
813
915
  */
814
- function set_spring_stiffness(constraint: bullet3d.constraint.btTypedConstraint, axis: number, stiffness: number): void;
916
+ function set_spring_stiffness(constraint: bullet3d.constraint.BtTypedConstraint, axis: number, stiffness: number): void;
815
917
  }
816
918
  }
817
919