@defold-typescript/types 0.52.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.
- package/api-signatures.json +2074 -1964
- package/examples/translations.json +15 -15
- package/generated/b2d.d.ts +39 -39
- package/generated/b2d_body.d.ts +11 -11
- package/generated/b2d_chain.d.ts +3 -3
- package/generated/b2d_fixture.d.ts +5 -5
- package/generated/b2d_joint.d.ts +29 -29
- package/generated/b2d_shape.d.ts +13 -13
- package/generated/b2d_world.d.ts +15 -15
- package/generated/buffer.d.ts +5 -6
- package/generated/bullet3d.d.ts +6 -6
- package/generated/bullet3d_collision_object.d.ts +9 -9
- package/generated/bullet3d_constraint.d.ts +78 -78
- package/generated/bullet3d_rigid_body.d.ts +3 -3
- package/generated/bullet3d_shape.d.ts +11 -11
- package/generated/bullet3d_world.d.ts +20 -20
- package/generated/camera.d.ts +4 -4
- package/generated/collectionfactory.d.ts +2 -3
- package/generated/collectionproxy.d.ts +5 -5
- package/generated/compute.d.ts +5 -5
- package/generated/crash.d.ts +7 -7
- package/generated/editor-vm/http.d.ts +13 -13
- package/generated/editor-vm/image.d.ts +4 -4
- package/generated/editor-vm/json.d.ts +1 -1
- package/generated/editor-vm/tilemap_tiles.d.ts +9 -9
- package/generated/editor-vm/zip.d.ts +4 -4
- package/generated/editor.d.ts +183 -183
- package/generated/factory.d.ts +2 -3
- package/generated/font.d.ts +4 -4
- package/generated/go.d.ts +10 -12
- package/generated/graphics.d.ts +23 -26
- package/generated/gui.d.ts +44 -58
- package/generated/http.d.ts +2 -2
- package/generated/image.d.ts +12 -12
- package/generated/json.d.ts +4 -4
- package/generated/label.d.ts +5 -5
- package/generated/liveupdate.d.ts +3 -3
- package/generated/material.d.ts +48 -48
- package/generated/model.d.ts +46 -14
- package/generated/particlefx.d.ts +5 -5
- package/generated/physics.d.ts +19 -19
- package/generated/profiler.d.ts +3 -5
- package/generated/render-script-modules/b2d.d.ts +39 -39
- package/generated/render-script-modules/bullet3d.d.ts +5 -5
- package/generated/render-script-modules/collectionfactory.d.ts +1 -2
- package/generated/render-script-modules/collectionproxy.d.ts +3 -3
- package/generated/render-script-modules/factory.d.ts +1 -2
- package/generated/render-script-modules/go.d.ts +8 -10
- package/generated/render-script-modules/label.d.ts +2 -2
- package/generated/render-script-modules/model.d.ts +43 -11
- package/generated/render-script-modules/particlefx.d.ts +3 -3
- package/generated/render-script-modules/physics.d.ts +12 -12
- package/generated/render-script-modules/resource.d.ts +52 -53
- package/generated/render-script-modules/sound.d.ts +4 -4
- package/generated/render-script-modules/sprite.d.ts +2 -2
- package/generated/render-script-modules/tilemap.d.ts +2 -2
- package/generated/render.d.ts +44 -45
- package/generated/resource.d.ts +58 -59
- package/generated/socket.d.ts +18 -23
- package/generated/sound.d.ts +6 -6
- package/generated/sprite.d.ts +3 -3
- package/generated/sys.d.ts +20 -21
- package/generated/tilemap.d.ts +3 -3
- package/generated/timer.d.ts +3 -3
- package/generated/versions/defold-1.12.4/b2d.d.ts +2 -2
- package/generated/versions/defold-1.12.4/b2d_body.d.ts +2 -2
- package/generated/versions/defold-1.12.4/go.d.ts +2 -2
- package/generated/versions/defold-1.12.4/graphics.d.ts +1 -1
- package/generated/versions/defold-1.12.4/gui.d.ts +18 -19
- package/generated/versions/defold-1.12.4/label.d.ts +1 -1
- package/generated/versions/defold-1.12.4/model.d.ts +42 -10
- package/generated/versions/defold-1.12.4/particlefx.d.ts +1 -1
- package/generated/versions/defold-1.12.4/physics.d.ts +1 -1
- package/generated/versions/defold-1.12.4/render.d.ts +5 -5
- package/generated/versions/defold-1.12.4/resource.d.ts +8 -8
- package/generated/versions/defold-1.12.4/socket.d.ts +12 -12
- package/generated/versions/defold-1.12.4/sound.d.ts +1 -1
- package/generated/versions/defold-1.12.4/sprite.d.ts +1 -1
- package/generated/versions/defold-1.12.4/sys.d.ts +2 -2
- package/generated/versions/defold-1.12.4/tilemap.d.ts +1 -1
- package/generated/versions/defold-1.12.4/window.d.ts +3 -4
- package/generated/versions/defold-1.13.0/b2d.d.ts +2 -2
- package/generated/versions/defold-1.13.0/b2d_body.d.ts +2 -2
- package/generated/versions/defold-1.13.0/b2d_chain.d.ts +1 -1
- package/generated/versions/defold-1.13.0/b2d_joint.d.ts +1 -1
- package/generated/versions/defold-1.13.0/b2d_shape.d.ts +1 -1
- package/generated/versions/defold-1.13.0/camera.d.ts +1 -1
- package/generated/versions/defold-1.13.0/go.d.ts +2 -2
- package/generated/versions/defold-1.13.0/graphics.d.ts +1 -1
- package/generated/versions/defold-1.13.0/gui.d.ts +18 -19
- package/generated/versions/defold-1.13.0/label.d.ts +1 -1
- package/generated/versions/defold-1.13.0/model.d.ts +42 -10
- package/generated/versions/defold-1.13.0/particlefx.d.ts +1 -1
- package/generated/versions/defold-1.13.0/physics.d.ts +1 -1
- package/generated/versions/defold-1.13.0/render.d.ts +5 -5
- package/generated/versions/defold-1.13.0/resource.d.ts +8 -8
- package/generated/versions/defold-1.13.0/socket.d.ts +12 -12
- package/generated/versions/defold-1.13.0/sound.d.ts +1 -1
- package/generated/versions/defold-1.13.0/sprite.d.ts +1 -1
- package/generated/versions/defold-1.13.0/sys.d.ts +2 -2
- package/generated/versions/defold-1.13.0/tilemap.d.ts +1 -1
- package/generated/versions/defold-1.13.0/window.d.ts +3 -4
- package/generated/versions/defold-1.13.1/b2d.d.ts +2 -2
- package/generated/versions/defold-1.13.1/b2d_body.d.ts +2 -2
- package/generated/versions/defold-1.13.1/b2d_chain.d.ts +1 -1
- package/generated/versions/defold-1.13.1/b2d_joint.d.ts +1 -1
- package/generated/versions/defold-1.13.1/b2d_shape.d.ts +1 -1
- package/generated/versions/defold-1.13.1/camera.d.ts +1 -1
- package/generated/versions/defold-1.13.1/go.d.ts +2 -2
- package/generated/versions/defold-1.13.1/graphics.d.ts +1 -1
- package/generated/versions/defold-1.13.1/gui.d.ts +18 -19
- package/generated/versions/defold-1.13.1/label.d.ts +1 -1
- package/generated/versions/defold-1.13.1/model.d.ts +42 -10
- package/generated/versions/defold-1.13.1/particlefx.d.ts +1 -1
- package/generated/versions/defold-1.13.1/physics.d.ts +1 -1
- package/generated/versions/defold-1.13.1/render.d.ts +5 -5
- package/generated/versions/defold-1.13.1/resource.d.ts +8 -8
- package/generated/versions/defold-1.13.1/socket.d.ts +12 -12
- package/generated/versions/defold-1.13.1/sound.d.ts +1 -1
- package/generated/versions/defold-1.13.1/sprite.d.ts +1 -1
- package/generated/versions/defold-1.13.1/sys.d.ts +2 -2
- package/generated/versions/defold-1.13.1/tilemap.d.ts +1 -1
- package/generated/versions/defold-1.13.1/window.d.ts +3 -4
- package/generated/versions/defold-1.13.2/b2d.d.ts +39 -39
- package/generated/versions/defold-1.13.2/b2d_body.d.ts +11 -11
- package/generated/versions/defold-1.13.2/b2d_chain.d.ts +3 -3
- package/generated/versions/defold-1.13.2/b2d_fixture.d.ts +5 -5
- package/generated/versions/defold-1.13.2/b2d_joint.d.ts +29 -29
- package/generated/versions/defold-1.13.2/b2d_shape.d.ts +13 -13
- package/generated/versions/defold-1.13.2/b2d_world.d.ts +15 -15
- package/generated/versions/defold-1.13.2/buffer.d.ts +5 -6
- package/generated/versions/defold-1.13.2/bullet3d.d.ts +6 -6
- package/generated/versions/defold-1.13.2/bullet3d_collision_object.d.ts +9 -9
- package/generated/versions/defold-1.13.2/bullet3d_constraint.d.ts +78 -78
- package/generated/versions/defold-1.13.2/bullet3d_rigid_body.d.ts +3 -3
- package/generated/versions/defold-1.13.2/bullet3d_shape.d.ts +11 -11
- package/generated/versions/defold-1.13.2/bullet3d_world.d.ts +20 -20
- package/generated/versions/defold-1.13.2/camera.d.ts +4 -4
- package/generated/versions/defold-1.13.2/collectionfactory.d.ts +2 -3
- package/generated/versions/defold-1.13.2/collectionproxy.d.ts +5 -5
- package/generated/versions/defold-1.13.2/compute.d.ts +5 -5
- package/generated/versions/defold-1.13.2/crash.d.ts +7 -7
- package/generated/versions/defold-1.13.2/editor-vm/http.d.ts +13 -13
- package/generated/versions/defold-1.13.2/editor-vm/image.d.ts +4 -4
- package/generated/versions/defold-1.13.2/editor-vm/json.d.ts +1 -1
- package/generated/versions/defold-1.13.2/editor-vm/tilemap_tiles.d.ts +9 -9
- package/generated/versions/defold-1.13.2/editor-vm/zip.d.ts +4 -4
- package/generated/versions/defold-1.13.2/editor.d.ts +183 -183
- package/generated/versions/defold-1.13.2/factory.d.ts +2 -3
- package/generated/versions/defold-1.13.2/font.d.ts +4 -4
- package/generated/versions/defold-1.13.2/go.d.ts +10 -12
- package/generated/versions/defold-1.13.2/graphics.d.ts +22 -25
- package/generated/versions/defold-1.13.2/gui.d.ts +44 -58
- package/generated/versions/defold-1.13.2/http.d.ts +2 -2
- package/generated/versions/defold-1.13.2/image.d.ts +12 -12
- package/generated/versions/defold-1.13.2/json.d.ts +4 -4
- package/generated/versions/defold-1.13.2/label.d.ts +5 -5
- package/generated/versions/defold-1.13.2/liveupdate.d.ts +3 -3
- package/generated/versions/defold-1.13.2/material.d.ts +48 -48
- package/generated/versions/defold-1.13.2/model.d.ts +46 -14
- package/generated/versions/defold-1.13.2/particlefx.d.ts +5 -5
- package/generated/versions/defold-1.13.2/physics.d.ts +19 -19
- package/generated/versions/defold-1.13.2/profiler.d.ts +3 -5
- package/generated/versions/defold-1.13.2/render.d.ts +43 -44
- package/generated/versions/defold-1.13.2/resource.d.ts +58 -59
- package/generated/versions/defold-1.13.2/socket.d.ts +18 -23
- package/generated/versions/defold-1.13.2/sound.d.ts +6 -6
- package/generated/versions/defold-1.13.2/sprite.d.ts +3 -3
- package/generated/versions/defold-1.13.2/sys.d.ts +20 -21
- package/generated/versions/defold-1.13.2/tilemap.d.ts +3 -3
- package/generated/versions/defold-1.13.2/timer.d.ts +3 -3
- package/generated/versions/defold-1.13.2/vmath.d.ts +0 -1
- package/generated/versions/defold-1.13.2/window.d.ts +8 -10
- package/generated/vmath.d.ts +0 -1
- package/generated/window.d.ts +8 -10
- package/identity-vocabulary.json +41 -34
- package/package.json +2 -1
- package/scripts/generate-api-availability.ts +9 -3
- package/scripts/shared-handle-methods.ts +3 -2
- package/src/api-doc.ts +8 -0
- package/src/api-identity.ts +32 -1
- package/src/component-properties.d.ts +8 -8
- package/src/core-types.ts +29 -13
- package/src/doc-corrections.ts +9 -0
- package/src/emit-dts.ts +664 -202
- package/src/engine-type-name.ts +33 -0
- package/src/go-overloads.d.ts +10 -10
- package/src/gui-overloads.d.ts +11 -11
- package/src/index.ts +1 -0
- package/src/lifecycle.ts +2 -2
- package/src/socket-types.d.ts +3 -3
|
@@ -27,7 +27,7 @@ declare global {
|
|
|
27
27
|
/**
|
|
28
28
|
* Universal and hinge2 constraint parameters
|
|
29
29
|
*/
|
|
30
|
-
interface
|
|
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
|
|
48
|
+
type BtTypedConstraint = Opaque<"btTypedConstraint">;
|
|
49
49
|
/**
|
|
50
50
|
* The frame-B fields are required for a two-body constraint.
|
|
51
51
|
*/
|
|
52
|
-
interface
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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,7 @@ 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.
|
|
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
250
|
/**
|
|
251
251
|
* The world is derived from `body_a`.
|
|
252
252
|
*
|
|
@@ -255,7 +255,7 @@ declare global {
|
|
|
255
255
|
* @param params - local frames and options
|
|
256
256
|
* @returns cone-twist constraint
|
|
257
257
|
*/
|
|
258
|
-
function create_cone_twist(body_a: Opaque<"btRigidBody">, body_b: undefined, params: bullet3d.constraint.
|
|
258
|
+
function create_cone_twist(body_a: Opaque<"btRigidBody">, body_b: undefined, params: bullet3d.constraint.ConeTwistParams): bullet3d.constraint.BtTypedConstraint;
|
|
259
259
|
/**
|
|
260
260
|
* The params table requires local frame A and, for a two-body constraint,
|
|
261
261
|
* local frame B. It optionally accepts `collide_connected`. The world is
|
|
@@ -268,7 +268,7 @@ declare global {
|
|
|
268
268
|
* @param params - local frames and options
|
|
269
269
|
* @returns generic 6-DOF constraint
|
|
270
270
|
*/
|
|
271
|
-
function create_generic_6dof(body_a: Opaque<"btRigidBody">, body_b: Opaque<"btRigidBody"> | undefined, params: bullet3d.constraint.
|
|
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;
|
|
272
272
|
/**
|
|
273
273
|
* The params table requires local frame A and, for a two-body constraint,
|
|
274
274
|
* local frame B. It optionally accepts `collide_connected`. The world is
|
|
@@ -281,7 +281,7 @@ declare global {
|
|
|
281
281
|
* @param params - local frames and options
|
|
282
282
|
* @returns generic 6-DOF constraint
|
|
283
283
|
*/
|
|
284
|
-
function create_generic_6dof(body_a: Opaque<"btRigidBody">, body_b: undefined, params: bullet3d.constraint.
|
|
284
|
+
function create_generic_6dof(body_a: Opaque<"btRigidBody">, body_b: undefined, params: bullet3d.constraint.Generic6DofParams): bullet3d.constraint.BtTypedConstraint;
|
|
285
285
|
/**
|
|
286
286
|
* Both bodies and both local frames are required. The params table optionally
|
|
287
287
|
* accepts `collide_connected`. The world is derived from `body_a`. The active
|
|
@@ -299,7 +299,7 @@ declare global {
|
|
|
299
299
|
* init() {
|
|
300
300
|
* const body_a = bullet3d.get_rigid_body("/body_a#collisionobject");
|
|
301
301
|
* const body_b = bullet3d.get_rigid_body("/body_b#collisionobject");
|
|
302
|
-
* let spring: bullet3d.constraint.
|
|
302
|
+
* let spring: bullet3d.constraint.BtTypedConstraint | undefined;
|
|
303
303
|
* if (body_a !== undefined && body_b !== undefined) {
|
|
304
304
|
* spring = bullet3d.constraint.create_generic_6dof_spring(body_a, body_b, {
|
|
305
305
|
* frame_a_position: vmath.vector3(),
|
|
@@ -324,7 +324,7 @@ declare global {
|
|
|
324
324
|
* });
|
|
325
325
|
* ```
|
|
326
326
|
*/
|
|
327
|
-
function create_generic_6dof_spring(body_a: Opaque<"btRigidBody">, body_b: Opaque<"btRigidBody">, params: bullet3d.constraint.
|
|
327
|
+
function create_generic_6dof_spring(body_a: Opaque<"btRigidBody">, body_b: Opaque<"btRigidBody">, params: bullet3d.constraint.Generic6DofSpringParams): bullet3d.constraint.BtTypedConstraint;
|
|
328
328
|
/**
|
|
329
329
|
* The world is derived from `body_a`.
|
|
330
330
|
*
|
|
@@ -339,7 +339,7 @@ declare global {
|
|
|
339
339
|
* init() {
|
|
340
340
|
* const body_a = bullet3d.get_rigid_body("/door#collisionobject");
|
|
341
341
|
* const body_b = bullet3d.get_rigid_body("/frame#collisionobject");
|
|
342
|
-
* let hinge: bullet3d.constraint.
|
|
342
|
+
* let hinge: bullet3d.constraint.BtTypedConstraint | undefined;
|
|
343
343
|
* if (body_a !== undefined) {
|
|
344
344
|
* hinge = bullet3d.constraint.create_hinge(body_a, body_b, {
|
|
345
345
|
* frame_a_position: vmath.vector3(-0.5, 0, 0),
|
|
@@ -361,7 +361,7 @@ declare global {
|
|
|
361
361
|
* });
|
|
362
362
|
* ```
|
|
363
363
|
*/
|
|
364
|
-
function create_hinge(body_a: Opaque<"btRigidBody">, body_b: Opaque<"btRigidBody"> | undefined, params: bullet3d.constraint.
|
|
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
365
|
/**
|
|
366
366
|
* The world is derived from `body_a`.
|
|
367
367
|
*
|
|
@@ -376,7 +376,7 @@ declare global {
|
|
|
376
376
|
* init() {
|
|
377
377
|
* const body_a = bullet3d.get_rigid_body("/door#collisionobject");
|
|
378
378
|
* const body_b = bullet3d.get_rigid_body("/frame#collisionobject");
|
|
379
|
-
* let hinge: bullet3d.constraint.
|
|
379
|
+
* let hinge: bullet3d.constraint.BtTypedConstraint | undefined;
|
|
380
380
|
* if (body_a !== undefined) {
|
|
381
381
|
* hinge = bullet3d.constraint.create_hinge(body_a, body_b, {
|
|
382
382
|
* frame_a_position: vmath.vector3(-0.5, 0, 0),
|
|
@@ -398,7 +398,7 @@ declare global {
|
|
|
398
398
|
* });
|
|
399
399
|
* ```
|
|
400
400
|
*/
|
|
401
|
-
function create_hinge(body_a: Opaque<"btRigidBody">, body_b: undefined, params: bullet3d.constraint.
|
|
401
|
+
function create_hinge(body_a: Opaque<"btRigidBody">, body_b: undefined, params: bullet3d.constraint.HingeParams): bullet3d.constraint.BtTypedConstraint;
|
|
402
402
|
/**
|
|
403
403
|
* Both bodies are required. Its initial linear suspension travel is one Defold
|
|
404
404
|
* unit in either direction. The world is derived from `body_a`.
|
|
@@ -408,7 +408,7 @@ declare global {
|
|
|
408
408
|
* @param params - anchor, axes, and options
|
|
409
409
|
* @returns hinge2 constraint
|
|
410
410
|
*/
|
|
411
|
-
function create_hinge2(body_a: Opaque<"btRigidBody">, body_b: Opaque<"btRigidBody">, params: bullet3d.constraint.
|
|
411
|
+
function create_hinge2(body_a: Opaque<"btRigidBody">, body_b: Opaque<"btRigidBody">, params: bullet3d.constraint.AnchorAxesParams): bullet3d.constraint.BtTypedConstraint;
|
|
412
412
|
/**
|
|
413
413
|
* The world is derived from `body_a`; both bodies must belong to that same world.
|
|
414
414
|
*
|
|
@@ -424,7 +424,7 @@ declare global {
|
|
|
424
424
|
* init() {
|
|
425
425
|
* const body_a = bullet3d.get_rigid_body("/body_a#collisionobject");
|
|
426
426
|
* const body_b = bullet3d.get_rigid_body("/body_b#collisionobject");
|
|
427
|
-
* let constraint: bullet3d.constraint.
|
|
427
|
+
* let constraint: bullet3d.constraint.BtTypedConstraint | undefined;
|
|
428
428
|
* if (body_a !== undefined) {
|
|
429
429
|
* constraint = bullet3d.constraint.create_point_to_point(body_a, body_b, {
|
|
430
430
|
* pivot_a: vmath.vector3(0.5, 0, 0),
|
|
@@ -442,7 +442,7 @@ declare global {
|
|
|
442
442
|
* });
|
|
443
443
|
* ```
|
|
444
444
|
*/
|
|
445
|
-
function create_point_to_point(body_a: Opaque<"btRigidBody">, body_b: Opaque<"btRigidBody"> | undefined, params: bullet3d.constraint.
|
|
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
446
|
/**
|
|
447
447
|
* The world is derived from `body_a`; both bodies must belong to that same world.
|
|
448
448
|
*
|
|
@@ -458,7 +458,7 @@ declare global {
|
|
|
458
458
|
* init() {
|
|
459
459
|
* const body_a = bullet3d.get_rigid_body("/body_a#collisionobject");
|
|
460
460
|
* const body_b = bullet3d.get_rigid_body("/body_b#collisionobject");
|
|
461
|
-
* let constraint: bullet3d.constraint.
|
|
461
|
+
* let constraint: bullet3d.constraint.BtTypedConstraint | undefined;
|
|
462
462
|
* if (body_a !== undefined) {
|
|
463
463
|
* constraint = bullet3d.constraint.create_point_to_point(body_a, body_b, {
|
|
464
464
|
* pivot_a: vmath.vector3(0.5, 0, 0),
|
|
@@ -476,7 +476,7 @@ declare global {
|
|
|
476
476
|
* });
|
|
477
477
|
* ```
|
|
478
478
|
*/
|
|
479
|
-
function create_point_to_point(body_a: Opaque<"btRigidBody">, body_b: undefined, params: bullet3d.constraint.
|
|
479
|
+
function create_point_to_point(body_a: Opaque<"btRigidBody">, body_b: undefined, params: bullet3d.constraint.PointToPointParams): bullet3d.constraint.BtTypedConstraint;
|
|
480
480
|
/**
|
|
481
481
|
* The world is derived from `body_a`.
|
|
482
482
|
*
|
|
@@ -485,7 +485,7 @@ declare global {
|
|
|
485
485
|
* @param params - local frames and options
|
|
486
486
|
* @returns slider constraint
|
|
487
487
|
*/
|
|
488
|
-
function create_slider(body_a: Opaque<"btRigidBody">, body_b: Opaque<"btRigidBody"> | undefined, params: bullet3d.constraint.
|
|
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;
|
|
489
489
|
/**
|
|
490
490
|
* The world is derived from `body_a`.
|
|
491
491
|
*
|
|
@@ -494,7 +494,7 @@ declare global {
|
|
|
494
494
|
* @param params - local frames and options
|
|
495
495
|
* @returns slider constraint
|
|
496
496
|
*/
|
|
497
|
-
function create_slider(body_a: Opaque<"btRigidBody">, body_b: undefined, params: bullet3d.constraint.
|
|
497
|
+
function create_slider(body_a: Opaque<"btRigidBody">, body_b: undefined, params: bullet3d.constraint.SliderParams): bullet3d.constraint.BtTypedConstraint;
|
|
498
498
|
/**
|
|
499
499
|
* Both bodies are required. The world is derived from `body_a`.
|
|
500
500
|
*
|
|
@@ -503,20 +503,20 @@ declare global {
|
|
|
503
503
|
* @param params - anchor, axes, and options
|
|
504
504
|
* @returns universal constraint
|
|
505
505
|
*/
|
|
506
|
-
function create_universal(body_a: Opaque<"btRigidBody">, body_b: Opaque<"btRigidBody">, params: bullet3d.constraint.
|
|
506
|
+
function create_universal(body_a: Opaque<"btRigidBody">, body_b: Opaque<"btRigidBody">, params: bullet3d.constraint.AnchorAxesParams): bullet3d.constraint.BtTypedConstraint;
|
|
507
507
|
/**
|
|
508
508
|
* Destroy a constraint
|
|
509
509
|
*
|
|
510
510
|
* @param constraint - constraint
|
|
511
511
|
*/
|
|
512
|
-
function destroy(constraint: bullet3d.constraint.
|
|
512
|
+
function destroy(constraint: bullet3d.constraint.BtTypedConstraint): void;
|
|
513
513
|
/**
|
|
514
514
|
* Enable or disable the cone-twist motor
|
|
515
515
|
*
|
|
516
516
|
* @param constraint - cone-twist constraint
|
|
517
517
|
* @param enabled - motor state
|
|
518
518
|
*/
|
|
519
|
-
function enable_cone_twist_motor(constraint: bullet3d.constraint.
|
|
519
|
+
function enable_cone_twist_motor(constraint: bullet3d.constraint.BtTypedConstraint, enabled: boolean): void;
|
|
520
520
|
/**
|
|
521
521
|
* Enable or disable a spring axis
|
|
522
522
|
*
|
|
@@ -524,7 +524,7 @@ declare global {
|
|
|
524
524
|
* @param axis - one-based axis from 1 to 6. **⚠️ 1-based; passed to Defold unchanged.**
|
|
525
525
|
* @param enabled - spring state
|
|
526
526
|
*/
|
|
527
|
-
function enable_spring(constraint: bullet3d.constraint.
|
|
527
|
+
function enable_spring(constraint: bullet3d.constraint.BtTypedConstraint, axis: number, enabled: boolean): void;
|
|
528
528
|
/**
|
|
529
529
|
* Get a current 6-DOF angle
|
|
530
530
|
*
|
|
@@ -532,7 +532,7 @@ declare global {
|
|
|
532
532
|
* @param axis - one-based angular-axis index from 1 to 3. **⚠️ 1-based; passed to Defold unchanged.**
|
|
533
533
|
* @returns current angle in radians
|
|
534
534
|
*/
|
|
535
|
-
function get_6dof_angle(constraint: bullet3d.constraint.
|
|
535
|
+
function get_6dof_angle(constraint: bullet3d.constraint.BtTypedConstraint, axis: number): number;
|
|
536
536
|
/**
|
|
537
537
|
* Get a current 6-DOF angular axis
|
|
538
538
|
*
|
|
@@ -540,7 +540,7 @@ declare global {
|
|
|
540
540
|
* @param axis - one-based angular-axis index from 1 to 3. **⚠️ 1-based; passed to Defold unchanged.**
|
|
541
541
|
* @returns world-space unit axis
|
|
542
542
|
*/
|
|
543
|
-
function get_6dof_axis(constraint: bullet3d.constraint.
|
|
543
|
+
function get_6dof_axis(constraint: bullet3d.constraint.BtTypedConstraint, axis: number): Vector3;
|
|
544
544
|
/**
|
|
545
545
|
* Axes 1-3 are linear and axes 4-6 are angular. Generic 6-DOF, generic spring
|
|
546
546
|
* 6-DOF, and universal constraints support bounce only on angular axes; hinge2
|
|
@@ -551,7 +551,7 @@ declare global {
|
|
|
551
551
|
* @param constraint - 6-DOF-derived constraint
|
|
552
552
|
* @param axis - one-based axis from 1 to 6. **⚠️ 1-based; passed to Defold unchanged.**
|
|
553
553
|
*/
|
|
554
|
-
function get_6dof_motor(constraint: bullet3d.constraint.
|
|
554
|
+
function get_6dof_motor(constraint: bullet3d.constraint.BtTypedConstraint, axis: number): LuaMultiReturn<[boolean, number, number, number]>;
|
|
555
555
|
/**
|
|
556
556
|
* Get a current 6-DOF linear position
|
|
557
557
|
*
|
|
@@ -559,52 +559,52 @@ declare global {
|
|
|
559
559
|
* @param axis - one-based linear-axis index from 1 to 3. **⚠️ 1-based; passed to Defold unchanged.**
|
|
560
560
|
* @returns relative position in Defold units
|
|
561
561
|
*/
|
|
562
|
-
function get_6dof_position(constraint: bullet3d.constraint.
|
|
562
|
+
function get_6dof_position(constraint: bullet3d.constraint.BtTypedConstraint, axis: number): number;
|
|
563
563
|
/**
|
|
564
564
|
* Get universal or hinge2 anchors
|
|
565
565
|
*
|
|
566
566
|
* @param constraint - universal or hinge2 constraint
|
|
567
567
|
*/
|
|
568
|
-
function get_anchors(constraint: bullet3d.constraint.
|
|
568
|
+
function get_anchors(constraint: bullet3d.constraint.BtTypedConstraint): LuaMultiReturn<[Vector3, Vector3]>;
|
|
569
569
|
/**
|
|
570
570
|
* Get universal or hinge2 angles
|
|
571
571
|
*
|
|
572
572
|
* @param constraint - universal or hinge2 constraint
|
|
573
573
|
*/
|
|
574
|
-
function get_angles(constraint: bullet3d.constraint.
|
|
574
|
+
function get_angles(constraint: bullet3d.constraint.BtTypedConstraint): LuaMultiReturn<[number, number]>;
|
|
575
575
|
/**
|
|
576
576
|
* Get universal or hinge2 axes
|
|
577
577
|
*
|
|
578
578
|
* @param constraint - universal or hinge2 constraint
|
|
579
579
|
*/
|
|
580
|
-
function get_axes(constraint: bullet3d.constraint.
|
|
580
|
+
function get_axes(constraint: bullet3d.constraint.BtTypedConstraint): LuaMultiReturn<[Vector3, Vector3]>;
|
|
581
581
|
/**
|
|
582
582
|
* Get the first linked body
|
|
583
583
|
*
|
|
584
584
|
* @param constraint - constraint
|
|
585
585
|
* @returns first body
|
|
586
586
|
*/
|
|
587
|
-
function get_body_a(constraint: bullet3d.constraint.
|
|
587
|
+
function get_body_a(constraint: bullet3d.constraint.BtTypedConstraint): Opaque<"btRigidBody">;
|
|
588
588
|
/**
|
|
589
589
|
* Get the second linked body
|
|
590
590
|
*
|
|
591
591
|
* @param constraint - constraint
|
|
592
592
|
* @returns second body, or nil for a world constraint
|
|
593
593
|
*/
|
|
594
|
-
function get_body_b(constraint: bullet3d.constraint.
|
|
594
|
+
function get_body_b(constraint: bullet3d.constraint.BtTypedConstraint): Opaque<"btRigidBody"> | undefined;
|
|
595
595
|
/**
|
|
596
596
|
* Get whether connected bodies can collide
|
|
597
597
|
*
|
|
598
598
|
* @param constraint - constraint
|
|
599
599
|
* @returns whether connected bodies can collide
|
|
600
600
|
*/
|
|
601
|
-
function get_collide_connected(constraint: bullet3d.constraint.
|
|
601
|
+
function get_collide_connected(constraint: bullet3d.constraint.BtTypedConstraint): boolean;
|
|
602
602
|
/**
|
|
603
603
|
* Get cone-twist angular spans
|
|
604
604
|
*
|
|
605
605
|
* @param constraint - cone-twist constraint
|
|
606
606
|
*/
|
|
607
|
-
function get_cone_twist_limits(constraint: bullet3d.constraint.
|
|
607
|
+
function get_cone_twist_limits(constraint: bullet3d.constraint.BtTypedConstraint): LuaMultiReturn<[number, number, number]>;
|
|
608
608
|
/**
|
|
609
609
|
* Supported constraint types are hinge, cone-twist, generic 6-DOF, generic
|
|
610
610
|
* spring 6-DOF, slider, universal, and hinge2. Point-to-point constraints use
|
|
@@ -615,33 +615,33 @@ declare global {
|
|
|
615
615
|
*
|
|
616
616
|
* @param constraint - framed constraint
|
|
617
617
|
*/
|
|
618
|
-
function get_frame_a(constraint: bullet3d.constraint.
|
|
618
|
+
function get_frame_a(constraint: bullet3d.constraint.BtTypedConstraint): LuaMultiReturn<[Vector3, Quaternion]>;
|
|
619
619
|
/**
|
|
620
620
|
* Supports the same constraint types as `get_frame_a`. For a one-body
|
|
621
621
|
* constraint, this is the frame attached to the fixed world body.
|
|
622
622
|
*
|
|
623
623
|
* @param constraint - framed constraint
|
|
624
624
|
*/
|
|
625
|
-
function get_frame_b(constraint: bullet3d.constraint.
|
|
625
|
+
function get_frame_b(constraint: bullet3d.constraint.BtTypedConstraint): LuaMultiReturn<[Vector3, Quaternion]>;
|
|
626
626
|
/**
|
|
627
627
|
* Get the current hinge angle
|
|
628
628
|
*
|
|
629
629
|
* @param constraint - hinge constraint
|
|
630
630
|
* @returns angle in radians
|
|
631
631
|
*/
|
|
632
|
-
function get_hinge_angle(constraint: bullet3d.constraint.
|
|
632
|
+
function get_hinge_angle(constraint: bullet3d.constraint.BtTypedConstraint): number;
|
|
633
633
|
/**
|
|
634
634
|
* Get hinge angular limits
|
|
635
635
|
*
|
|
636
636
|
* @param constraint - hinge constraint
|
|
637
637
|
*/
|
|
638
|
-
function get_hinge_limits(constraint: bullet3d.constraint.
|
|
638
|
+
function get_hinge_limits(constraint: bullet3d.constraint.BtTypedConstraint): LuaMultiReturn<[number, number]>;
|
|
639
639
|
/**
|
|
640
640
|
* Get hinge motor settings
|
|
641
641
|
*
|
|
642
642
|
* @param constraint - hinge constraint
|
|
643
643
|
*/
|
|
644
|
-
function get_hinge_motor(constraint: bullet3d.constraint.
|
|
644
|
+
function get_hinge_motor(constraint: bullet3d.constraint.BtTypedConstraint): LuaMultiReturn<[boolean, number, number]>;
|
|
645
645
|
/**
|
|
646
646
|
* Axes 1-3 return linear limits in Defold units. Axes 4-6 return angular
|
|
647
647
|
* limits in radians.
|
|
@@ -649,19 +649,19 @@ declare global {
|
|
|
649
649
|
* @param constraint - 6-DOF-derived constraint
|
|
650
650
|
* @param axis - one-based axis from 1 to 6. **⚠️ 1-based; passed to Defold unchanged.**
|
|
651
651
|
*/
|
|
652
|
-
function get_limit(constraint: bullet3d.constraint.
|
|
652
|
+
function get_limit(constraint: bullet3d.constraint.BtTypedConstraint, axis: number): LuaMultiReturn<[number, number]>;
|
|
653
653
|
/**
|
|
654
654
|
* Get point-to-point pivots
|
|
655
655
|
*
|
|
656
656
|
* @param constraint - point-to-point constraint
|
|
657
657
|
*/
|
|
658
|
-
function get_pivots(constraint: bullet3d.constraint.
|
|
658
|
+
function get_pivots(constraint: bullet3d.constraint.BtTypedConstraint): LuaMultiReturn<[Vector3, Vector3]>;
|
|
659
659
|
/**
|
|
660
660
|
* Get slider limits
|
|
661
661
|
*
|
|
662
662
|
* @param constraint - slider constraint
|
|
663
663
|
*/
|
|
664
|
-
function get_slider_limits(constraint: bullet3d.constraint.
|
|
664
|
+
function get_slider_limits(constraint: bullet3d.constraint.BtTypedConstraint): LuaMultiReturn<[number, number, number, number]>;
|
|
665
665
|
/**
|
|
666
666
|
* The linear motor uses Defold units per second and maximum force. The angular
|
|
667
667
|
* motor uses radians per second and maximum torque in Defold squared units.
|
|
@@ -669,28 +669,28 @@ declare global {
|
|
|
669
669
|
* @param constraint - slider constraint
|
|
670
670
|
* @param motor - `linear` or `angular`
|
|
671
671
|
*/
|
|
672
|
-
function get_slider_motor(constraint: bullet3d.constraint.
|
|
672
|
+
function get_slider_motor(constraint: bullet3d.constraint.BtTypedConstraint, motor: "linear" | "angular"): LuaMultiReturn<[boolean, number, number]>;
|
|
673
673
|
/**
|
|
674
674
|
* Get the current slider position
|
|
675
675
|
*
|
|
676
676
|
* @param constraint - slider constraint
|
|
677
677
|
* @returns current linear position in Defold units
|
|
678
678
|
*/
|
|
679
|
-
function get_slider_position(constraint: bullet3d.constraint.
|
|
679
|
+
function get_slider_position(constraint: bullet3d.constraint.BtTypedConstraint): number;
|
|
680
680
|
/**
|
|
681
681
|
* Get the current cone-twist twist angle
|
|
682
682
|
*
|
|
683
683
|
* @param constraint - cone-twist constraint
|
|
684
684
|
* @returns twist angle in radians
|
|
685
685
|
*/
|
|
686
|
-
function get_twist_angle(constraint: bullet3d.constraint.
|
|
686
|
+
function get_twist_angle(constraint: bullet3d.constraint.BtTypedConstraint): number;
|
|
687
687
|
/**
|
|
688
688
|
* Get the constraint type
|
|
689
689
|
*
|
|
690
690
|
* @param constraint - constraint
|
|
691
691
|
* @returns constraint type
|
|
692
692
|
*/
|
|
693
|
-
function get_type(constraint: bullet3d.constraint.
|
|
693
|
+
function get_type(constraint: bullet3d.constraint.BtTypedConstraint): bullet3d.constraint.ConstraintType;
|
|
694
694
|
/**
|
|
695
695
|
* Returns a stable lowercase diagnostic name such as `"hinge"` or
|
|
696
696
|
* `"generic_6dof_spring"`.
|
|
@@ -698,35 +698,35 @@ declare global {
|
|
|
698
698
|
* @param constraint - constraint
|
|
699
699
|
* @returns constraint type name
|
|
700
700
|
*/
|
|
701
|
-
function get_type_name(constraint: bullet3d.constraint.
|
|
701
|
+
function get_type_name(constraint: bullet3d.constraint.BtTypedConstraint): string;
|
|
702
702
|
/**
|
|
703
703
|
* Get the slider linear reference-frame choice
|
|
704
704
|
*
|
|
705
705
|
* @param constraint - slider constraint
|
|
706
706
|
* @returns true when linear calculations reference frame A
|
|
707
707
|
*/
|
|
708
|
-
function get_use_linear_reference_frame_a(constraint: bullet3d.constraint.
|
|
708
|
+
function get_use_linear_reference_frame_a(constraint: bullet3d.constraint.BtTypedConstraint): boolean;
|
|
709
709
|
/**
|
|
710
710
|
* Get the owning world
|
|
711
711
|
*
|
|
712
712
|
* @param constraint - constraint
|
|
713
713
|
* @returns owning world
|
|
714
714
|
*/
|
|
715
|
-
function get_world(constraint: bullet3d.constraint.
|
|
715
|
+
function get_world(constraint: bullet3d.constraint.BtTypedConstraint): bullet3d.BtDiscreteDynamicsWorld;
|
|
716
716
|
/**
|
|
717
717
|
* Test whether a constraint is active in its world
|
|
718
718
|
*
|
|
719
719
|
* @param constraint - constraint
|
|
720
720
|
* @returns false while a linked body is disabled
|
|
721
721
|
*/
|
|
722
|
-
function is_active(constraint: bullet3d.constraint.
|
|
722
|
+
function is_active(constraint: bullet3d.constraint.BtTypedConstraint): boolean;
|
|
723
723
|
/**
|
|
724
724
|
* Test angular-only mode
|
|
725
725
|
*
|
|
726
726
|
* @param constraint - hinge or cone-twist constraint
|
|
727
727
|
* @returns angular-only state
|
|
728
728
|
*/
|
|
729
|
-
function is_angular_only(constraint: bullet3d.constraint.
|
|
729
|
+
function is_angular_only(constraint: bullet3d.constraint.BtTypedConstraint): boolean;
|
|
730
730
|
/**
|
|
731
731
|
* Both a ranged and a locked axis are considered limited; a free axis is not.
|
|
732
732
|
*
|
|
@@ -734,21 +734,21 @@ declare global {
|
|
|
734
734
|
* @param axis - one-based axis from 1 to 6. **⚠️ 1-based; passed to Defold unchanged.**
|
|
735
735
|
* @returns limit state
|
|
736
736
|
*/
|
|
737
|
-
function is_limited(constraint: bullet3d.constraint.
|
|
737
|
+
function is_limited(constraint: bullet3d.constraint.BtTypedConstraint, axis: number): boolean;
|
|
738
738
|
/**
|
|
739
739
|
* Test whether a cone-twist is past its swing limit
|
|
740
740
|
*
|
|
741
741
|
* @param constraint - cone-twist constraint
|
|
742
742
|
* @returns swing-limit state
|
|
743
743
|
*/
|
|
744
|
-
function is_past_swing_limit(constraint: bullet3d.constraint.
|
|
744
|
+
function is_past_swing_limit(constraint: bullet3d.constraint.BtTypedConstraint): boolean;
|
|
745
745
|
/**
|
|
746
746
|
* Test whether a constraint handle is valid
|
|
747
747
|
*
|
|
748
748
|
* @param constraint - constraint handle
|
|
749
749
|
* @returns true while the native constraint exists
|
|
750
750
|
*/
|
|
751
|
-
function is_valid(constraint: bullet3d.constraint.
|
|
751
|
+
function is_valid(constraint: bullet3d.constraint.BtTypedConstraint): boolean;
|
|
752
752
|
/**
|
|
753
753
|
* Linear and angular values use the units described by `get_6dof_motor`.
|
|
754
754
|
*
|
|
@@ -759,14 +759,14 @@ declare global {
|
|
|
759
759
|
* @param max_force - non-negative maximum motor force for linear axes or torque for angular axes
|
|
760
760
|
* @param bounce - optional bounce from 0 to 1; defaults to `0`
|
|
761
761
|
*/
|
|
762
|
-
function set_6dof_motor(constraint: bullet3d.constraint.
|
|
762
|
+
function set_6dof_motor(constraint: bullet3d.constraint.BtTypedConstraint, axis: number, enabled: boolean, target_velocity: number, max_force: number, bounce?: number): void;
|
|
763
763
|
/**
|
|
764
764
|
* Set angular-only mode
|
|
765
765
|
*
|
|
766
766
|
* @param constraint - hinge or cone-twist constraint
|
|
767
767
|
* @param angular_only - angular-only state
|
|
768
768
|
*/
|
|
769
|
-
function set_angular_only(constraint: bullet3d.constraint.
|
|
769
|
+
function set_angular_only(constraint: bullet3d.constraint.BtTypedConstraint, angular_only: boolean): void;
|
|
770
770
|
/**
|
|
771
771
|
* Set cone-twist angular spans
|
|
772
772
|
*
|
|
@@ -778,7 +778,7 @@ declare global {
|
|
|
778
778
|
* @param bias - optional bias from 0 to 1; defaults to `0.3`
|
|
779
779
|
* @param relaxation - optional relaxation from 0 to 1; defaults to `1`
|
|
780
780
|
*/
|
|
781
|
-
function set_cone_twist_limits(constraint: bullet3d.constraint.
|
|
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;
|
|
782
782
|
/**
|
|
783
783
|
* By default, `target` is the desired rotation of body A relative to body B.
|
|
784
784
|
* With `constraint_space` set, it is the desired rotation of frame A relative
|
|
@@ -788,7 +788,7 @@ declare global {
|
|
|
788
788
|
* @param target - finite, non-zero target orientation; normalized by the binding
|
|
789
789
|
* @param constraint_space - optional target-is-in-constraint-space flag; defaults to `false`
|
|
790
790
|
*/
|
|
791
|
-
function set_cone_twist_motor_target(constraint: bullet3d.constraint.
|
|
791
|
+
function set_cone_twist_motor_target(constraint: bullet3d.constraint.BtTypedConstraint, target: Quaternion, constraint_space?: boolean): void;
|
|
792
792
|
/**
|
|
793
793
|
* Frame mutation is supported for hinge, generic 6-DOF, generic spring 6-DOF,
|
|
794
794
|
* and slider constraints. Cone-twist, universal, and hinge2 frames are
|
|
@@ -798,7 +798,7 @@ declare global {
|
|
|
798
798
|
* @param position - finite local position
|
|
799
799
|
* @param rotation - finite, non-zero local rotation; normalized by the binding
|
|
800
800
|
*/
|
|
801
|
-
function set_frame_a(constraint: bullet3d.constraint.
|
|
801
|
+
function set_frame_a(constraint: bullet3d.constraint.BtTypedConstraint, position: Vector3, rotation: Quaternion): void;
|
|
802
802
|
/**
|
|
803
803
|
* Supports the same constraint types as `set_frame_a`. For a one-body
|
|
804
804
|
* constraint, this changes the frame attached to the fixed world body.
|
|
@@ -807,7 +807,7 @@ declare global {
|
|
|
807
807
|
* @param position - finite local position or world frame position
|
|
808
808
|
* @param rotation - finite, non-zero local or world frame rotation; normalized by the binding
|
|
809
809
|
*/
|
|
810
|
-
function set_frame_b(constraint: bullet3d.constraint.
|
|
810
|
+
function set_frame_b(constraint: bullet3d.constraint.BtTypedConstraint, position: Vector3, rotation: Quaternion): void;
|
|
811
811
|
/**
|
|
812
812
|
* This function only supports hinges attached to the world. For a two-body
|
|
813
813
|
* hinge, change both local frames with `set_frame_a` and `set_frame_b`.
|
|
@@ -815,7 +815,7 @@ declare global {
|
|
|
815
815
|
* @param constraint - one-body hinge constraint
|
|
816
816
|
* @param axis - non-zero axis in body-A space
|
|
817
817
|
*/
|
|
818
|
-
function set_hinge_axis(constraint: bullet3d.constraint.
|
|
818
|
+
function set_hinge_axis(constraint: bullet3d.constraint.BtTypedConstraint, axis: Vector3): void;
|
|
819
819
|
/**
|
|
820
820
|
* Set hinge angular limits
|
|
821
821
|
*
|
|
@@ -825,7 +825,7 @@ declare global {
|
|
|
825
825
|
* @param bias - optional limit bias from 0 to 1; defaults to `0.3`
|
|
826
826
|
* @param relaxation - optional relaxation from 0 to 1; defaults to `1`
|
|
827
827
|
*/
|
|
828
|
-
function set_hinge_limits(constraint: bullet3d.constraint.
|
|
828
|
+
function set_hinge_limits(constraint: bullet3d.constraint.BtTypedConstraint, lower: number, upper: number, bias?: number, relaxation?: number): void;
|
|
829
829
|
/**
|
|
830
830
|
* Set hinge motor settings
|
|
831
831
|
*
|
|
@@ -834,7 +834,7 @@ declare global {
|
|
|
834
834
|
* @param target_velocity - angular target velocity in radians per second
|
|
835
835
|
* @param max_impulse - non-negative maximum angular motor impulse in Defold squared units
|
|
836
836
|
*/
|
|
837
|
-
function set_hinge_motor(constraint: bullet3d.constraint.
|
|
837
|
+
function set_hinge_motor(constraint: bullet3d.constraint.BtTypedConstraint, enabled: boolean, target_velocity: number, max_impulse: number): void;
|
|
838
838
|
/**
|
|
839
839
|
* Set a hinge motor angle target
|
|
840
840
|
*
|
|
@@ -842,7 +842,7 @@ declare global {
|
|
|
842
842
|
* @param target_angle - target angle in radians
|
|
843
843
|
* @param time_step - positive step duration in seconds
|
|
844
844
|
*/
|
|
845
|
-
function set_hinge_motor_target(constraint: bullet3d.constraint.
|
|
845
|
+
function set_hinge_motor_target(constraint: bullet3d.constraint.BtTypedConstraint, target_angle: number, time_step: number): void;
|
|
846
846
|
/**
|
|
847
847
|
* Axes 1-3 use Defold units and axes 4-6 use radians. A lower value less than
|
|
848
848
|
* the upper value creates a limited range, equal values lock the axis, and a
|
|
@@ -853,7 +853,7 @@ declare global {
|
|
|
853
853
|
* @param lower - lower limit
|
|
854
854
|
* @param upper - upper limit
|
|
855
855
|
*/
|
|
856
|
-
function set_limit(constraint: bullet3d.constraint.
|
|
856
|
+
function set_limit(constraint: bullet3d.constraint.BtTypedConstraint, axis: number, lower: number, upper: number): void;
|
|
857
857
|
/**
|
|
858
858
|
* Set point-to-point pivots
|
|
859
859
|
*
|
|
@@ -861,7 +861,7 @@ declare global {
|
|
|
861
861
|
* @param pivot_a - local body-A pivot
|
|
862
862
|
* @param pivot_b - local body-B pivot or world anchor
|
|
863
863
|
*/
|
|
864
|
-
function set_pivots(constraint: bullet3d.constraint.
|
|
864
|
+
function set_pivots(constraint: bullet3d.constraint.BtTypedConstraint, pivot_a: Vector3, pivot_b: Vector3): void;
|
|
865
865
|
/**
|
|
866
866
|
* Each lower/upper pair follows Bullet's limit convention: lower less than
|
|
867
867
|
* upper creates a limited range, equal values lock that axis, and lower greater
|
|
@@ -873,7 +873,7 @@ declare global {
|
|
|
873
873
|
* @param lower_angular - lower angular limit in radians
|
|
874
874
|
* @param upper_angular - upper angular limit in radians
|
|
875
875
|
*/
|
|
876
|
-
function set_slider_limits(constraint: bullet3d.constraint.
|
|
876
|
+
function set_slider_limits(constraint: bullet3d.constraint.BtTypedConstraint, lower_linear: number, upper_linear: number, lower_angular: number, upper_angular: number): void;
|
|
877
877
|
/**
|
|
878
878
|
* Linear and angular values use the units described by `get_slider_motor`.
|
|
879
879
|
*
|
|
@@ -883,7 +883,7 @@ declare global {
|
|
|
883
883
|
* @param target_velocity - linear or angular target velocity
|
|
884
884
|
* @param max_force - non-negative maximum linear force or angular torque
|
|
885
885
|
*/
|
|
886
|
-
function set_slider_motor(constraint: bullet3d.constraint.
|
|
886
|
+
function set_slider_motor(constraint: bullet3d.constraint.BtTypedConstraint, motor: "linear" | "angular", enabled: boolean, target_velocity: number, max_force: number): void;
|
|
887
887
|
/**
|
|
888
888
|
* Generic spring 6-DOF constraints use a scale-independent damping factor from
|
|
889
889
|
* 0 to 1, where 1 means no damping. Hinge2 constraints use a damping coefficient
|
|
@@ -894,7 +894,7 @@ declare global {
|
|
|
894
894
|
* @param axis - one-based axis from 1 to 6. **⚠️ 1-based; passed to Defold unchanged.**
|
|
895
895
|
* @param damping - damping value in the range required by the constraint type
|
|
896
896
|
*/
|
|
897
|
-
function set_spring_damping(constraint: bullet3d.constraint.
|
|
897
|
+
function set_spring_damping(constraint: bullet3d.constraint.BtTypedConstraint, axis: number, damping: number): void;
|
|
898
898
|
/**
|
|
899
899
|
* With no axis, captures all current transforms. With an axis and no value,
|
|
900
900
|
* captures that axis. Linear values use Defold units and angular values use
|
|
@@ -904,7 +904,7 @@ declare global {
|
|
|
904
904
|
* @param axis - optional one-based axis from 1 to 6. **⚠️ 1-based; passed to Defold unchanged.**
|
|
905
905
|
* @param value - optional explicit equilibrium value
|
|
906
906
|
*/
|
|
907
|
-
function set_spring_equilibrium_point(constraint: bullet3d.constraint.
|
|
907
|
+
function set_spring_equilibrium_point(constraint: bullet3d.constraint.BtTypedConstraint, axis?: number, value?: number): void;
|
|
908
908
|
/**
|
|
909
909
|
* Linear stiffness values are independent of `physics.scale`. Angular
|
|
910
910
|
* stiffness values are automatically converted using `physics.scale` squared.
|
|
@@ -913,7 +913,7 @@ declare global {
|
|
|
913
913
|
* @param axis - one-based axis from 1 to 6. **⚠️ 1-based; passed to Defold unchanged.**
|
|
914
914
|
* @param stiffness - non-negative stiffness
|
|
915
915
|
*/
|
|
916
|
-
function set_spring_stiffness(constraint: bullet3d.constraint.
|
|
916
|
+
function set_spring_stiffness(constraint: bullet3d.constraint.BtTypedConstraint, axis: number, stiffness: number): void;
|
|
917
917
|
}
|
|
918
918
|
}
|
|
919
919
|
|