@defold-typescript/types 0.40.0 → 0.42.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-availability.json +3963 -772
- package/api-migrations.json +27 -0
- package/api-signatures.json +18069 -10240
- package/api-targets.json +448 -11
- package/examples/translations.json +560 -89
- package/fixtures/messages_doc.json +96 -0
- package/generated/b2d.d.ts +680 -4
- package/generated/b2d_body.d.ts +29 -103
- package/generated/b2d_chain.d.ts +5 -6
- package/generated/b2d_fixture.d.ts +34 -38
- package/generated/b2d_joint.d.ts +503 -25
- package/generated/b2d_shape.d.ts +183 -20
- package/generated/b2d_world.d.ts +57 -63
- package/generated/buffer.d.ts +16 -15
- package/generated/builtin-messages.d.ts +7 -1
- package/generated/bullet3d.d.ts +91 -0
- package/generated/bullet3d_collision_object.d.ts +433 -0
- package/generated/bullet3d_constraint.d.ts +818 -0
- package/generated/bullet3d_rigid_body.d.ts +429 -0
- package/generated/bullet3d_shape.d.ts +123 -0
- package/generated/bullet3d_world.d.ts +492 -0
- package/generated/camera.d.ts +29 -32
- package/generated/collectionfactory.d.ts +15 -18
- package/generated/collectionproxy.d.ts +22 -6
- package/generated/compute.d.ts +12 -238
- package/generated/crash.d.ts +24 -10
- package/generated/editor-vm/http.d.ts +90 -7
- package/generated/editor-vm/image.d.ts +7 -7
- package/generated/editor-vm/json.d.ts +11 -0
- package/generated/editor-vm/localization.d.ts +7 -7
- package/generated/editor-vm/tilemap_tiles.d.ts +56 -10
- package/generated/editor-vm/zip.d.ts +28 -0
- package/generated/editor.d.ts +1496 -430
- package/generated/factory.d.ts +21 -25
- package/generated/font.d.ts +64 -22
- package/generated/go.d.ts +235 -182
- package/generated/graphics.d.ts +335 -97
- package/generated/gui.d.ts +240 -471
- package/generated/html5.d.ts +2 -2
- package/generated/http.d.ts +28 -35
- package/generated/image.d.ts +105 -72
- package/generated/json.d.ts +34 -16
- package/generated/kinds/gui-script.d.ts +7 -0
- package/generated/kinds/render-script.d.ts +7 -0
- package/generated/kinds/script.d.ts +7 -0
- package/generated/label.d.ts +77 -7
- package/generated/liveupdate.d.ts +13 -10
- package/generated/material.d.ts +312 -360
- package/generated/model.d.ts +40 -39
- package/generated/particlefx.d.ts +19 -28
- package/generated/physics.d.ts +365 -133
- package/generated/profiler.d.ts +13 -23
- package/generated/render.d.ts +237 -297
- package/generated/resource.d.ts +664 -583
- package/generated/socket.d.ts +120 -133
- package/generated/sound.d.ts +62 -31
- package/generated/sprite.d.ts +31 -17
- package/generated/sys.d.ts +234 -190
- package/generated/tilemap.d.ts +21 -16
- package/generated/timer.d.ts +34 -21
- package/generated/versions/defold-1.12.4/b2d_body.d.ts +0 -7
- package/generated/versions/defold-1.12.4/buffer.d.ts +1 -3
- package/generated/versions/defold-1.12.4/camera.d.ts +21 -21
- package/generated/versions/defold-1.12.4/collectionfactory.d.ts +9 -9
- package/generated/versions/defold-1.12.4/collectionproxy.d.ts +2 -2
- package/generated/versions/defold-1.12.4/crash.d.ts +2 -2
- package/generated/versions/defold-1.12.4/factory.d.ts +15 -16
- package/generated/versions/defold-1.12.4/go.d.ts +6 -12
- package/generated/versions/defold-1.12.4/gui.d.ts +77 -175
- package/generated/versions/defold-1.12.4/html5.d.ts +1 -1
- package/generated/versions/defold-1.12.4/http.d.ts +0 -13
- package/generated/versions/defold-1.12.4/image.d.ts +16 -33
- package/generated/versions/defold-1.12.4/index.d.ts +1 -0
- package/generated/versions/defold-1.12.4/json.d.ts +10 -6
- package/generated/versions/defold-1.12.4/label.d.ts +2 -3
- package/generated/versions/defold-1.12.4/liveupdate.d.ts +5 -3
- package/generated/versions/defold-1.12.4/model.d.ts +2 -10
- package/generated/versions/defold-1.12.4/particlefx.d.ts +2 -5
- package/generated/versions/defold-1.12.4/physics.d.ts +69 -67
- package/generated/versions/defold-1.12.4/profiler.d.ts +2 -5
- package/generated/versions/defold-1.12.4/render.d.ts +99 -128
- package/generated/versions/defold-1.12.4/resource.d.ts +120 -148
- package/generated/versions/defold-1.12.4/socket.d.ts +34 -60
- package/generated/versions/defold-1.12.4/sound.d.ts +8 -8
- package/generated/versions/defold-1.12.4/sprite.d.ts +15 -5
- package/generated/versions/defold-1.12.4/sys.d.ts +37 -71
- package/generated/versions/defold-1.12.4/tilemap.d.ts +18 -11
- package/generated/versions/defold-1.12.4/timer.d.ts +5 -3
- package/generated/versions/defold-1.12.4/vmath.d.ts +0 -21
- package/generated/versions/defold-1.12.4/window.d.ts +1 -16
- package/generated/versions/defold-1.13.0/b2d_body.d.ts +10 -55
- package/generated/versions/defold-1.13.0/b2d_fixture.d.ts +25 -25
- package/generated/versions/defold-1.13.0/b2d_shape.d.ts +169 -8
- package/generated/versions/defold-1.13.0/b2d_world.d.ts +16 -10
- package/generated/versions/defold-1.13.0/buffer.d.ts +1 -3
- package/generated/versions/defold-1.13.0/camera.d.ts +25 -25
- package/generated/versions/defold-1.13.0/collectionfactory.d.ts +9 -9
- package/generated/versions/defold-1.13.0/collectionproxy.d.ts +2 -2
- package/generated/versions/defold-1.13.0/compute.d.ts +0 -69
- package/generated/versions/defold-1.13.0/crash.d.ts +2 -2
- package/generated/versions/defold-1.13.0/editor-vm/tilemap_tiles.d.ts +3 -3
- package/generated/versions/defold-1.13.0/editor.d.ts +34 -24
- package/generated/versions/defold-1.13.0/factory.d.ts +15 -16
- package/generated/versions/defold-1.13.0/go.d.ts +6 -12
- package/generated/versions/defold-1.13.0/graphics.d.ts +73 -37
- package/generated/versions/defold-1.13.0/gui.d.ts +77 -175
- package/generated/versions/defold-1.13.0/html5.d.ts +1 -1
- package/generated/versions/defold-1.13.0/http.d.ts +0 -13
- package/generated/versions/defold-1.13.0/image.d.ts +16 -33
- package/generated/versions/defold-1.13.0/index.d.ts +1 -0
- package/generated/versions/defold-1.13.0/json.d.ts +10 -6
- package/generated/versions/defold-1.13.0/label.d.ts +2 -3
- package/generated/versions/defold-1.13.0/liveupdate.d.ts +7 -5
- package/generated/versions/defold-1.13.0/material.d.ts +68 -106
- package/generated/versions/defold-1.13.0/model.d.ts +2 -10
- package/generated/versions/defold-1.13.0/particlefx.d.ts +2 -5
- package/generated/versions/defold-1.13.0/physics.d.ts +69 -67
- package/generated/versions/defold-1.13.0/profiler.d.ts +2 -5
- package/generated/versions/defold-1.13.0/render.d.ts +99 -128
- package/generated/versions/defold-1.13.0/resource.d.ts +126 -150
- package/generated/versions/defold-1.13.0/socket.d.ts +34 -60
- package/generated/versions/defold-1.13.0/sound.d.ts +8 -8
- package/generated/versions/defold-1.13.0/sprite.d.ts +15 -5
- package/generated/versions/defold-1.13.0/sys.d.ts +37 -71
- package/generated/versions/defold-1.13.0/tilemap.d.ts +18 -11
- package/generated/versions/defold-1.13.0/timer.d.ts +5 -3
- package/generated/versions/defold-1.13.0/vmath.d.ts +0 -21
- package/generated/versions/defold-1.13.0/window.d.ts +1 -16
- package/generated/versions/defold-1.13.1/b2d.d.ts +33 -0
- package/generated/versions/defold-1.13.1/b2d_body.d.ts +636 -0
- package/generated/versions/defold-1.13.1/b2d_chain.d.ts +106 -0
- package/generated/versions/defold-1.13.1/b2d_fixture.d.ts +157 -0
- package/generated/versions/defold-1.13.1/b2d_joint.d.ts +823 -0
- package/generated/versions/defold-1.13.1/b2d_shape.d.ts +400 -0
- package/generated/versions/defold-1.13.1/b2d_world.d.ts +320 -0
- package/generated/versions/defold-1.13.1/buffer.d.ts +189 -0
- package/generated/versions/defold-1.13.1/camera.d.ts +303 -0
- package/generated/versions/defold-1.13.1/collectionfactory.d.ts +151 -0
- package/generated/versions/defold-1.13.1/collectionproxy.d.ts +93 -0
- package/generated/versions/defold-1.13.1/compute.d.ts +237 -0
- package/generated/versions/defold-1.13.1/crash.d.ts +143 -0
- package/generated/versions/defold-1.13.1/editor-vm/http.d.ts +56 -0
- package/generated/versions/defold-1.13.1/editor-vm/image.d.ts +48 -0
- package/generated/versions/defold-1.13.1/editor-vm/json.d.ts +10 -0
- package/generated/versions/defold-1.13.1/editor-vm/localization.d.ts +42 -0
- package/generated/versions/defold-1.13.1/editor-vm/tilemap_tiles.d.ts +80 -0
- package/generated/versions/defold-1.13.1/editor-vm/zip.d.ts +10 -0
- package/generated/versions/defold-1.13.1/editor-vm/zlib.d.ts +24 -0
- package/generated/versions/defold-1.13.1/editor.d.ts +1121 -0
- package/generated/versions/defold-1.13.1/factory.d.ts +124 -0
- package/generated/versions/defold-1.13.1/font.d.ts +81 -0
- package/generated/versions/defold-1.13.1/go.d.ts +1107 -0
- package/generated/versions/defold-1.13.1/graphics.d.ts +411 -0
- package/generated/versions/defold-1.13.1/gui.d.ts +2353 -0
- package/generated/versions/defold-1.13.1/html5.d.ts +55 -0
- package/generated/versions/defold-1.13.1/http.d.ts +77 -0
- package/generated/versions/defold-1.13.1/image.d.ts +131 -0
- package/generated/versions/defold-1.13.1/index.d.ts +57 -0
- package/generated/versions/defold-1.13.1/json.d.ts +80 -0
- package/generated/versions/defold-1.13.1/kinds/editor-script.d.ts +14 -0
- package/generated/versions/defold-1.13.1/label.d.ts +93 -0
- package/generated/versions/defold-1.13.1/liveupdate.d.ts +142 -0
- package/generated/versions/defold-1.13.1/material.d.ts +408 -0
- package/generated/versions/defold-1.13.1/model.d.ts +272 -0
- package/generated/versions/defold-1.13.1/msg.d.ts +10 -0
- package/generated/versions/defold-1.13.1/particlefx.d.ts +163 -0
- package/generated/versions/defold-1.13.1/physics.d.ts +559 -0
- package/generated/versions/defold-1.13.1/profiler.d.ts +235 -0
- package/generated/versions/defold-1.13.1/render.d.ts +1190 -0
- package/generated/versions/defold-1.13.1/resource.d.ts +1523 -0
- package/generated/versions/defold-1.13.1/socket.d.ts +784 -0
- package/generated/versions/defold-1.13.1/sound.d.ts +292 -0
- package/generated/versions/defold-1.13.1/sprite.d.ts +175 -0
- package/generated/versions/defold-1.13.1/sys.d.ts +678 -0
- package/generated/versions/defold-1.13.1/tilemap.d.ts +208 -0
- package/generated/versions/defold-1.13.1/timer.d.ts +125 -0
- package/generated/versions/defold-1.13.1/types.d.ts +61 -0
- package/generated/versions/defold-1.13.1/vmath.d.ts +774 -0
- package/generated/versions/defold-1.13.1/window.d.ts +183 -0
- package/generated/versions/defold-1.13.1/zlib.d.ts +41 -0
- package/generated/vmath.d.ts +1 -21
- package/generated/window.d.ts +71 -71
- package/identity-vocabulary.json +561 -0
- package/index.d.ts +7 -0
- package/package.json +18 -2
- package/scripts/example-store-io.ts +12 -1
- package/scripts/extension-goldens.ts +1 -0
- package/scripts/fidelity-baseline.json +146 -46
- package/scripts/generate-api-availability.ts +90 -12
- package/scripts/generate-api-signatures.ts +12 -2
- package/scripts/import-defold-release.ts +106 -26
- package/scripts/prose-constants.ts +77 -16
- package/scripts/regen.ts +391 -77
- package/scripts/shared-handle-methods.ts +53 -0
- package/scripts/signature-store-fs.ts +1 -0
- package/scripts/sync-api-docs.ts +48 -10
- package/src/api-availability.ts +0 -0
- package/src/api-doc.ts +201 -3
- package/src/api-identity.ts +252 -0
- package/src/core-types.ts +26 -3
- package/src/correction-pins.ts +49 -0
- package/src/doc-comment.ts +104 -11
- package/src/doc-corrections.ts +108 -0
- package/src/editor-vm-globals.d.ts +5 -2
- package/src/emit-dts.ts +2064 -281
- package/src/emit-messages.ts +52 -0
- package/src/example-store.ts +125 -14
- package/src/field-correction-coverage.ts +204 -0
- package/src/fnv1a.ts +16 -0
- package/src/go-overloads.d.ts +25 -6
- package/src/index-base-table.ts +145 -0
- package/src/index-slot-classifications.ts +588 -0
- package/src/index.ts +38 -5
- package/src/library-index-slot-classifications.ts +332 -0
- package/src/lifecycle.ts +61 -199
- package/src/luals-type-expr.ts +354 -0
- package/src/msg-overloads.d.ts +0 -1
- package/src/param-correction-provenance.ts +8 -11
- package/src/render-overloads.d.ts +0 -15
- package/src/return-correction-provenance.ts +58 -16
- package/src/sys-overloads.d.ts +48 -0
- package/src/vmath-overloads.d.ts +27 -1
- package/src/window-event-guard.d.ts +6 -9
- package/url-parameters.json +1 -2
package/generated/b2d_body.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** @noSelfInFile */
|
|
2
|
-
import type {
|
|
2
|
+
import type { Opaque, Vector3 } from "../src/core-types";
|
|
3
3
|
|
|
4
4
|
declare global {
|
|
5
5
|
/**
|
|
@@ -8,6 +8,7 @@ declare global {
|
|
|
8
8
|
namespace b2d.body {
|
|
9
9
|
type b2Body = Opaque<"b2Body">;
|
|
10
10
|
type b2World = Opaque<"b2World">;
|
|
11
|
+
type B2 = typeof b2d.body.B2_DYNAMIC_BODY | typeof b2d.body.B2_KINEMATIC_BODY | typeof b2d.body.B2_STATIC_BODY;
|
|
11
12
|
/**
|
|
12
13
|
* Dynamic body
|
|
13
14
|
*/
|
|
@@ -74,33 +75,14 @@ declare global {
|
|
|
74
75
|
* Compute the world AABB of all body shapes.
|
|
75
76
|
*
|
|
76
77
|
* @param body - body
|
|
77
|
-
* @returns
|
|
78
|
+
* @returns body bounds
|
|
78
79
|
*/
|
|
79
|
-
function compute_aabb(body: Opaque<"b2Body">):
|
|
80
|
+
function compute_aabb(body: Opaque<"b2Body">): b2d.aabb;
|
|
80
81
|
/**
|
|
81
82
|
* Chains are one-sided connected segments with optional ghost vertices at
|
|
82
83
|
* the ends of open chains. Ghost vertices are creation-time chain data only and
|
|
83
84
|
* cannot be added to arbitrary shapes, bodies, or joints after creation.
|
|
84
85
|
*
|
|
85
|
-
* `definition.vertices`
|
|
86
|
-
* table array of local `vector3` vertices. Open chains require at least 2 vertices. Loop chains require at least 4 vertices.
|
|
87
|
-
* `definition.loop`
|
|
88
|
-
* boolean true to create a closed loop chain.
|
|
89
|
-
* `definition.prev_vertex`
|
|
90
|
-
* vector3 optional ghost vertex before the first vertex for open chains.
|
|
91
|
-
* `definition.next_vertex`
|
|
92
|
-
* vector3 optional ghost vertex after the last vertex for open chains.
|
|
93
|
-
* `definition.friction`
|
|
94
|
-
* number optional friction.
|
|
95
|
-
* `definition.restitution`
|
|
96
|
-
* number optional restitution.
|
|
97
|
-
* `definition.material`
|
|
98
|
-
* number optional material id.
|
|
99
|
-
* `definition.filter`
|
|
100
|
-
* table optional filter with `category_bits`, `mask_bits`, and `group_index`.
|
|
101
|
-
* `definition.enable_sensor_events`
|
|
102
|
-
* boolean true to enable sensor events for chain segments.
|
|
103
|
-
*
|
|
104
86
|
* @param body - body
|
|
105
87
|
* @param definition - the chain definition
|
|
106
88
|
* @example
|
|
@@ -114,7 +96,7 @@ declare global {
|
|
|
114
96
|
* }
|
|
115
97
|
* ```
|
|
116
98
|
*/
|
|
117
|
-
function create_chain(body: Opaque<"b2Body">, definition:
|
|
99
|
+
function create_chain(body: Opaque<"b2Body">, definition: b2d.chain_definition): LuaMultiReturn<[Opaque<"b2Chain">, b2d.shape_info[]]>;
|
|
118
100
|
/**
|
|
119
101
|
* Creates a fixture and attach it to this body. Use this function if you need
|
|
120
102
|
* to set some fixture parameters, like friction. Otherwise you can create the
|
|
@@ -123,16 +105,8 @@ declare global {
|
|
|
123
105
|
* Contacts are not created until the next time step.
|
|
124
106
|
*
|
|
125
107
|
* @param body - body
|
|
126
|
-
* @param definition - fixture definition
|
|
127
|
-
*
|
|
128
|
-
* `density` = number, `sensor` = boolean, and optional `filter` table.
|
|
129
|
-
* Supported shape tables are:
|
|
130
|
-
* `circle` = `{ type = b2d.shape.SHAPE_TYPE_CIRCLE, radius = number, center = vector3_or_nil }`
|
|
131
|
-
* `edge` = `{ type = b2d.shape.SHAPE_TYPE_EDGE, v1 = vector3, v2 = vector3, v0 = vector3_or_nil, v3 = vector3_or_nil }`
|
|
132
|
-
* `polygon` = `{ type = b2d.shape.SHAPE_TYPE_POLYGON, vertices = { vector3, ... } }`
|
|
133
|
-
* `box` = `{ type = b2d.shape.SHAPE_TYPE_BOX, hx = number, hy = number, center = vector3_or_nil, angle = radians_or_nil }`
|
|
134
|
-
* `chain` = `{ type = b2d.shape.SHAPE_TYPE_CHAIN, vertices = { vector3, ... }, loop = boolean_or_nil, prev_vertex = vector3_or_nil, next_vertex = vector3_or_nil }`
|
|
135
|
-
* @returns fixture info table with `index`, `type`, `sensor`, `density`, `friction`, `restitution`, and `child_count`
|
|
108
|
+
* @param definition - fixture definition
|
|
109
|
+
* @returns fixture information. **⚠️ `index` is 1-based; passed to Defold unchanged.**
|
|
136
110
|
* @example
|
|
137
111
|
* ```ts
|
|
138
112
|
* const body = b2d.get_body("#collisionobject");
|
|
@@ -144,35 +118,22 @@ declare global {
|
|
|
144
118
|
* }
|
|
145
119
|
* ```
|
|
146
120
|
*/
|
|
147
|
-
function create_fixture(body: Opaque<"b2Body">, definition: { shape
|
|
148
|
-
/**
|
|
149
|
-
* Creates a fixture from a shape and attach it to this body.
|
|
150
|
-
* This is a convenience function. Use b2FixtureDef if you need to set parameters
|
|
151
|
-
* like friction, restitution, user data, or filtering.
|
|
152
|
-
* If the density is non-zero, this function automatically updates the mass of the body.
|
|
153
|
-
*
|
|
154
|
-
* @param body - body
|
|
155
|
-
* @param shape - the shape to be cloned.
|
|
156
|
-
* @param density - the shape density (set to zero for static bodies).
|
|
157
|
-
*/
|
|
158
|
-
function create_fixture(body: Opaque<"b2Body">, shape: Opaque<"b2Shape">, density: number): void;
|
|
121
|
+
function create_fixture(body: Opaque<"b2Body">, definition: { shape: { type: typeof b2d.shape.SHAPE_TYPE_POLYGON | typeof b2d.shape.SHAPE_TYPE_BOX; hx: number; hy: number; center?: Vector3; angle?: number } | { type: typeof b2d.shape.SHAPE_TYPE_POLYGON | typeof b2d.shape.SHAPE_TYPE_BOX; vertices: Vector3[] } | { type: typeof b2d.shape.SHAPE_TYPE_CIRCLE; radius: number; center?: Vector3 } | { type: typeof b2d.shape.SHAPE_TYPE_EDGE; v1: Vector3; v2: Vector3; v0?: Vector3; v3?: Vector3 } | { type: typeof b2d.shape.SHAPE_TYPE_CHAIN; vertices: Vector3[]; loop?: boolean; prev_vertex?: Vector3; next_vertex?: Vector3 }; friction?: number; restitution?: number; density?: number; sensor?: boolean; is_sensor?: boolean; filter?: { category_bits: number; mask_bits: number; group_index: number } }): b2d.fixture_info;
|
|
159
122
|
/**
|
|
160
123
|
* Creates a shape and attaches it to this body.
|
|
161
124
|
* If the density is non-zero, this function automatically updates the mass of the body.
|
|
162
125
|
* Contacts are not created until the next time step.
|
|
163
|
-
* The definition may include `density`, `friction`, `restitution`, `material`,
|
|
164
|
-
* `sensor` or `is_sensor`, `filter`, and the shape table itself. The shape table
|
|
165
|
-
* can be in `definition.shape` or directly in `definition`.
|
|
166
126
|
*
|
|
167
127
|
* @param body - body
|
|
168
128
|
* @param definition - the shape definition.
|
|
129
|
+
* @returns **⚠️ `index` is 1-based; passed to Defold unchanged.**
|
|
169
130
|
*/
|
|
170
|
-
function create_shape(body: Opaque<"b2Body">, definition:
|
|
131
|
+
function create_shape(body: Opaque<"b2Body">, definition: ({ shape: { type: typeof b2d.shape.SHAPE_TYPE_POLYGON | typeof b2d.shape.SHAPE_TYPE_BOX; hx: number; hy: number; center?: Vector3; angle?: number } | { type: typeof b2d.shape.SHAPE_TYPE_POLYGON | typeof b2d.shape.SHAPE_TYPE_BOX; vertices: Vector3[] } | { type: typeof b2d.shape.SHAPE_TYPE_CIRCLE; radius: number; center?: Vector3 } | { type: typeof b2d.shape.SHAPE_TYPE_CAPSULE; radius: number; center1: Vector3; center2: Vector3 } | { type: typeof b2d.shape.SHAPE_TYPE_EDGE | typeof b2d.shape.SHAPE_TYPE_SEGMENT; v1: Vector3; v2: Vector3 } } | { type: typeof b2d.shape.SHAPE_TYPE_POLYGON | typeof b2d.shape.SHAPE_TYPE_BOX; hx: number; hy: number; center?: Vector3; angle?: number } | { type: typeof b2d.shape.SHAPE_TYPE_POLYGON | typeof b2d.shape.SHAPE_TYPE_BOX; vertices: Vector3[] } | { type: typeof b2d.shape.SHAPE_TYPE_CIRCLE; radius: number; center?: Vector3 } | { type: typeof b2d.shape.SHAPE_TYPE_CAPSULE; radius: number; center1: Vector3; center2: Vector3 } | { type: typeof b2d.shape.SHAPE_TYPE_EDGE | typeof b2d.shape.SHAPE_TYPE_SEGMENT; v1: Vector3; v2: Vector3 }) & { density?: number; friction?: number; restitution?: number; material?: number; sensor?: boolean; is_sensor?: boolean; filter?: { category_bits: number; mask_bits: number; group_index: number } }): { index: number; shape_id: Opaque<"b2Shape">; type: number; sensor: boolean; density: number; friction: number; restitution: number; material: number; child_count: number; is_chain_segment: boolean };
|
|
171
132
|
/**
|
|
172
133
|
* Destroy a fixture from a body.
|
|
173
134
|
*
|
|
174
135
|
* @param body - body
|
|
175
|
-
* @param fixture_index - 1-based fixture index from
|
|
136
|
+
* @param fixture_index - 1-based fixture index from b2d.body.get_fixtures. **⚠️ 1-based; passed to Defold unchanged.**
|
|
176
137
|
*/
|
|
177
138
|
function destroy_fixture(body: Opaque<"b2Body">, fixture_index: number): void;
|
|
178
139
|
/**
|
|
@@ -183,7 +144,7 @@ declare global {
|
|
|
183
144
|
* All shapes attached to a body are implicitly destroyed when the body is destroyed.
|
|
184
145
|
*
|
|
185
146
|
* @param body - body
|
|
186
|
-
* @param shape_index - 1-based shape index from `b2d.body.get_shapes
|
|
147
|
+
* @param shape_index - 1-based shape index from `b2d.body.get_shapes`. **⚠️ 1-based; passed to Defold unchanged.**
|
|
187
148
|
*/
|
|
188
149
|
function destroy_shape(body: Opaque<"b2Body">, shape_index: number): void;
|
|
189
150
|
/**
|
|
@@ -240,21 +201,14 @@ declare global {
|
|
|
240
201
|
* @param body - body
|
|
241
202
|
* @returns array of contact tables
|
|
242
203
|
*/
|
|
243
|
-
function get_contact_data(body: Opaque<"b2Body">):
|
|
244
|
-
/**
|
|
245
|
-
* Get the list of all contacts attached to this body.
|
|
246
|
-
*
|
|
247
|
-
* @param body - body
|
|
248
|
-
* @returns the first edge
|
|
249
|
-
*/
|
|
250
|
-
function get_contact_list(body: Opaque<"b2Body">): Opaque<"b2ContactEdge">;
|
|
204
|
+
function get_contact_data(body: Opaque<"b2Body">): b2d.contact_data[];
|
|
251
205
|
/**
|
|
252
206
|
* Get the fixtures attached to this body.
|
|
253
207
|
*
|
|
254
208
|
* @param body - body
|
|
255
|
-
* @returns
|
|
209
|
+
* @returns the attached fixtures. **⚠️ `index` is 1-based; passed to Defold unchanged.**
|
|
256
210
|
*/
|
|
257
|
-
function get_fixtures(body: Opaque<"b2Body">):
|
|
211
|
+
function get_fixtures(body: Opaque<"b2Body">): b2d.fixture_info[];
|
|
258
212
|
/**
|
|
259
213
|
* Get the total force currently applied on this object
|
|
260
214
|
*
|
|
@@ -279,9 +233,9 @@ declare global {
|
|
|
279
233
|
* Get the joints attached to this body.
|
|
280
234
|
*
|
|
281
235
|
* @param body - body
|
|
282
|
-
* @returns
|
|
236
|
+
* @returns joint handles created by b2d.joint
|
|
283
237
|
*/
|
|
284
|
-
function get_joints(body: Opaque<"b2Body">):
|
|
238
|
+
function get_joints(body: Opaque<"b2Body">): Opaque<"b2Joint">[];
|
|
285
239
|
/**
|
|
286
240
|
* Get the linear damping of the body.
|
|
287
241
|
*
|
|
@@ -353,9 +307,9 @@ declare global {
|
|
|
353
307
|
* Get the mass data of the body.
|
|
354
308
|
*
|
|
355
309
|
* @param body - body
|
|
356
|
-
* @returns
|
|
310
|
+
* @returns the mass data
|
|
357
311
|
*/
|
|
358
|
-
function get_mass_data(body: Opaque<"b2Body">):
|
|
312
|
+
function get_mass_data(body: Opaque<"b2Body">): b2d.mass_data;
|
|
359
313
|
/**
|
|
360
314
|
* Get the mass data of the body.
|
|
361
315
|
*
|
|
@@ -367,16 +321,16 @@ declare global {
|
|
|
367
321
|
* Get the body name.
|
|
368
322
|
*
|
|
369
323
|
* @param body - body
|
|
370
|
-
* @returns body name, or nil if no name is set
|
|
324
|
+
* @returns body name, or `nil` if no name is set
|
|
371
325
|
*/
|
|
372
|
-
function get_name(body: Opaque<"b2Body">): string;
|
|
326
|
+
function get_name(body: Opaque<"b2Body">): string | undefined;
|
|
373
327
|
/**
|
|
374
328
|
* Get the next body in the world's body list.
|
|
375
329
|
*
|
|
376
330
|
* @param body - body
|
|
377
|
-
* @returns the next body
|
|
331
|
+
* @returns the next body, or `nil` if this is the last body
|
|
378
332
|
*/
|
|
379
|
-
function get_next(body: Opaque<"b2Body">): Opaque<"b2Body"
|
|
333
|
+
function get_next(body: Opaque<"b2Body">): Opaque<"b2Body"> | undefined;
|
|
380
334
|
/**
|
|
381
335
|
* Get the world body origin position.
|
|
382
336
|
*
|
|
@@ -395,9 +349,9 @@ declare global {
|
|
|
395
349
|
* Get the list of all shapes attached to this body.
|
|
396
350
|
*
|
|
397
351
|
* @param body - body
|
|
398
|
-
* @returns
|
|
352
|
+
* @returns attached shapes
|
|
399
353
|
*/
|
|
400
|
-
function get_shapes(body: Opaque<"b2Body">):
|
|
354
|
+
function get_shapes(body: Opaque<"b2Body">): b2d.shape_info[];
|
|
401
355
|
/**
|
|
402
356
|
* Get the sleep velocity threshold.
|
|
403
357
|
*
|
|
@@ -409,9 +363,9 @@ declare global {
|
|
|
409
363
|
* Get the body transform for the body's origin.
|
|
410
364
|
*
|
|
411
365
|
* @param body - body
|
|
412
|
-
* @returns
|
|
366
|
+
* @returns the body transform
|
|
413
367
|
*/
|
|
414
|
-
function get_transform(body: Opaque<"b2Body">):
|
|
368
|
+
function get_transform(body: Opaque<"b2Body">): b2d.transform;
|
|
415
369
|
/**
|
|
416
370
|
* Get the body transform for the body's origin.
|
|
417
371
|
*
|
|
@@ -426,26 +380,12 @@ declare global {
|
|
|
426
380
|
* @returns the body type
|
|
427
381
|
*/
|
|
428
382
|
function get_type(body: Opaque<"b2Body">): (number & { readonly __brand: "b2d.body.B2_DYNAMIC_BODY" }) | (number & { readonly __brand: "b2d.body.B2_KINEMATIC_BODY" }) | (number & { readonly __brand: "b2d.body.B2_STATIC_BODY" });
|
|
429
|
-
/**
|
|
430
|
-
* Get the user data pointer that was provided in the body definition.
|
|
431
|
-
*
|
|
432
|
-
* @param body - body
|
|
433
|
-
* @returns the game object id this body is connected to
|
|
434
|
-
*/
|
|
435
|
-
function get_user_data(body: Opaque<"b2Body">): Hash;
|
|
436
383
|
/**
|
|
437
384
|
* Get the parent world of this body.
|
|
438
385
|
*
|
|
439
386
|
* @param body - body
|
|
440
387
|
*/
|
|
441
388
|
function get_world(body: Opaque<"b2Body">): Opaque<"b2World">;
|
|
442
|
-
/**
|
|
443
|
-
* Get the angle in radians.
|
|
444
|
-
*
|
|
445
|
-
* @param body - body
|
|
446
|
-
* @returns the current world rotation angle in radians.
|
|
447
|
-
*/
|
|
448
|
-
function get_world_center(body: Opaque<"b2Body">): number;
|
|
449
389
|
/**
|
|
450
390
|
* Get the world position of the center of mass.
|
|
451
391
|
*
|
|
@@ -611,16 +551,9 @@ declare global {
|
|
|
611
551
|
* Set the mass properties to override the mass properties of the fixtures.
|
|
612
552
|
*
|
|
613
553
|
* @param body - body
|
|
614
|
-
* @param data -
|
|
615
|
-
*/
|
|
616
|
-
function set_mass_data(body: Opaque<"b2Body">, data: { mass?: number; center?: Vector3; inertia?: number }): void;
|
|
617
|
-
/**
|
|
618
|
-
* Set the mass properties to override the mass properties of the shapes.
|
|
619
|
-
*
|
|
620
|
-
* @param body - body
|
|
621
|
-
* @param data - the mass properties.
|
|
554
|
+
* @param data - the mass data
|
|
622
555
|
*/
|
|
623
|
-
function set_mass_data(body: Opaque<"b2Body">, data:
|
|
556
|
+
function set_mass_data(body: Opaque<"b2Body">, data: b2d.mass_data): void;
|
|
624
557
|
/**
|
|
625
558
|
* Set the body name.
|
|
626
559
|
*
|
|
@@ -668,13 +601,6 @@ declare global {
|
|
|
668
601
|
* @param type - the body type
|
|
669
602
|
*/
|
|
670
603
|
function set_type(body: Opaque<"b2Body">, type: (number & { readonly __brand: "b2d.body.B2_DYNAMIC_BODY" }) | (number & { readonly __brand: "b2d.body.B2_KINEMATIC_BODY" }) | (number & { readonly __brand: "b2d.body.B2_STATIC_BODY" })): void;
|
|
671
|
-
/**
|
|
672
|
-
* Set the user data. Use this to store your application specific data.
|
|
673
|
-
*
|
|
674
|
-
* @param body - body
|
|
675
|
-
* @param id - the game object id
|
|
676
|
-
*/
|
|
677
|
-
function set_user_data(body: Opaque<"b2Body">, id: Hash): void;
|
|
678
604
|
}
|
|
679
605
|
}
|
|
680
606
|
|
package/generated/b2d_chain.d.ts
CHANGED
|
@@ -30,13 +30,12 @@ declare global {
|
|
|
30
30
|
*/
|
|
31
31
|
function get_friction(chain: Opaque<"b2Chain">): number;
|
|
32
32
|
/**
|
|
33
|
-
*
|
|
34
|
-
* Open chains also include `prev_vertex` and `next_vertex` ghost vertices.
|
|
33
|
+
* Get the chain geometry.
|
|
35
34
|
*
|
|
36
35
|
* @param chain - chain
|
|
37
|
-
* @returns chain geometry
|
|
36
|
+
* @returns chain geometry
|
|
38
37
|
*/
|
|
39
|
-
function get_geometry(chain: Opaque<"b2Chain">):
|
|
38
|
+
function get_geometry(chain: Opaque<"b2Chain">): b2d.chain_geometry;
|
|
40
39
|
/**
|
|
41
40
|
* Get chain material id.
|
|
42
41
|
*
|
|
@@ -62,9 +61,9 @@ declare global {
|
|
|
62
61
|
* Get the segment shapes owned by a chain.
|
|
63
62
|
*
|
|
64
63
|
* @param chain - chain
|
|
65
|
-
* @returns
|
|
64
|
+
* @returns chain segment shapes
|
|
66
65
|
*/
|
|
67
|
-
function get_segments(chain: Opaque<"b2Chain">):
|
|
66
|
+
function get_segments(chain: Opaque<"b2Chain">): b2d.shape_info[];
|
|
68
67
|
/**
|
|
69
68
|
* Get the world owning a chain.
|
|
70
69
|
*
|
|
@@ -11,16 +11,16 @@ declare global {
|
|
|
11
11
|
* Get fixture AABB for a child shape.
|
|
12
12
|
*
|
|
13
13
|
* @param body - body
|
|
14
|
-
* @param fixture_index - 1-based fixture index from
|
|
15
|
-
* @param child_index - 1-based child shape index
|
|
16
|
-
* @returns
|
|
14
|
+
* @param fixture_index - 1-based fixture index from b2d.body.get_fixtures. **⚠️ 1-based; passed to Defold unchanged.**
|
|
15
|
+
* @param child_index - 1-based child shape index. **⚠️ 1-based; passed to Defold unchanged.**
|
|
16
|
+
* @returns the fixture AABB
|
|
17
17
|
*/
|
|
18
|
-
function get_aabb(body: Opaque<"b2Body">, fixture_index: number, child_index: number):
|
|
18
|
+
function get_aabb(body: Opaque<"b2Body">, fixture_index: number, child_index: number): b2d.aabb;
|
|
19
19
|
/**
|
|
20
20
|
* Get fixture density.
|
|
21
21
|
*
|
|
22
22
|
* @param body - body
|
|
23
|
-
* @param fixture_index - 1-based fixture index from
|
|
23
|
+
* @param fixture_index - 1-based fixture index from b2d.body.get_fixtures. **⚠️ 1-based; passed to Defold unchanged.**
|
|
24
24
|
* @returns density in kg/m^2
|
|
25
25
|
*/
|
|
26
26
|
function get_density(body: Opaque<"b2Body">, fixture_index: number): number;
|
|
@@ -28,56 +28,52 @@ declare global {
|
|
|
28
28
|
* Get fixture filter data for a child shape.
|
|
29
29
|
*
|
|
30
30
|
* @param body - body
|
|
31
|
-
* @param fixture_index - 1-based fixture index from
|
|
32
|
-
* @param child_index - 1-based child shape index
|
|
33
|
-
* @returns
|
|
31
|
+
* @param fixture_index - 1-based fixture index from b2d.body.get_fixtures. **⚠️ 1-based; passed to Defold unchanged.**
|
|
32
|
+
* @param child_index - 1-based child shape index. **⚠️ 1-based; passed to Defold unchanged.**
|
|
33
|
+
* @returns the filter data
|
|
34
34
|
*/
|
|
35
|
-
function get_filter_data(body: Opaque<"b2Body">, fixture_index: number, child_index: number):
|
|
35
|
+
function get_filter_data(body: Opaque<"b2Body">, fixture_index: number, child_index: number): b2d.filter;
|
|
36
36
|
/**
|
|
37
37
|
* Get fixture friction.
|
|
38
38
|
*
|
|
39
39
|
* @param body - body
|
|
40
|
-
* @param fixture_index - 1-based fixture index from
|
|
40
|
+
* @param fixture_index - 1-based fixture index from b2d.body.get_fixtures. **⚠️ 1-based; passed to Defold unchanged.**
|
|
41
41
|
*/
|
|
42
42
|
function get_friction(body: Opaque<"b2Body">, fixture_index: number): number;
|
|
43
43
|
/**
|
|
44
44
|
* Get fixture restitution.
|
|
45
45
|
*
|
|
46
46
|
* @param body - body
|
|
47
|
-
* @param fixture_index - 1-based fixture index from
|
|
47
|
+
* @param fixture_index - 1-based fixture index from b2d.body.get_fixtures. **⚠️ 1-based; passed to Defold unchanged.**
|
|
48
48
|
*/
|
|
49
49
|
function get_restitution(body: Opaque<"b2Body">, fixture_index: number): number;
|
|
50
50
|
/**
|
|
51
51
|
* Get the fixture shape as a functional shape table.
|
|
52
52
|
*
|
|
53
53
|
* @param body - body
|
|
54
|
-
* @param fixture_index - 1-based fixture index from
|
|
55
|
-
* @returns shape
|
|
56
|
-
* suitable for reuse in `b2d.body.create_fixture`.
|
|
57
|
-
* Circle shapes use `radius` and `center`, edge shapes use `v1`, `v2`, optional `v0`, `v3`,
|
|
58
|
-
* polygon shapes use `vertices`, and chain shapes use `vertices`, `loop`, optional `prev_vertex`, and `next_vertex`.
|
|
59
|
-
* Any angle values are in radians.
|
|
54
|
+
* @param fixture_index - 1-based fixture index from b2d.body.get_fixtures. **⚠️ 1-based; passed to Defold unchanged.**
|
|
55
|
+
* @returns the shape definition, suitable for reuse in b2d.body.create_fixture
|
|
60
56
|
*/
|
|
61
|
-
function get_shape(body: Opaque<"b2Body">, fixture_index: number):
|
|
57
|
+
function get_shape(body: Opaque<"b2Body">, fixture_index: number): b2d.shape.definition;
|
|
62
58
|
/**
|
|
63
59
|
* Get the fixture type.
|
|
64
60
|
*
|
|
65
61
|
* @param body - body
|
|
66
|
-
* @param fixture_index - 1-based fixture index from
|
|
62
|
+
* @param fixture_index - 1-based fixture index from b2d.body.get_fixtures. **⚠️ 1-based; passed to Defold unchanged.**
|
|
67
63
|
*/
|
|
68
|
-
function get_type(body: Opaque<"b2Body">, fixture_index: number):
|
|
64
|
+
function get_type(body: Opaque<"b2Body">, fixture_index: number): b2d.shape.SHAPE_TYPE;
|
|
69
65
|
/**
|
|
70
66
|
* Check if a fixture is a sensor.
|
|
71
67
|
*
|
|
72
68
|
* @param body - body
|
|
73
|
-
* @param fixture_index - 1-based fixture index from
|
|
69
|
+
* @param fixture_index - 1-based fixture index from b2d.body.get_fixtures. **⚠️ 1-based; passed to Defold unchanged.**
|
|
74
70
|
*/
|
|
75
71
|
function is_sensor(body: Opaque<"b2Body">, fixture_index: number): boolean;
|
|
76
72
|
/**
|
|
77
73
|
* Refilter a fixture.
|
|
78
74
|
*
|
|
79
75
|
* @param body - body
|
|
80
|
-
* @param fixture_index - 1-based fixture index from
|
|
76
|
+
* @param fixture_index - 1-based fixture index from b2d.body.get_fixtures. **⚠️ 1-based; passed to Defold unchanged.**
|
|
81
77
|
* @param touch_proxies - if true, touch broad-phase proxies
|
|
82
78
|
*/
|
|
83
79
|
function refilter(body: Opaque<"b2Body">, fixture_index: number, touch_proxies: boolean): void;
|
|
@@ -85,69 +81,69 @@ declare global {
|
|
|
85
81
|
* Set fixture density.
|
|
86
82
|
*
|
|
87
83
|
* @param body - body
|
|
88
|
-
* @param fixture_index - 1-based fixture index from
|
|
84
|
+
* @param fixture_index - 1-based fixture index from b2d.body.get_fixtures. **⚠️ 1-based; passed to Defold unchanged.**
|
|
89
85
|
* @param density - density in kg/m^2
|
|
90
86
|
* @param update_mass - if true, reset body mass data after the change
|
|
91
87
|
*/
|
|
92
|
-
function set_density(body: Opaque<"b2Body">, fixture_index: number, density: number, update_mass
|
|
88
|
+
function set_density(body: Opaque<"b2Body">, fixture_index: number, density: number, update_mass?: boolean): void;
|
|
93
89
|
/**
|
|
94
90
|
* Set fixture filter data for a child shape.
|
|
95
91
|
*
|
|
96
92
|
* @param body - body
|
|
97
|
-
* @param fixture_index - 1-based fixture index from
|
|
98
|
-
* @param child_index - 1-based child shape index
|
|
99
|
-
* @param filter -
|
|
93
|
+
* @param fixture_index - 1-based fixture index from b2d.body.get_fixtures. **⚠️ 1-based; passed to Defold unchanged.**
|
|
94
|
+
* @param child_index - 1-based child shape index. **⚠️ 1-based; passed to Defold unchanged.**
|
|
95
|
+
* @param filter - the filter data
|
|
100
96
|
*/
|
|
101
|
-
function set_filter_data(body: Opaque<"b2Body">, fixture_index: number, child_index: number, filter:
|
|
97
|
+
function set_filter_data(body: Opaque<"b2Body">, fixture_index: number, child_index: number, filter: b2d.filter): void;
|
|
102
98
|
/**
|
|
103
99
|
* Set fixture friction.
|
|
104
100
|
*
|
|
105
101
|
* @param body - body
|
|
106
|
-
* @param fixture_index - 1-based fixture index from
|
|
102
|
+
* @param fixture_index - 1-based fixture index from b2d.body.get_fixtures. **⚠️ 1-based; passed to Defold unchanged.**
|
|
107
103
|
*/
|
|
108
104
|
function set_friction(body: Opaque<"b2Body">, fixture_index: number, friction: number): void;
|
|
109
105
|
/**
|
|
110
106
|
* Set fixture restitution.
|
|
111
107
|
*
|
|
112
108
|
* @param body - body
|
|
113
|
-
* @param fixture_index - 1-based fixture index from
|
|
109
|
+
* @param fixture_index - 1-based fixture index from b2d.body.get_fixtures. **⚠️ 1-based; passed to Defold unchanged.**
|
|
114
110
|
*/
|
|
115
111
|
function set_restitution(body: Opaque<"b2Body">, fixture_index: number, restitution: number): void;
|
|
116
112
|
/**
|
|
117
113
|
* Set sensor mode for a fixture.
|
|
118
114
|
*
|
|
119
115
|
* @param body - body
|
|
120
|
-
* @param fixture_index - 1-based fixture index from
|
|
116
|
+
* @param fixture_index - 1-based fixture index from b2d.body.get_fixtures. **⚠️ 1-based; passed to Defold unchanged.**
|
|
121
117
|
*/
|
|
122
118
|
function set_sensor(body: Opaque<"b2Body">, fixture_index: number, enabled: boolean): void;
|
|
123
119
|
/**
|
|
124
120
|
* This updates the existing Box2D v2 shape using the same table format as
|
|
125
|
-
*
|
|
121
|
+
* b2d.body.create_fixture and b2d.fixture.get_shape.
|
|
126
122
|
* The shape type must match the current fixture shape type. Polygon updates must
|
|
127
123
|
* keep the same vertex count. Chain shape geometry cannot be updated in-place.
|
|
128
124
|
* The body mass is not updated unless `update_mass` is true.
|
|
129
125
|
*
|
|
130
126
|
* @param body - body
|
|
131
|
-
* @param fixture_index - 1-based fixture index from
|
|
132
|
-
* @param shape - shape
|
|
127
|
+
* @param fixture_index - 1-based fixture index from b2d.body.get_fixtures. **⚠️ 1-based; passed to Defold unchanged.**
|
|
128
|
+
* @param shape - the shape definition
|
|
133
129
|
* @param update_mass - if true, reset body mass data after the change
|
|
134
130
|
* @example
|
|
135
131
|
* ```ts
|
|
136
132
|
* const body = b2d.get_body("#collisionobject");
|
|
137
133
|
* if (body !== undefined) {
|
|
138
134
|
* const circle = b2d.fixture.get_shape(body, 1);
|
|
139
|
-
*
|
|
140
|
-
* b2d.fixture.set_shape(body, 1,
|
|
135
|
+
* const radius = "radius" in circle ? circle.radius : undefined;
|
|
136
|
+
* b2d.fixture.set_shape(body, 1, { type: b2d.shape.SHAPE_TYPE_CIRCLE, radius: radius ?? 16, center: vmath.vector3(24, 0, 0) }, true);
|
|
141
137
|
* b2d.fixture.set_shape(body, 2, { type: b2d.shape.SHAPE_TYPE_EDGE, v1: vmath.vector3(-32, 0, 0), v2: vmath.vector3(32, 0, 0) });
|
|
142
138
|
* }
|
|
143
139
|
* ```
|
|
144
140
|
*/
|
|
145
|
-
function set_shape(body: Opaque<"b2Body">, fixture_index: number, shape: { type
|
|
141
|
+
function set_shape(body: Opaque<"b2Body">, fixture_index: number, shape: { type: typeof b2d.shape.SHAPE_TYPE_POLYGON | typeof b2d.shape.SHAPE_TYPE_BOX; hx: number; hy: number; center?: Vector3; angle?: number } | { type: typeof b2d.shape.SHAPE_TYPE_POLYGON | typeof b2d.shape.SHAPE_TYPE_BOX; vertices: Vector3[] } | { type: typeof b2d.shape.SHAPE_TYPE_CIRCLE; radius: number; center?: Vector3 } | { type: typeof b2d.shape.SHAPE_TYPE_EDGE; v1: Vector3; v2: Vector3; v0?: Vector3; v3?: Vector3 } | { type: typeof b2d.shape.SHAPE_TYPE_CHAIN; vertices: Vector3[]; loop?: boolean; prev_vertex?: Vector3; next_vertex?: Vector3 }, update_mass?: boolean): void;
|
|
146
142
|
/**
|
|
147
143
|
* Test a point against a fixture.
|
|
148
144
|
*
|
|
149
145
|
* @param body - body
|
|
150
|
-
* @param fixture_index - 1-based fixture index from
|
|
146
|
+
* @param fixture_index - 1-based fixture index from b2d.body.get_fixtures. **⚠️ 1-based; passed to Defold unchanged.**
|
|
151
147
|
* @param point - point in world coordinates
|
|
152
148
|
*/
|
|
153
149
|
function test_point(body: Opaque<"b2Body">, fixture_index: number, point: Vector3): boolean;
|