Repository navigation
API Interface PhysicsWorld2DBackend
Defined in: src/plugins/physics/runtime/backend.ts:340
One World's simulation in a backend.
gravity: PhysicsVec2;Defined in: src/plugins/physics/runtime/backend.ts:289
castCollider(
collider,
direction,
maxDistance,
groups,
exclude
):
| {
body: BackendBody<Dim2> | null;
collider: number;
}
| null;Defined in: src/plugins/physics/runtime/backend.ts:311
Sweep collider (ignoring sensors, itself and exclude); the hit collider's body, if any.
number
number
BackendBody<Dim2> | null
| {
body: BackendBody<Dim2> | null;
collider: number;
}
| null
PhysicsWorldBackend.castCollider
castShape(
shape,
position,
rotation,
direction,
maxDistance,
groups?
): RayHit<Dim2> | null;Defined in: src/plugins/physics/runtime/backend.ts:309
number
number
number
contactImpulses(collider): object[];Defined in: src/plugins/physics/runtime/backend.ts:305
The impulses the last step's contacts gave collider's body, each where it acted when known.
object[]
PhysicsWorldBackend.contactImpulses
createBody(
type,
pose,
settings
): BackendBody<Dim2>;Defined in: src/plugins/physics/runtime/backend.ts:293
BodySettings | null
PhysicsWorldBackend.createBody
createCharacter(): BackendCharacter<Dim2>;Defined in: src/plugins/physics/runtime/backend.ts:299
PhysicsWorldBackend.createCharacter
createCollider(desc): BackendCollider<Dim2>;Defined in: src/plugins/physics/runtime/backend.ts:295
PhysicsWorldBackend.createCollider
createJoint(desc): BackendJoint;Defined in: src/plugins/physics/runtime/backend.ts:297
PhysicsWorldBackend.createJoint
drainCollisionEvents(fn): void;Defined in: src/plugins/physics/runtime/backend.ts:303
Contact pairs that started or stopped since the last drain (triggers included).
(collider1, collider2, started) => void
void
PhysicsWorldBackend.drainCollisionEvents
dropThrough(body): void;Defined in: src/plugins/physics/runtime/backend.ts:359
Capability oneWayPlatforms (ADR 0439): let body (a rigid body, or a character controller's own body) pass down
through every one-way collider it stands on or overlaps now. Each such pair stays dropping until the body's top is
below the collider's top, the two no longer touch, or 0.5 s have passed; one-way colliders it reaches later, and
solid ones, still hold it. A backend without the capability does nothing.
void
free(): void;Defined in: src/plugins/physics/runtime/backend.ts:291
void
linkVoxels?(
a,
b,
shift
): void;Defined in: src/plugins/physics/runtime/backend.ts:352
Capability voxelColliders (ADR 0444): make two voxel colliders whose cells meet or overlap treat the faces between
their cells as inside. Called once per pair, when the later of the two is made; setVoxels keeps it so. shift is
where b's cell (0, 0) is from a's, in cells.
void
overlap(
shape,
position,
rotation,
groups?
): number[];Defined in: src/plugins/physics/runtime/backend.ts:312
number
number
number[]
overlapPoint(point, groups?): number[];Defined in: src/plugins/physics/runtime/backend.ts:313
number
number[]
PhysicsWorldBackend.overlapPoint
raycast(
origin,
direction,
maxDistance,
groups?
): RayHit<Dim2> | null;Defined in: src/plugins/physics/runtime/backend.ts:308
direction is unit length; groups filters by layer (undefined: every collider).
number
number
removeBody(body): void;Defined in: src/plugins/physics/runtime/backend.ts:294
void
PhysicsWorldBackend.removeBody
removeCharacter(character): void;Defined in: src/plugins/physics/runtime/backend.ts:300
void
PhysicsWorldBackend.removeCharacter
removeCollider(collider): void;Defined in: src/plugins/physics/runtime/backend.ts:296
void
PhysicsWorldBackend.removeCollider
removeJoint(joint): void;Defined in: src/plugins/physics/runtime/backend.ts:298
void
PhysicsWorldBackend.removeJoint
setVoxels?(
collider,
changes,
neighbours
): void;Defined in: src/plugins/physics/runtime/backend.ts:346
Capability voxelColliders (ADR 0444): fill or empty cells of a voxels collider in place, then pass each change
on to neighbours (voxel colliders whose cells meet or overlap its own), so bodies sliding from one onto another
don't catch on the faces between them.
readonly VoxelChange2D[]
readonly VoxelLink2D[]
void
step(dt): void;Defined in: src/plugins/physics/runtime/backend.ts:290
number
void
This wiki is generated from docs/wiki/ and the myco module's source on every push to master. Change pages there in a pull request: edits made here are not kept.
Basics
Gameplay
Rendering
Audio
- Playing sound
- Why is there no sound?
- Playlists
- Interactive music
- Sound generators
- Spatial audio
- Audio mixer
- Live mixing
- Loudness
- Audio profiler
- Audio takes
Reference