2D physics types
Import these contracts with type from @pibbl/core/physics/2d. The pure geometry
subset is also available from @pibbl/core/physics/2d/geometry. For composition
recipes, see the 2D physics guide.
Geometry
Section titled “Geometry”PibblPhysicsVector2
Section titled “PibblPhysicsVector2”Readonly [x, y] coordinates.
PibblPhysicsPose2D
Section titled “PibblPhysicsPose2D”A position and Canvas-compatible rotationDegrees; transform is the pose alias
used by pure shape transformation.
PibblPhysicsTransform2D
Section titled “PibblPhysicsTransform2D”Alias of PibblPhysicsPose2D used by transformShape2D.
PibblPhysicsAabb2D
Section titled “PibblPhysicsAabb2D”Readonly minimum and maximum vector bounds.
PibblPhysicsRay2D
Section titled “PibblPhysicsRay2D”Origin, non-zero direction, and non-negative maximum distance.
PibblPhysicsShape2D
Section titled “PibblPhysicsShape2D”Nominal immutable descriptor made by a public shape factory. Its structure is opaque; do not create one with an object literal.
PibblPhysicsMassProperties2D
Section titled “PibblPhysicsMassProperties2D”Area, centroid, mass, and rotational inertia for a shape and density.
PibblPhysicsDistance2D
Section titled “PibblPhysicsDistance2D”Signed separation, closest points, and a normal from the second shape toward the first.
PibblPhysicsContactPoint2D
Section titled “PibblPhysicsContactPoint2D”Witness points with separation, and an overlap manifold with a second-to-first normal and one or more points.
PibblPhysicsShapeContact2D
Section titled “PibblPhysicsShapeContact2D”The overlap manifold returned by pure contact queries: a normal and readonly contact points.
PibblPhysicsShapeHit2D
Section titled “PibblPhysicsShapeHit2D”Ray or shape-cast point, normal, distance, and normalized time of impact.
World, descriptors, and handles
Section titled “World, descriptors, and handles”PibblPhysicsWorld2DProps
Section titled “PibblPhysicsWorld2DProps”Signal-aware PhysicsWorld2D input: creation-only coordinate space, gravity,
fixed step, catch-up cap, interpolation, sleeping, solver settings, sleep and
wake handlers, error handler, and children. space is "root" or
creation-only "local".
PibblPhysicsSolverOptions
Section titled “PibblPhysicsSolverOptions”Reactive 1-through-32 iteration counts. Legacy public velocityIterations
maps to Rapier numSolverIterations; positionIterations maps to
numInternalPgsIterations.
PibblPhysicsWorldHandle2D
Section titled “PibblPhysicsWorldHandle2D”Nominal pibblPhysicsWorld2D() result with a readonly revision signal.
PibblPhysicsAttachment2D
Section titled “PibblPhysicsAttachment2D”Nominal values accepted by a Pibbl physics prop. Create them with descriptor
functions, never object literals.
PibblPhysicsBodyAttachment2D
Section titled “PibblPhysicsBodyAttachment2D”Nominal body attachment made by dynamicBody2D, staticBody2D, or
kinematicBody2D.
PibblPhysicsColliderAttachment2D
Section titled “PibblPhysicsColliderAttachment2D”Nominal collider attachment made by collider2D.
PibblPhysicsDynamicBody2DOptions
Section titled “PibblPhysicsDynamicBody2DOptions”Dynamic configuration: enabled state, supplied handle, initial velocities, damping, gravity scale, automatic or explicit mass, fixed rotation, sleep, CCD, re-enable velocity mode, and optional inline collider.
PibblPhysicsStaticBody2DOptions
Section titled “PibblPhysicsStaticBody2DOptions”Static enabled state, supplied handle, and optional inline collider.
PibblPhysicsKinematicBody2DOptions
Section titled “PibblPhysicsKinematicBody2DOptions”Kinematic configuration with optional position and rotation signals. Targets are sampled by Pibbl’s shared scheduler.
PibblPhysicsKinematicTarget2D
Section titled “PibblPhysicsKinematicTarget2D”Optional readonly position and rotation signal targets for a kinematic body.
PibblPhysicsColliderConfiguration2D
Section titled “PibblPhysicsColliderConfiguration2D”Supplied or inferred shape, local offset and rotation, density, friction, restitution, sensor flag, mass contribution, filtering, tag, and event callbacks.
PibblPhysicsCollisionFilter
Section titled “PibblPhysicsCollisionFilter”Category, mask, and group values that determine eligible interactions and queries.
PibblPhysicsBodyHandle2D
Section titled “PibblPhysicsBodyHandle2D”Stable endpoint with readonly signals for pose, linear and angular velocity, sleeping, enabled state, and generation.
PibblPhysicsColliderHandle2D
Section titled “PibblPhysicsColliderHandle2D”Nominal identity used in query filtering and returned records.
Query and event contracts
Section titled “Query and event contracts”PibblPhysicsQueryOptions2D
Section titled “PibblPhysicsQueryOptions2D”Sensor, collision-filter, and body/collider-exclusion input for a world query.
PibblPhysicsQueryHit2D
Section titled “PibblPhysicsQueryHit2D”Committed-world records with body and collider handles, generations, and the arbitrary collider tag. A hit also carries cast geometry.
PibblPhysicsQueryMatch2D
Section titled “PibblPhysicsQueryMatch2D”Committed overlap or point-query record with endpoint handles, generations, and original tag.
PibblPhysicsCollisionEvent2D
Section titled “PibblPhysicsCollisionEvent2D”Solid-contact callback data: both endpoints, second-to-self normal, contact points, total normal impulse, tick, and tags.
PibblPhysicsCollisionHandler2D
Section titled “PibblPhysicsCollisionHandler2D”Callback accepting a PibblPhysicsCollisionEvent2D.
PibblPhysicsOverlapEvent2D
Section titled “PibblPhysicsOverlapEvent2D”Sensor-overlap callback data: both endpoints, tick, and tags.
PibblPhysicsOverlapHandler2D
Section titled “PibblPhysicsOverlapHandler2D”Callback accepting a PibblPhysicsOverlapEvent2D.
PibblPhysicsHitHandler2D
Section titled “PibblPhysicsHitHandler2D”Collision-event callback for contact impacts.
PibblPhysicsBodyStateEvent2D
Section titled “PibblPhysicsBodyStateEvent2D”Sleep or wake notification with body, sleeping state, and simulation tick.
PibblPhysicsBodyStateHandler2D
Section titled “PibblPhysicsBodyStateHandler2D”Callback accepting a PibblPhysicsBodyStateEvent2D.
Inspection and debug drawing
Section titled “Inspection and debug drawing”PibblPhysicsInspection2D
Section titled “PibblPhysicsInspection2D”Immutable JSON-safe world observation: engine identity, coordinate space, revision, tick, advance/failure state, bodies, colliders, and contacts. It is not a serialization or restore format.
PibblPhysicsBodyInspection2D
Section titled “PibblPhysicsBodyInspection2D”Body identity, generation, type, enabled and sleeping state, simulation and presentation poses, center of mass, velocities, and applicable mass.
PibblPhysicsColliderInspection2D
Section titled “PibblPhysicsColliderInspection2D”Collider and owner identities, sensor state, serializable string label, shape kinds, and committed bounds.
PibblPhysicsContactInspection2D
Section titled “PibblPhysicsContactInspection2D”Collider identities, sensor state, second-to-first normal, points, and normal impulse.
PibblPhysicsDebug2DProps
Section titled “PibblPhysicsDebug2DProps”Input for PhysicsDebug2D: required world handle and optional Canvas color.
The overlay is read-only and has no pointer target.
Canvas shape inputs
Section titled “Canvas shape inputs”PibblPhysicsPrimitiveProps2D
Section titled “PibblPhysicsPrimitiveProps2D”Shared event, keyboard, and physics props for physics-aware primitives.
PhysicsShape2DProps
Section titled “PhysicsShape2DProps”Props and style for a supplied shape. Style requires shape, supports normal
Canvas system, paint, cursor, box, and layout fields, plus interaction width.
PhysicsShape2DStyle
Section titled “PhysicsShape2DStyle”The specified style input for PhysicsShape2D.
Capsule2DProps
Section titled “Capsule2DProps”Props and style for start, end, and positive radius.
Capsule2DStyle
Section titled “Capsule2DStyle”Specified Canvas and capsule geometry style for Capsule2D.
Segment2DProps
Section titled “Segment2DProps”Props and stroked segment style with endpoints and interaction width; no fill.
Segment2DStyle
Section titled “Segment2DStyle”Specified stroked Canvas style and endpoint geometry for Segment2D.
Chain2DProps
Section titled “Chain2DProps”Props and style for points, optional closure, non-negative radius, and interaction width.
Chain2DStyle
Section titled “Chain2DStyle”Specified Canvas and chain geometry style for Chain2D.
API details from source
Section titled “API details from source”
PibblPhysicsCollisionFilter
Section titled “PibblPhysicsCollisionFilter”Category, mask, and group values controlling eligible collision pairs.
interface PibblPhysicsCollisionFilterRelated API: PibblPhysicsCollisionFilter.
See also
Section titled “See also”PibblPhysicsColliderConfiguration2D
View source — packages/core/src/features/physics/lib/2d/types.ts:32
Properties and methods
Section titled “Properties and methods”
category (optional)
readonly category?: number | undefinedCategory bits identifying this collider for collision filtering. See PibblPhysicsCollisionFilter.
View source — packages/core/src/features/physics/lib/2d/types.ts:34
mask (optional)
readonly mask?: number | undefinedCategory bits this collider is permitted to collide with. See PibblPhysicsCollisionFilter.
View source — packages/core/src/features/physics/lib/2d/types.ts:36
group (optional)
readonly group?: number | undefinedSigned group override used when filtering a collider pair. See PibblPhysicsCollisionFilter.
View source — packages/core/src/features/physics/lib/2d/types.ts:38
PibblPhysicsCollisionHandler2D
Section titled “PibblPhysicsCollisionHandler2D”Receives a collision-start or collision-end event for a collider.
type PibblPhysicsCollisionHandler2D = ( event: PibblPhysicsCollisionEvent2D,) => voidRelated API: PibblPhysicsCollisionHandler2D, PibblPhysicsCollisionEvent2D.
Parameters
Section titled “Parameters”event— Collision pair and contact information for this notification. See PibblPhysicsCollisionEvent2D .
See also
Section titled “See also”PibblPhysicsColliderConfiguration2D
View source — packages/core/src/features/physics/lib/2d/types.ts:50
PibblPhysicsHitHandler2D
Section titled “PibblPhysicsHitHandler2D”Receives contact impulse information for a collider hit.
type PibblPhysicsHitHandler2D = ( event: PibblPhysicsCollisionEvent2D,) => voidRelated API: PibblPhysicsHitHandler2D, PibblPhysicsCollisionEvent2D.
Parameters
Section titled “Parameters”event— Collision pair and contact information for this notification. See PibblPhysicsCollisionEvent2D .
See also
Section titled “See also”PibblPhysicsColliderConfiguration2D
View source — packages/core/src/features/physics/lib/2d/types.ts:62
PibblPhysicsOverlapHandler2D
Section titled “PibblPhysicsOverlapHandler2D”Receives sensor overlap-start or overlap-end notifications.
type PibblPhysicsOverlapHandler2D = ( event: PibblPhysicsOverlapEvent2D,) => voidRelated API: PibblPhysicsOverlapHandler2D, PibblPhysicsOverlapEvent2D.
Parameters
Section titled “Parameters”event— Sensor overlap pair and overlap lifecycle information. See PibblPhysicsOverlapEvent2D .
See also
Section titled “See also”PibblPhysicsColliderConfiguration2D
View source — packages/core/src/features/physics/lib/2d/types.ts:74
PibblPhysicsBodyStateHandler2D
Section titled “PibblPhysicsBodyStateHandler2D”Receives body sleeping-state changes at a simulation tick.
type PibblPhysicsBodyStateHandler2D = ( event: PibblPhysicsBodyStateEvent2D,) => voidRelated API: PibblPhysicsBodyStateHandler2D, PibblPhysicsBodyStateEvent2D.
Parameters
Section titled “Parameters”event— Body state change notification. See PibblPhysicsBodyStateEvent2D.
See also
Section titled “See also”View source — packages/core/src/features/physics/lib/2d/types.ts:84
PibblPhysicsColliderConfiguration2D
Section titled “PibblPhysicsColliderConfiguration2D”Shape, material, mass contribution, filtering, tags, and callbacks for a collider attachment.
interface PibblPhysicsColliderConfiguration2DRelated API: PibblPhysicsColliderConfiguration2D.
See also
Section titled “See also”PibblPhysicsCollisionHandler2D
View source — packages/core/src/features/physics/lib/2d/types.ts:98
Properties and methods
Section titled “Properties and methods”
shape (optional)
readonly shape?: "self" | PibblPhysicsShape2D | undefinedRelated API: PibblPhysicsShape2D.
Immutable collision geometry or particle spawn shape. See PibblPhysicsShape2D.
View source — packages/core/src/features/physics/lib/2d/types.ts:100
offset (optional)
readonly offset?: PibblPhysicsVector2 | undefinedRelated API: PibblPhysicsVector2.
Collider displacement relative to its owning body. See PibblPhysicsVector2.
View source — packages/core/src/features/physics/lib/2d/types.ts:102
rotationDegrees (optional)
readonly rotationDegrees?: number | undefinedRotation in degrees. See PibblPhysicsColliderConfiguration2D.
View source — packages/core/src/features/physics/lib/2d/types.ts:104
density (optional)
readonly density?: number | undefinedMass per unit area used to derive automatic mass properties. See PibblPhysicsColliderConfiguration2D.
View source — packages/core/src/features/physics/lib/2d/types.ts:109
friction (optional)
readonly friction?: number | undefinedContact friction coefficient. See PibblPhysicsColliderConfiguration2D.
View source — packages/core/src/features/physics/lib/2d/types.ts:111
restitution (optional)
readonly restitution?: number | undefinedContact restitution coefficient controlling bounce. See PibblPhysicsColliderConfiguration2D.
View source — packages/core/src/features/physics/lib/2d/types.ts:116
sensor (optional)
readonly sensor?: boolean | undefinedWhether the collider reports overlaps instead of producing contact response. See PibblPhysicsColliderConfiguration2D.
View source — packages/core/src/features/physics/lib/2d/types.ts:121
contributesToMass (optional)
readonly contributesToMass?: boolean | undefinedWhether this collider contributes to its body’s automatic mass properties. See PibblPhysicsColliderConfiguration2D.
View source — packages/core/src/features/physics/lib/2d/types.ts:126
collisionFilter (optional)
readonly collisionFilter?: PibblPhysicsCollisionFilter | undefinedRelated API: PibblPhysicsCollisionFilter.
Category, mask, and group filtering for collision or query participation. See PibblPhysicsCollisionFilter.
View source — packages/core/src/features/physics/lib/2d/types.ts:131
tag (optional)
readonly tag?: unknownApplication payload carried through physics queries and events. See PibblPhysicsColliderConfiguration2D.
View source — packages/core/src/features/physics/lib/2d/types.ts:136
onCollisionStart (optional)
readonly onCollisionStart?: PibblPhysicsCollisionHandler2D | undefinedRelated API: PibblPhysicsCollisionHandler2D.
Receives the start of a contact pair involving this collider. See PibblPhysicsCollisionHandler2D.
View source — packages/core/src/features/physics/lib/2d/types.ts:141
onCollisionEnd (optional)
readonly onCollisionEnd?: PibblPhysicsCollisionHandler2D | undefinedRelated API: PibblPhysicsCollisionHandler2D.
Receives the end of a contact pair involving this collider. See PibblPhysicsCollisionHandler2D.
View source — packages/core/src/features/physics/lib/2d/types.ts:146
onHit (optional)
readonly onHit?: PibblPhysicsHitHandler2D | undefinedRelated API: PibblPhysicsHitHandler2D.
Receives contact impulse information for this collider. See PibblPhysicsHitHandler2D.
View source — packages/core/src/features/physics/lib/2d/types.ts:148
onOverlapStart (optional)
readonly onOverlapStart?: PibblPhysicsOverlapHandler2D | undefinedRelated API: PibblPhysicsOverlapHandler2D.
Receives the start of a sensor overlap involving this collider. See PibblPhysicsOverlapHandler2D.
View source — packages/core/src/features/physics/lib/2d/types.ts:153
onOverlapEnd (optional)
readonly onOverlapEnd?: PibblPhysicsOverlapHandler2D | undefinedRelated API: PibblPhysicsOverlapHandler2D.
Receives the end of a sensor overlap involving this collider. See PibblPhysicsOverlapHandler2D.
View source — packages/core/src/features/physics/lib/2d/types.ts:158
PibblPhysicsDynamicBody2DOptions
Section titled “PibblPhysicsDynamicBody2DOptions”Initial motion, mass, damping, gravity, sleeping, and collider configuration of a dynamic body.
interface PibblPhysicsDynamicBody2DOptionsRelated API: PibblPhysicsDynamicBody2DOptions.
See also
Section titled “See also”PibblPhysicsColliderConfiguration2D
View source — packages/core/src/features/physics/lib/2d/types.ts:170
Properties and methods
Section titled “Properties and methods”
enabled (optional)
readonly enabled?: boolean | undefinedWhether this operation or resource participates in updates. See PibblPhysicsDynamicBody2DOptions.
View source — packages/core/src/features/physics/lib/2d/types.ts:175
handle (optional)
readonly handle?: PibblPhysicsBodyHandle2D | undefinedRelated API: PibblPhysicsBodyHandle2D.
Handle identity associated with the operation or body. See PibblPhysicsBodyHandle2D.
View source — packages/core/src/features/physics/lib/2d/types.ts:177
linearVelocity (optional)
readonly linearVelocity?: PibblPhysicsVector2 | undefinedRelated API: PibblPhysicsVector2.
Linear velocity in the simulation coordinate system per second. See PibblPhysicsVector2 .
View source — packages/core/src/features/physics/lib/2d/types.ts:182
angularVelocityDegreesPerSecond (optional)
readonly angularVelocityDegreesPerSecond?: number | undefinedAngular velocity in degrees per second. See PibblPhysicsDynamicBody2DOptions.
View source — packages/core/src/features/physics/lib/2d/types.ts:184
linearDamping (optional)
readonly linearDamping?: number | undefinedDamping applied to linear motion. See PibblPhysicsDynamicBody2DOptions.
View source — packages/core/src/features/physics/lib/2d/types.ts:186
angularDamping (optional)
readonly angularDamping?: number | undefinedDamping applied to angular motion. See PibblPhysicsDynamicBody2DOptions.
View source — packages/core/src/features/physics/lib/2d/types.ts:188
gravityScale (optional)
readonly gravityScale?: number | undefinedMultiplier applied to world gravity for this body. See PibblPhysicsDynamicBody2DOptions .
View source — packages/core/src/features/physics/lib/2d/types.ts:193
mass (optional)
readonly mass?: number | "auto" | undefinedMass used by the spring or physics calculation. See PibblPhysicsDynamicBody2DOptions.
View source — packages/core/src/features/physics/lib/2d/types.ts:195
fixedRotation (optional)
readonly fixedRotation?: boolean | undefinedWhether angular motion is locked. See PibblPhysicsDynamicBody2DOptions.
View source — packages/core/src/features/physics/lib/2d/types.ts:197
allowSleep (optional)
readonly allowSleep?: boolean | undefinedWhether the body may enter the sleeping state. See PibblPhysicsDynamicBody2DOptions.
View source — packages/core/src/features/physics/lib/2d/types.ts:199
ccd (optional)
readonly ccd?: boolean | undefinedWhether continuous collision detection is enabled for the body. See PibblPhysicsDynamicBody2DOptions.
View source — packages/core/src/features/physics/lib/2d/types.ts:204
reenableVelocity (optional)
readonly reenableVelocity?: "preserve" | "zero" | undefinedWhether re-enabling restores or clears the body’s velocity. See PibblPhysicsDynamicBody2DOptions.
View source — packages/core/src/features/physics/lib/2d/types.ts:209
collider (optional)
readonly collider?: false | PibblPhysicsColliderConfiguration2D | PibblPhysicsShape2D | undefinedRelated API: PibblPhysicsColliderConfiguration2D, PibblPhysicsShape2D.
Collider configuration or identity associated with this body or query. See PibblPhysicsColliderConfiguration2D, PibblPhysicsShape2D.
View source — packages/core/src/features/physics/lib/2d/types.ts:214
PibblPhysicsStaticBody2DOptions
Section titled “PibblPhysicsStaticBody2DOptions”Enablement, handle, and collider configuration of a static body.
interface PibblPhysicsStaticBody2DOptionsRelated API: PibblPhysicsStaticBody2DOptions.
See also
Section titled “See also”PibblPhysicsColliderConfiguration2D
View source — packages/core/src/features/physics/lib/2d/types.ts:225
Properties and methods
Section titled “Properties and methods”
enabled (optional)
readonly enabled?: boolean | undefinedWhether this operation or resource participates in updates. See PibblPhysicsStaticBody2DOptions.
View source — packages/core/src/features/physics/lib/2d/types.ts:230
handle (optional)
readonly handle?: PibblPhysicsBodyHandle2D | undefinedRelated API: PibblPhysicsBodyHandle2D.
Handle identity associated with the operation or body. See PibblPhysicsBodyHandle2D.
View source — packages/core/src/features/physics/lib/2d/types.ts:232
collider (optional)
readonly collider?: false | PibblPhysicsColliderConfiguration2D | PibblPhysicsShape2D | undefinedRelated API: PibblPhysicsColliderConfiguration2D, PibblPhysicsShape2D.
Collider configuration or identity associated with this body or query. See PibblPhysicsColliderConfiguration2D, PibblPhysicsShape2D.
View source — packages/core/src/features/physics/lib/2d/types.ts:237
PibblPhysicsKinematicTarget2D
Section titled “PibblPhysicsKinematicTarget2D”Reactive position and rotation targets for a kinematic body.
interface PibblPhysicsKinematicTarget2DRelated API: PibblPhysicsKinematicTarget2D.
See also
Section titled “See also”PibblPhysicsKinematicBody2DOptions
View source — packages/core/src/features/physics/lib/2d/types.ts:247
Properties and methods
Section titled “Properties and methods”
position (optional)
readonly position?: Signal<PibblPhysicsVector2> | undefinedRelated API: Signal, PibblPhysicsVector2.
Position of the geometry, source, or selected resize handle. See Signal, PibblPhysicsVector2.
View source — packages/core/src/features/physics/lib/2d/types.ts:252
rotationDegrees (optional)
readonly rotationDegrees?: Signal<number> | undefinedRelated API: Signal.
Rotation in degrees. See Signal.
View source — packages/core/src/features/physics/lib/2d/types.ts:254
PibblPhysicsKinematicBody2DOptions
Section titled “PibblPhysicsKinematicBody2DOptions”Target signals, handle, enablement, and collider configuration of a kinematic body.
interface PibblPhysicsKinematicBody2DOptionsRelated API: PibblPhysicsKinematicBody2DOptions.
See also
Section titled “See also”PibblPhysicsColliderConfiguration2D
View source — packages/core/src/features/physics/lib/2d/types.ts:266
Properties and methods
Section titled “Properties and methods”
enabled (optional)
readonly enabled?: boolean | undefinedWhether this operation or resource participates in updates. See PibblPhysicsKinematicBody2DOptions.
View source — packages/core/src/features/physics/lib/2d/types.ts:271
handle (optional)
readonly handle?: PibblPhysicsBodyHandle2D | undefinedRelated API: PibblPhysicsBodyHandle2D.
Handle identity associated with the operation or body. See PibblPhysicsBodyHandle2D.
View source — packages/core/src/features/physics/lib/2d/types.ts:273
target (optional)
readonly target?: PibblPhysicsKinematicTarget2D | undefinedRelated API: PibblPhysicsKinematicTarget2D.
The selected logical target or target configuration. See PibblPhysicsKinematicTarget2D.
View source — packages/core/src/features/physics/lib/2d/types.ts:277
allowSleep (optional)
readonly allowSleep?: boolean | undefinedWhether the body may enter the sleeping state. See PibblPhysicsKinematicBody2DOptions.
View source — packages/core/src/features/physics/lib/2d/types.ts:281
collider (optional)
readonly collider?: false | PibblPhysicsColliderConfiguration2D | PibblPhysicsShape2D | undefinedRelated API: PibblPhysicsColliderConfiguration2D, PibblPhysicsShape2D.
Collider configuration or identity associated with this body or query. See PibblPhysicsColliderConfiguration2D, PibblPhysicsShape2D.
View source — packages/core/src/features/physics/lib/2d/types.ts:286
PibblPhysicsBodyAttachment2D
Section titled “PibblPhysicsBodyAttachment2D”A branded body descriptor attached to supported Canvas primitives.
interface PibblPhysicsBodyAttachment2DRelated API: PibblPhysicsBodyAttachment2D.
See also
Section titled “See also”View source — packages/core/src/features/physics/lib/2d/types.ts:297
PibblPhysicsColliderAttachment2D
Section titled “PibblPhysicsColliderAttachment2D”A branded collider descriptor attached under a physics body.
interface PibblPhysicsColliderAttachment2DRelated API: PibblPhysicsColliderAttachment2D.
See also
Section titled “See also”View source — packages/core/src/features/physics/lib/2d/types.ts:306
PibblPhysicsAttachment2D
Section titled “PibblPhysicsAttachment2D”A body or collider descriptor accepted by a physics-aware primitive.
type PibblPhysicsAttachment2D = PibblPhysicsBodyAttachment2D | PibblPhysicsColliderAttachment2DRelated API: PibblPhysicsAttachment2D, PibblPhysicsBodyAttachment2D, PibblPhysicsColliderAttachment2D.
See also
Section titled “See also”PibblPhysicsColliderAttachment2D
View source — packages/core/src/features/physics/lib/2d/types.ts:316
PibblPhysicsSolverOptions
Section titled “PibblPhysicsSolverOptions”Iteration budgets controlling the 2D solver’s velocity and position work.
interface PibblPhysicsSolverOptionsRelated API: PibblPhysicsSolverOptions.
See also
Section titled “See also”View source — packages/core/src/features/physics/lib/2d/types.ts:330
Properties and methods
Section titled “Properties and methods”
velocityIterations (optional)
readonly velocityIterations?: number | undefinedSolver iteration budget for velocity constraints. See PibblPhysicsSolverOptions.
View source — packages/core/src/features/physics/lib/2d/types.ts:332
positionIterations (optional)
readonly positionIterations?: number | undefinedSolver iteration budget for position constraints. See PibblPhysicsSolverOptions.
View source — packages/core/src/features/physics/lib/2d/types.ts:334
PibblPhysicsWorld2DProps
Section titled “PibblPhysicsWorld2DProps”World configuration with signal-capable values and ordinary Pibbl children.
type PibblPhysicsWorld2DProps = { readonly [K in keyof PibblPhysicsWorld2DValues]: K extends "children" ? PibblPhysicsWorld2DValues[K] : SignalValue<PibblPhysicsWorld2DValues[K]>;}Related API: PibblPhysicsWorld2DProps, SignalValue.
See also
Section titled “See also”View source — packages/core/src/features/physics/lib/2d/types.ts:362
Properties and methods
Section titled “Properties and methods”
space (optional)
readonly space?: SignalValue<"local" | "root" | undefined>Related API: SignalValue.
Local space follows the world component viewport; root preserves root-logical coordinates. Creation-only.
View source — packages/core/src/features/physics/lib/2d/types.ts:342
gravity (optional)
readonly gravity?: SignalValue<PibblPhysicsVector2 | undefined>Related API: SignalValue, PibblPhysicsVector2.
View source — packages/core/src/features/physics/lib/2d/types.ts:343
fixedStepMilliseconds (optional)
readonly fixedStepMilliseconds?: SignalValue<number | undefined>Related API: SignalValue.
View source — packages/core/src/features/physics/lib/2d/types.ts:344
maxCatchUpSteps (optional)
readonly maxCatchUpSteps?: SignalValue<number | undefined>Related API: SignalValue.
View source — packages/core/src/features/physics/lib/2d/types.ts:345
interpolation (optional)
readonly interpolation?: SignalValue<"linear" | "none" | undefined>Related API: SignalValue.
View source — packages/core/src/features/physics/lib/2d/types.ts:346
sleeping (optional)
readonly sleeping?: SignalValue<boolean | undefined>Related API: SignalValue.
View source — packages/core/src/features/physics/lib/2d/types.ts:347
solver (optional)
readonly solver?: SignalValue<PibblPhysicsSolverOptions | undefined>Related API: SignalValue, PibblPhysicsSolverOptions.
View source — packages/core/src/features/physics/lib/2d/types.ts:348
onSleep (optional)
readonly onSleep?: SignalValue<PibblPhysicsBodyStateHandler2D | undefined>Related API: SignalValue, PibblPhysicsBodyStateHandler2D.
View source — packages/core/src/features/physics/lib/2d/types.ts:349
onWake (optional)
readonly onWake?: SignalValue<PibblPhysicsBodyStateHandler2D | undefined>Related API: SignalValue, PibblPhysicsBodyStateHandler2D.
View source — packages/core/src/features/physics/lib/2d/types.ts:350
onError (optional)
readonly onError?: SignalValue<((error: unknown) => void) | undefined>Related API: SignalValue.
View source — packages/core/src/features/physics/lib/2d/types.ts:351
children (optional)
readonly children?: PibblNodeInputRelated API: PibblNodeInput.
View source — packages/core/src/features/physics/lib/2d/types.ts:352
PibblPhysicsPrimitiveProps2D
Section titled “PibblPhysicsPrimitiveProps2D”Interaction and physics attachment props shared by physics-aware primitives.
interface PibblPhysicsPrimitiveProps2D extends PibblEventHandlers, PibblEventParticipationOptionsRelated API: PibblPhysicsPrimitiveProps2D, PibblEventHandlers, PibblEventParticipationOptions.
See also
Section titled “See also”PibblEventParticipationOptions
View source — packages/core/src/features/physics/lib/2d/types.ts:378
Properties and methods
Section titled “Properties and methods”
keyboardFocusable (optional)
readonly keyboardFocusable?: boolean | undefinedWhether the target may receive keyboard focus. See PibblPhysicsPrimitiveProps2D.
View source — packages/core/src/features/physics/lib/2d/types.ts:381
keyboardNavigationBounds (optional)
readonly keyboardNavigationBounds?: Readonly<LayoutBox> | undefinedRelated API: LayoutBox.
Logical rectangle used for directional keyboard navigation. See LayoutBox.
View source — packages/core/src/features/physics/lib/2d/types.ts:383
physics (optional)
readonly physics?: PibblPhysicsAttachment2D | undefinedRelated API: PibblPhysicsAttachment2D.
Declarative body or collider attachment for this primitive. See PibblPhysicsAttachment2D .
View source — packages/core/src/features/physics/lib/2d/types.ts:388
pointerEvents (optional)
readonly pointerEvents?: PibblPointerEvents | undefinedRelated API: PibblPointerEvents.
Whether this content participates in pointer targeting. See PibblPointerEvents.
PhysicsShape2DProps
Section titled “PhysicsShape2DProps”Authored inputs for PhysicsShape2D, including the declared data and presentation options.
interface PhysicsShape2DProps extends PibblPhysicsPrimitiveProps2DRelated API: PhysicsShape2DProps, PibblPhysicsPrimitiveProps2D.
See also
Section titled “See also”View source — packages/core/src/features/physics/lib/2d/types.ts:397
Properties and methods
Section titled “Properties and methods”
pointerEvents (optional)
readonly pointerEvents?: PibblPointerEvents | undefinedRelated API: PibblPointerEvents.
Whether this content participates in pointer targeting. See PibblPointerEvents.
keyboardFocusable (optional)
readonly keyboardFocusable?: boolean | undefinedWhether the target may receive keyboard focus. See PibblPhysicsPrimitiveProps2D.
View source — packages/core/src/features/physics/lib/2d/types.ts:381
keyboardNavigationBounds (optional)
readonly keyboardNavigationBounds?: Readonly<LayoutBox> | undefinedRelated API: LayoutBox.
Logical rectangle used for directional keyboard navigation. See LayoutBox.
View source — packages/core/src/features/physics/lib/2d/types.ts:383
physics (optional)
readonly physics?: PibblPhysicsAttachment2D | undefinedRelated API: PibblPhysicsAttachment2D.
Declarative body or collider attachment for this primitive. See PibblPhysicsAttachment2D .
View source — packages/core/src/features/physics/lib/2d/types.ts:388
PhysicsShape2DStyle
Section titled “PhysicsShape2DStyle”Supported geometry and presentation properties for PhysicsShape2D.
interface PhysicsShape2DStyle extends SystemStyle, PaintStyle, CursorStyle, BoxStyle, LayoutItemStyleRelated API: PhysicsShape2DStyle, SystemStyle, PaintStyle, CursorStyle, BoxStyle, LayoutItemStyle.
See also
Section titled “See also”View source — packages/core/src/features/physics/lib/2d/types.ts:409
Properties and methods
Section titled “Properties and methods”
shape
readonly shape: PibblPhysicsShape2DRelated API: PibblPhysicsShape2D.
Immutable collision geometry or particle spawn shape. See PibblPhysicsShape2D.
View source — packages/core/src/features/physics/lib/2d/types.ts:412
lineInteractionWidth (optional)
readonly lineInteractionWidth?: number | undefinedWidth used for line hit testing independently of the visible stroke width. See PhysicsShape2DStyle.
View source — packages/core/src/features/physics/lib/2d/types.ts:417
left (optional)
left?: number | `${number}%` | undefinedLeft edge coordinate or inset. See Length.
View source — packages/core/src/lib/style/positioning.ts:127
top (optional)
top?: number | `${number}%` | undefinedTop edge value or top envelope guide. See Length.
View source — packages/core/src/lib/style/positioning.ts:129
width (optional)
width?: Length | undefinedRelated API: Length.
Horizontal extent in the units of the containing geometry or surface. See Length.
height (optional)
height?: Length | undefinedRelated API: Length.
Vertical extent in the units of the containing geometry or surface. See Length.
minWidth (optional)
minWidth?: number | `${number}%` | undefinedMinimum permitted width. See Length.
maxWidth (optional)
maxWidth?: number | `${number}%` | undefinedMaximum permitted width. See Length.
minHeight (optional)
minHeight?: number | `${number}%` | undefinedMinimum permitted height. See Length.
maxHeight (optional)
maxHeight?: number | `${number}%` | undefinedMaximum permitted height. See Length.
padding (optional)
padding?: EdgeValues | undefinedRelated API: EdgeValues.
Insets between the border box and content box. See EdgeValues.
overflow (optional)
overflow?: "clip" | "visible" | undefinedSelects "visible", "clip" for overflow. See BoxStyle.
alignSelf (optional)
alignSelf?: "auto" | "center" | "end" | "flex-end" | "flex-start" | "start" | "stretch" | undefinedThis child’s cross-axis or block-axis alignment override. See LayoutItemStyle.
justifySelf (optional)
justifySelf?: "auto" | "center" | "end" | "start" | "stretch" | undefinedThis child’s inline-axis alignment override. See LayoutItemStyle.
flexBasis (optional)
flexBasis?: Length | undefinedRelated API: Length.
Initial main-axis size before flex growth or shrinkage. See Length.
flexGrow (optional)
flexGrow?: number | undefinedRelative share of positive free space assigned to this child. See LayoutItemStyle.
flexShrink (optional)
flexShrink?: number | undefinedRelative factor used when reducing main-axis size. See LayoutItemStyle.
gridColumnStart (optional)
gridColumnStart?: number | undefinedExplicit starting grid column. See LayoutItemStyle.
gridColumnSpan (optional)
gridColumnSpan?: number | undefinedNumber of columns occupied by this child. See LayoutItemStyle.
gridRowStart (optional)
gridRowStart?: number | undefinedExplicit starting grid row. See LayoutItemStyle.
gridRowSpan (optional)
gridRowSpan?: number | undefinedNumber of rows occupied by this child. See LayoutItemStyle.
fill (optional)
fill?: FillStyle | undefinedRelated API: FillStyle.
Paint used for the interior. See FillStyle.
stroke (optional)
stroke?: StrokeStyle | undefinedRelated API: StrokeStyle.
Paint used for the outline. See StrokeStyle.
strokeWidth (optional)
strokeWidth?: number | undefinedWidth of the painted outline. See PaintStyle.
opacity (optional)
opacity?: number | undefinedRelated API: opacity.
Opacity of the painted result. See PaintStyle.
cursor (optional)
cursor?: string | undefinedCursor shown while this target owns pointer presentation. See CursorStyle.
transition (optional)
transition?: PibblTransitionBinding | undefinedRelated API: PibblTransitionBinding.
Visibility-transition binding applied to this primitive and its captured descendants. See SystemStyle.
custom (optional)
custom?: unknownApplication-defined style payload passed through the runtime. See SystemStyle.
filter (optional)
filter?: PibblFilter | readonly PibblFilter[] | undefinedRelated API: PibblFilter.
Ordered pixel-only filters applied to the receiving primitive and its descendants. See PibblFilter.
Capsule2DProps
Section titled “Capsule2DProps”Authored inputs for Capsule2D, including the declared data and presentation options.
interface Capsule2DProps extends PibblPhysicsPrimitiveProps2DRelated API: Capsule2DProps, PibblPhysicsPrimitiveProps2D.
See also
Section titled “See also”View source — packages/core/src/features/physics/lib/2d/types.ts:426
Properties and methods
Section titled “Properties and methods”
pointerEvents (optional)
readonly pointerEvents?: PibblPointerEvents | undefinedRelated API: PibblPointerEvents.
Whether this content participates in pointer targeting. See PibblPointerEvents.
keyboardFocusable (optional)
readonly keyboardFocusable?: boolean | undefinedWhether the target may receive keyboard focus. See PibblPhysicsPrimitiveProps2D.
View source — packages/core/src/features/physics/lib/2d/types.ts:381
keyboardNavigationBounds (optional)
readonly keyboardNavigationBounds?: Readonly<LayoutBox> | undefinedRelated API: LayoutBox.
Logical rectangle used for directional keyboard navigation. See LayoutBox.
View source — packages/core/src/features/physics/lib/2d/types.ts:383
physics (optional)
readonly physics?: PibblPhysicsAttachment2D | undefinedRelated API: PibblPhysicsAttachment2D.
Declarative body or collider attachment for this primitive. See PibblPhysicsAttachment2D .
View source — packages/core/src/features/physics/lib/2d/types.ts:388
Capsule2DStyle
Section titled “Capsule2DStyle”Supported geometry and presentation properties for Capsule2D.
interface Capsule2DStyle extends SystemStyle, PaintStyle, CursorStyle, BoxStyle, LayoutItemStyleRelated API: Capsule2DStyle, SystemStyle, PaintStyle, CursorStyle, BoxStyle, LayoutItemStyle.
See also
Section titled “See also”View source — packages/core/src/features/physics/lib/2d/types.ts:438
Properties and methods
Section titled “Properties and methods”
start
readonly start: PibblPhysicsVector2Related API: PibblPhysicsVector2.
First endpoint of the shape. See PibblPhysicsVector2.
View source — packages/core/src/features/physics/lib/2d/types.ts:441
end
readonly end: PibblPhysicsVector2Related API: PibblPhysicsVector2.
Last endpoint of the shape. See PibblPhysicsVector2.
View source — packages/core/src/features/physics/lib/2d/types.ts:443
radius
readonly radius: numberRadius in the coordinate system of this geometry or effect. See Capsule2DStyle.
View source — packages/core/src/features/physics/lib/2d/types.ts:445
lineInteractionWidth (optional)
readonly lineInteractionWidth?: number | undefinedWidth used for line hit testing independently of the visible stroke width. See Capsule2DStyle.
View source — packages/core/src/features/physics/lib/2d/types.ts:450
left (optional)
left?: number | `${number}%` | undefinedLeft edge coordinate or inset. See Length.
View source — packages/core/src/lib/style/positioning.ts:127
top (optional)
top?: number | `${number}%` | undefinedTop edge value or top envelope guide. See Length.
View source — packages/core/src/lib/style/positioning.ts:129
width (optional)
width?: Length | undefinedRelated API: Length.
Horizontal extent in the units of the containing geometry or surface. See Length.
height (optional)
height?: Length | undefinedRelated API: Length.
Vertical extent in the units of the containing geometry or surface. See Length.
minWidth (optional)
minWidth?: number | `${number}%` | undefinedMinimum permitted width. See Length.
maxWidth (optional)
maxWidth?: number | `${number}%` | undefinedMaximum permitted width. See Length.
minHeight (optional)
minHeight?: number | `${number}%` | undefinedMinimum permitted height. See Length.
maxHeight (optional)
maxHeight?: number | `${number}%` | undefinedMaximum permitted height. See Length.
padding (optional)
padding?: EdgeValues | undefinedRelated API: EdgeValues.
Insets between the border box and content box. See EdgeValues.
overflow (optional)
overflow?: "clip" | "visible" | undefinedSelects "visible", "clip" for overflow. See BoxStyle.
alignSelf (optional)
alignSelf?: "auto" | "center" | "end" | "flex-end" | "flex-start" | "start" | "stretch" | undefinedThis child’s cross-axis or block-axis alignment override. See LayoutItemStyle.
justifySelf (optional)
justifySelf?: "auto" | "center" | "end" | "start" | "stretch" | undefinedThis child’s inline-axis alignment override. See LayoutItemStyle.
flexBasis (optional)
flexBasis?: Length | undefinedRelated API: Length.
Initial main-axis size before flex growth or shrinkage. See Length.
flexGrow (optional)
flexGrow?: number | undefinedRelative share of positive free space assigned to this child. See LayoutItemStyle.
flexShrink (optional)
flexShrink?: number | undefinedRelative factor used when reducing main-axis size. See LayoutItemStyle.
gridColumnStart (optional)
gridColumnStart?: number | undefinedExplicit starting grid column. See LayoutItemStyle.
gridColumnSpan (optional)
gridColumnSpan?: number | undefinedNumber of columns occupied by this child. See LayoutItemStyle.
gridRowStart (optional)
gridRowStart?: number | undefinedExplicit starting grid row. See LayoutItemStyle.
gridRowSpan (optional)
gridRowSpan?: number | undefinedNumber of rows occupied by this child. See LayoutItemStyle.
fill (optional)
fill?: FillStyle | undefinedRelated API: FillStyle.
Paint used for the interior. See FillStyle.
stroke (optional)
stroke?: StrokeStyle | undefinedRelated API: StrokeStyle.
Paint used for the outline. See StrokeStyle.
strokeWidth (optional)
strokeWidth?: number | undefinedWidth of the painted outline. See PaintStyle.
opacity (optional)
opacity?: number | undefinedRelated API: opacity.
Opacity of the painted result. See PaintStyle.
cursor (optional)
cursor?: string | undefinedCursor shown while this target owns pointer presentation. See CursorStyle.
transition (optional)
transition?: PibblTransitionBinding | undefinedRelated API: PibblTransitionBinding.
Visibility-transition binding applied to this primitive and its captured descendants. See SystemStyle.
custom (optional)
custom?: unknownApplication-defined style payload passed through the runtime. See SystemStyle.
filter (optional)
filter?: PibblFilter | readonly PibblFilter[] | undefinedRelated API: PibblFilter.
Ordered pixel-only filters applied to the receiving primitive and its descendants. See PibblFilter.
Segment2DProps
Section titled “Segment2DProps”Authored inputs for Segment2D, including the declared data and presentation options.
interface Segment2DProps extends PibblPhysicsPrimitiveProps2DRelated API: Segment2DProps, PibblPhysicsPrimitiveProps2D.
See also
Section titled “See also”View source — packages/core/src/features/physics/lib/2d/types.ts:459
Properties and methods
Section titled “Properties and methods”
pointerEvents (optional)
readonly pointerEvents?: PibblPointerEvents | undefinedRelated API: PibblPointerEvents.
Whether this content participates in pointer targeting. See PibblPointerEvents.
keyboardFocusable (optional)
readonly keyboardFocusable?: boolean | undefinedWhether the target may receive keyboard focus. See PibblPhysicsPrimitiveProps2D.
View source — packages/core/src/features/physics/lib/2d/types.ts:381
keyboardNavigationBounds (optional)
readonly keyboardNavigationBounds?: Readonly<LayoutBox> | undefinedRelated API: LayoutBox.
Logical rectangle used for directional keyboard navigation. See LayoutBox.
View source — packages/core/src/features/physics/lib/2d/types.ts:383
physics (optional)
readonly physics?: PibblPhysicsAttachment2D | undefinedRelated API: PibblPhysicsAttachment2D.
Declarative body or collider attachment for this primitive. See PibblPhysicsAttachment2D .
View source — packages/core/src/features/physics/lib/2d/types.ts:388
Segment2DStyle
Section titled “Segment2DStyle”Supported geometry and presentation properties for Segment2D.
interface Segment2DStyle extends SystemStyle, Omit<PaintStyle, "fill">, CursorStyle, BoxStyle, LayoutItemStyleRelated API: Segment2DStyle, SystemStyle, PaintStyle, CursorStyle, BoxStyle, LayoutItemStyle.
See also
Section titled “See also”View source — packages/core/src/features/physics/lib/2d/types.ts:471
Properties and methods
Section titled “Properties and methods”
start
readonly start: PibblPhysicsVector2Related API: PibblPhysicsVector2.
First endpoint of the shape. See PibblPhysicsVector2.
View source — packages/core/src/features/physics/lib/2d/types.ts:474
end
readonly end: PibblPhysicsVector2Related API: PibblPhysicsVector2.
Last endpoint of the shape. See PibblPhysicsVector2.
View source — packages/core/src/features/physics/lib/2d/types.ts:476
lineInteractionWidth (optional)
readonly lineInteractionWidth?: number | undefinedWidth used for line hit testing independently of the visible stroke width. See Segment2DStyle.
View source — packages/core/src/features/physics/lib/2d/types.ts:481
left (optional)
left?: number | `${number}%` | undefinedLeft edge coordinate or inset. See Length.
View source — packages/core/src/lib/style/positioning.ts:127
top (optional)
top?: number | `${number}%` | undefinedTop edge value or top envelope guide. See Length.
View source — packages/core/src/lib/style/positioning.ts:129
width (optional)
width?: Length | undefinedRelated API: Length.
Horizontal extent in the units of the containing geometry or surface. See Length.
height (optional)
height?: Length | undefinedRelated API: Length.
Vertical extent in the units of the containing geometry or surface. See Length.
minWidth (optional)
minWidth?: number | `${number}%` | undefinedMinimum permitted width. See Length.
maxWidth (optional)
maxWidth?: number | `${number}%` | undefinedMaximum permitted width. See Length.
minHeight (optional)
minHeight?: number | `${number}%` | undefinedMinimum permitted height. See Length.
maxHeight (optional)
maxHeight?: number | `${number}%` | undefinedMaximum permitted height. See Length.
padding (optional)
padding?: EdgeValues | undefinedRelated API: EdgeValues.
Insets between the border box and content box. See EdgeValues.
overflow (optional)
overflow?: "clip" | "visible" | undefinedSelects "visible", "clip" for overflow. See BoxStyle.
alignSelf (optional)
alignSelf?: "auto" | "center" | "end" | "flex-end" | "flex-start" | "start" | "stretch" | undefinedThis child’s cross-axis or block-axis alignment override. See LayoutItemStyle.
justifySelf (optional)
justifySelf?: "auto" | "center" | "end" | "start" | "stretch" | undefinedThis child’s inline-axis alignment override. See LayoutItemStyle.
flexBasis (optional)
flexBasis?: Length | undefinedRelated API: Length.
Initial main-axis size before flex growth or shrinkage. See Length.
flexGrow (optional)
flexGrow?: number | undefinedRelative share of positive free space assigned to this child. See LayoutItemStyle.
flexShrink (optional)
flexShrink?: number | undefinedRelative factor used when reducing main-axis size. See LayoutItemStyle.
gridColumnStart (optional)
gridColumnStart?: number | undefinedExplicit starting grid column. See LayoutItemStyle.
gridColumnSpan (optional)
gridColumnSpan?: number | undefinedNumber of columns occupied by this child. See LayoutItemStyle.
gridRowStart (optional)
gridRowStart?: number | undefinedExplicit starting grid row. See LayoutItemStyle.
gridRowSpan (optional)
gridRowSpan?: number | undefinedNumber of rows occupied by this child. See LayoutItemStyle.
stroke (optional)
stroke?: StrokeStyle | undefinedRelated API: StrokeStyle.
Paint used for the outline. See StrokeStyle.
strokeWidth (optional)
strokeWidth?: number | undefinedWidth of the painted outline. See PaintStyle.
opacity (optional)
opacity?: number | undefinedRelated API: opacity.
Opacity of the painted result. See PaintStyle.
cursor (optional)
cursor?: string | undefinedCursor shown while this target owns pointer presentation. See CursorStyle.
transition (optional)
transition?: PibblTransitionBinding | undefinedRelated API: PibblTransitionBinding.
Visibility-transition binding applied to this primitive and its captured descendants. See SystemStyle.
custom (optional)
custom?: unknownApplication-defined style payload passed through the runtime. See SystemStyle.
filter (optional)
filter?: PibblFilter | readonly PibblFilter[] | undefinedRelated API: PibblFilter.
Ordered pixel-only filters applied to the receiving primitive and its descendants. See PibblFilter.
Chain2DProps
Section titled “Chain2DProps”Authored inputs for Chain2D, including the declared data and presentation options.
interface Chain2DProps extends PibblPhysicsPrimitiveProps2DRelated API: Chain2DProps, PibblPhysicsPrimitiveProps2D.
See also
Section titled “See also”View source — packages/core/src/features/physics/lib/2d/types.ts:490
Properties and methods
Section titled “Properties and methods”
pointerEvents (optional)
readonly pointerEvents?: PibblPointerEvents | undefinedRelated API: PibblPointerEvents.
Whether this content participates in pointer targeting. See PibblPointerEvents.
keyboardFocusable (optional)
readonly keyboardFocusable?: boolean | undefinedWhether the target may receive keyboard focus. See PibblPhysicsPrimitiveProps2D.
View source — packages/core/src/features/physics/lib/2d/types.ts:381
keyboardNavigationBounds (optional)
readonly keyboardNavigationBounds?: Readonly<LayoutBox> | undefinedRelated API: LayoutBox.
Logical rectangle used for directional keyboard navigation. See LayoutBox.
View source — packages/core/src/features/physics/lib/2d/types.ts:383
physics (optional)
readonly physics?: PibblPhysicsAttachment2D | undefinedRelated API: PibblPhysicsAttachment2D.
Declarative body or collider attachment for this primitive. See PibblPhysicsAttachment2D .
View source — packages/core/src/features/physics/lib/2d/types.ts:388
Chain2DStyle
Section titled “Chain2DStyle”Supported geometry and presentation properties for Chain2D.
interface Chain2DStyle extends SystemStyle, PaintStyle, CursorStyle, BoxStyle, LayoutItemStyleRelated API: Chain2DStyle, SystemStyle, PaintStyle, CursorStyle, BoxStyle, LayoutItemStyle.
See also
Section titled “See also”View source — packages/core/src/features/physics/lib/2d/types.ts:502
Properties and methods
Section titled “Properties and methods”
points
readonly points: readonly PibblPhysicsVector2[]Related API: PibblPhysicsVector2.
Points defining the geometry or reported by the contact query. See PibblPhysicsVector2.
View source — packages/core/src/features/physics/lib/2d/types.ts:507
closed (optional)
readonly closed?: boolean | undefinedWhether the point chain connects its last point back to its first. See Chain2DStyle.
View source — packages/core/src/features/physics/lib/2d/types.ts:511
radius (optional)
readonly radius?: number | undefinedRadius in the coordinate system of this geometry or effect. See Chain2DStyle.
View source — packages/core/src/features/physics/lib/2d/types.ts:513
lineInteractionWidth (optional)
readonly lineInteractionWidth?: number | undefinedWidth used for line hit testing independently of the visible stroke width. See Chain2DStyle.
View source — packages/core/src/features/physics/lib/2d/types.ts:518
left (optional)
left?: number | `${number}%` | undefinedLeft edge coordinate or inset. See Length.
View source — packages/core/src/lib/style/positioning.ts:127
top (optional)
top?: number | `${number}%` | undefinedTop edge value or top envelope guide. See Length.
View source — packages/core/src/lib/style/positioning.ts:129
width (optional)
width?: Length | undefinedRelated API: Length.
Horizontal extent in the units of the containing geometry or surface. See Length.
height (optional)
height?: Length | undefinedRelated API: Length.
Vertical extent in the units of the containing geometry or surface. See Length.
minWidth (optional)
minWidth?: number | `${number}%` | undefinedMinimum permitted width. See Length.
maxWidth (optional)
maxWidth?: number | `${number}%` | undefinedMaximum permitted width. See Length.
minHeight (optional)
minHeight?: number | `${number}%` | undefinedMinimum permitted height. See Length.
maxHeight (optional)
maxHeight?: number | `${number}%` | undefinedMaximum permitted height. See Length.
padding (optional)
padding?: EdgeValues | undefinedRelated API: EdgeValues.
Insets between the border box and content box. See EdgeValues.
overflow (optional)
overflow?: "clip" | "visible" | undefinedSelects "visible", "clip" for overflow. See BoxStyle.
alignSelf (optional)
alignSelf?: "auto" | "center" | "end" | "flex-end" | "flex-start" | "start" | "stretch" | undefinedThis child’s cross-axis or block-axis alignment override. See LayoutItemStyle.
justifySelf (optional)
justifySelf?: "auto" | "center" | "end" | "start" | "stretch" | undefinedThis child’s inline-axis alignment override. See LayoutItemStyle.
flexBasis (optional)
flexBasis?: Length | undefinedRelated API: Length.
Initial main-axis size before flex growth or shrinkage. See Length.
flexGrow (optional)
flexGrow?: number | undefinedRelative share of positive free space assigned to this child. See LayoutItemStyle.
flexShrink (optional)
flexShrink?: number | undefinedRelative factor used when reducing main-axis size. See LayoutItemStyle.
gridColumnStart (optional)
gridColumnStart?: number | undefinedExplicit starting grid column. See LayoutItemStyle.
gridColumnSpan (optional)
gridColumnSpan?: number | undefinedNumber of columns occupied by this child. See LayoutItemStyle.
gridRowStart (optional)
gridRowStart?: number | undefinedExplicit starting grid row. See LayoutItemStyle.
gridRowSpan (optional)
gridRowSpan?: number | undefinedNumber of rows occupied by this child. See LayoutItemStyle.
fill (optional)
fill?: FillStyle | undefinedRelated API: FillStyle.
Paint used for the interior. See FillStyle.
stroke (optional)
stroke?: StrokeStyle | undefinedRelated API: StrokeStyle.
Paint used for the outline. See StrokeStyle.
strokeWidth (optional)
strokeWidth?: number | undefinedWidth of the painted outline. See PaintStyle.
opacity (optional)
opacity?: number | undefinedRelated API: opacity.
Opacity of the painted result. See PaintStyle.
cursor (optional)
cursor?: string | undefinedCursor shown while this target owns pointer presentation. See CursorStyle.
transition (optional)
transition?: PibblTransitionBinding | undefinedRelated API: PibblTransitionBinding.
Visibility-transition binding applied to this primitive and its captured descendants. See SystemStyle.
custom (optional)
custom?: unknownApplication-defined style payload passed through the runtime. See SystemStyle.
filter (optional)
filter?: PibblFilter | readonly PibblFilter[] | undefinedRelated API: PibblFilter.
Ordered pixel-only filters applied to the receiving primitive and its descendants. See PibblFilter.
PibblPhysicsBodyHandle2D
Section titled “PibblPhysicsBodyHandle2D”Stable body identity with committed reactive pose, velocity, sleeping, enablement, and generation.
interface PibblPhysicsBodyHandle2DRelated API: PibblPhysicsBodyHandle2D.
See also
Section titled “See also”PibblPhysicsDynamicBody2DOptions
PibblPhysicsStaticBody2DOptions
PibblPhysicsKinematicBody2DOptions
View source — packages/core/src/features/physics/lib/2d/types.ts:531
Properties and methods
Section titled “Properties and methods”
position
readonly position: Signal<PibblPhysicsVector2>Related API: Signal, PibblPhysicsVector2.
Position of the geometry, source, or selected resize handle. See Signal, PibblPhysicsVector2.
View source — packages/core/src/features/physics/lib/2d/types.ts:537
rotationDegrees
readonly rotationDegrees: Signal<number>Related API: Signal.
Rotation in degrees. See Signal.
View source — packages/core/src/features/physics/lib/2d/types.ts:539
linearVelocity
readonly linearVelocity: Signal<PibblPhysicsVector2>Related API: Signal, PibblPhysicsVector2.
Linear velocity in the simulation coordinate system per second. See Signal, PibblPhysicsVector2.
View source — packages/core/src/features/physics/lib/2d/types.ts:544
angularVelocityDegreesPerSecond
readonly angularVelocityDegreesPerSecond: Signal<number>Related API: Signal.
Angular velocity in degrees per second. See Signal.
View source — packages/core/src/features/physics/lib/2d/types.ts:546
sleeping
readonly sleeping: Signal<boolean>Related API: Signal.
Whether the body is currently sleeping. See Signal.
View source — packages/core/src/features/physics/lib/2d/types.ts:548
enabled
readonly enabled: Signal<boolean>Related API: Signal.
Whether this operation or resource participates in updates. See Signal.
View source — packages/core/src/features/physics/lib/2d/types.ts:550
generation
readonly generation: Signal<number>Related API: Signal.
Generation counter distinguishing successive bindings of a stable identity. See Signal .
View source — packages/core/src/features/physics/lib/2d/types.ts:555
PibblPhysicsColliderHandle2D
Section titled “PibblPhysicsColliderHandle2D”Stable opaque collider identity for filtering and query results.
interface PibblPhysicsColliderHandle2DRelated API: PibblPhysicsColliderHandle2D.
See also
Section titled “See also”View source — packages/core/src/features/physics/lib/2d/types.ts:566
PibblPhysicsWorldHandle2D
Section titled “PibblPhysicsWorldHandle2D”Stable world identity with a reactive committed-state revision.
interface PibblPhysicsWorldHandle2DRelated API: PibblPhysicsWorldHandle2D.
See also
Section titled “See also”View source — packages/core/src/features/physics/lib/2d/types.ts:579
Properties and methods
Section titled “Properties and methods”
revision
readonly revision: Signal<number>Related API: Signal.
Revision used to detect changes to the underlying state or geometry. See Signal.
View source — packages/core/src/features/physics/lib/2d/types.ts:582
PibblPhysicsQueryOptions2D
Section titled “PibblPhysicsQueryOptions2D”Sensor policy, collision filtering, and body/collider exclusions for world queries.
interface PibblPhysicsQueryOptions2DRelated API: PibblPhysicsQueryOptions2D.
See also
Section titled “See also”View source — packages/core/src/features/physics/lib/2d/types.ts:592
Properties and methods
Section titled “Properties and methods”
sensors (optional)
readonly sensors?: "exclude" | "include" | "only" | undefinedSelects "include" , "exclude" , "only" for sensors. See PibblPhysicsQueryOptions2D
.
View source — packages/core/src/features/physics/lib/2d/types.ts:597
collisionFilter (optional)
readonly collisionFilter?: PibblPhysicsCollisionFilter | undefinedRelated API: PibblPhysicsCollisionFilter.
Category, mask, and group filtering for collision or query participation. See PibblPhysicsCollisionFilter.
View source — packages/core/src/features/physics/lib/2d/types.ts:602
excludeBody (optional)
readonly excludeBody?: PibblPhysicsBodyHandle2D | undefinedRelated API: PibblPhysicsBodyHandle2D.
Body identity omitted from query candidates. See PibblPhysicsBodyHandle2D.
View source — packages/core/src/features/physics/lib/2d/types.ts:604
excludeCollider (optional)
readonly excludeCollider?: PibblPhysicsColliderHandle2D | undefinedRelated API: PibblPhysicsColliderHandle2D.
Collider identity omitted from query candidates. See PibblPhysicsColliderHandle2D.
View source — packages/core/src/features/physics/lib/2d/types.ts:606
PibblPhysicsQueryHit2D
Section titled “PibblPhysicsQueryHit2D”Cast geometry plus matched body/collider identities, generations, and application tag.
interface PibblPhysicsQueryHit2D extends PibblPhysicsShapeHit2DRelated API: PibblPhysicsQueryHit2D, PibblPhysicsShapeHit2D.
See also
Section titled “See also”View source — packages/core/src/features/physics/lib/2d/types.ts:617
Properties and methods
Section titled “Properties and methods”
body
readonly body: PibblPhysicsBodyHandle2DRelated API: PibblPhysicsBodyHandle2D.
Body identity associated with this event or result. See PibblPhysicsBodyHandle2D.
View source — packages/core/src/features/physics/lib/2d/types.ts:619
collider
readonly collider: PibblPhysicsColliderHandle2DRelated API: PibblPhysicsColliderHandle2D.
Collider configuration or identity associated with this body or query. See PibblPhysicsColliderHandle2D.
View source — packages/core/src/features/physics/lib/2d/types.ts:624
bodyGeneration
readonly bodyGeneration: numberCommitted generation of the matched body identity. See PibblPhysicsQueryHit2D.
View source — packages/core/src/features/physics/lib/2d/types.ts:626
colliderGeneration
readonly colliderGeneration: numberCommitted generation of the matched collider identity. See PibblPhysicsQueryHit2D.
View source — packages/core/src/features/physics/lib/2d/types.ts:628
tag
readonly tag: unknownApplication payload carried through physics queries and events. See PibblPhysicsQueryHit2D.
View source — packages/core/src/features/physics/lib/2d/types.ts:633
point
readonly point: PibblPhysicsVector2Related API: PibblPhysicsVector2.
A point in the operation’s coordinate system. See PibblPhysicsVector2.
View source — packages/core/src/features/physics/2d-geometry.ts:157
normal
readonly normal: PibblPhysicsVector2Related API: PibblPhysicsVector2.
Contact or surface normal returned by this query. See PibblPhysicsVector2.
View source — packages/core/src/features/physics/2d-geometry.ts:159
distance
readonly distance: numberDistance measured in this query or guide’s coordinate system. See PibblPhysicsShapeHit2D .
View source — packages/core/src/features/physics/2d-geometry.ts:164
timeOfImpact
readonly timeOfImpact: numberPosition along the cast at which contact first occurs. See PibblPhysicsShapeHit2D.
View source — packages/core/src/features/physics/2d-geometry.ts:166
PibblPhysicsQueryMatch2D
Section titled “PibblPhysicsQueryMatch2D”Matched body/collider identities, generations, and tag for an overlap query.
interface PibblPhysicsQueryMatch2DRelated API: PibblPhysicsQueryMatch2D.
See also
Section titled “See also”View source — packages/core/src/features/physics/lib/2d/types.ts:644
Properties and methods
Section titled “Properties and methods”
body
readonly body: PibblPhysicsBodyHandle2DRelated API: PibblPhysicsBodyHandle2D.
Body identity associated with this event or result. See PibblPhysicsBodyHandle2D.
View source — packages/core/src/features/physics/lib/2d/types.ts:646
collider
readonly collider: PibblPhysicsColliderHandle2DRelated API: PibblPhysicsColliderHandle2D.
Collider configuration or identity associated with this body or query. See PibblPhysicsColliderHandle2D.
View source — packages/core/src/features/physics/lib/2d/types.ts:651
bodyGeneration
readonly bodyGeneration: numberCommitted generation of the matched body identity. See PibblPhysicsQueryMatch2D.
View source — packages/core/src/features/physics/lib/2d/types.ts:653
colliderGeneration
readonly colliderGeneration: numberCommitted generation of the matched collider identity. See PibblPhysicsQueryMatch2D.
View source — packages/core/src/features/physics/lib/2d/types.ts:655
tag
readonly tag: unknownApplication payload carried through physics queries and events. See PibblPhysicsQueryMatch2D.
View source — packages/core/src/features/physics/lib/2d/types.ts:660
PibblPhysicsCollisionEvent2D
Section titled “PibblPhysicsCollisionEvent2D”Bodies, colliders, contact geometry, impulse, tags, and tick for a collision event.
interface PibblPhysicsCollisionEvent2DRelated API: PibblPhysicsCollisionEvent2D.
See also
Section titled “See also”PibblPhysicsCollisionHandler2D
View source — packages/core/src/features/physics/lib/2d/types.ts:673
Properties and methods
Section titled “Properties and methods”
selfBody
readonly selfBody: PibblPhysicsBodyHandle2DRelated API: PibblPhysicsBodyHandle2D.
Body receiving the collision or overlap notification. See PibblPhysicsBodyHandle2D.
View source — packages/core/src/features/physics/lib/2d/types.ts:675
selfCollider
readonly selfCollider: PibblPhysicsColliderHandle2DRelated API: PibblPhysicsColliderHandle2D.
Collider receiving the collision or overlap notification. See PibblPhysicsColliderHandle2D.
View source — packages/core/src/features/physics/lib/2d/types.ts:680
otherBody
readonly otherBody: PibblPhysicsBodyHandle2DRelated API: PibblPhysicsBodyHandle2D.
The other body in the collision or overlap pair. See PibblPhysicsBodyHandle2D.
View source — packages/core/src/features/physics/lib/2d/types.ts:682
otherCollider
readonly otherCollider: PibblPhysicsColliderHandle2DRelated API: PibblPhysicsColliderHandle2D.
The other collider in the collision or overlap pair. See PibblPhysicsColliderHandle2D.
View source — packages/core/src/features/physics/lib/2d/types.ts:686
normal
readonly normal: PibblPhysicsVector2Related API: PibblPhysicsVector2.
Direction from other toward self.
View source — packages/core/src/features/physics/lib/2d/types.ts:688
points
readonly points: readonly PibblPhysicsContactPoint2D[]Related API: PibblPhysicsContactPoint2D.
Points defining the geometry or reported by the contact query. See PibblPhysicsContactPoint2D.
View source — packages/core/src/features/physics/lib/2d/types.ts:693
totalNormalImpulse
readonly totalNormalImpulse: numberTotal normal contact impulse reported for the pair. See PibblPhysicsCollisionEvent2D.
View source — packages/core/src/features/physics/lib/2d/types.ts:695
tick
readonly tick: numberSimulation tick associated with this observation. See PibblPhysicsCollisionEvent2D.
View source — packages/core/src/features/physics/lib/2d/types.ts:697
selfTag
readonly selfTag: unknownApplication tag attached to the receiving collider. See PibblPhysicsCollisionEvent2D.
View source — packages/core/src/features/physics/lib/2d/types.ts:699
otherTag
readonly otherTag: unknownApplication tag attached to the other collider. See PibblPhysicsCollisionEvent2D.
View source — packages/core/src/features/physics/lib/2d/types.ts:701
PibblPhysicsOverlapEvent2D
Section titled “PibblPhysicsOverlapEvent2D”Bodies, colliders, tags, and tick for a sensor-overlap event.
interface PibblPhysicsOverlapEvent2DRelated API: PibblPhysicsOverlapEvent2D.
See also
Section titled “See also”View source — packages/core/src/features/physics/lib/2d/types.ts:711
Properties and methods
Section titled “Properties and methods”
selfBody
readonly selfBody: PibblPhysicsBodyHandle2DRelated API: PibblPhysicsBodyHandle2D.
Body receiving the collision or overlap notification. See PibblPhysicsBodyHandle2D.
View source — packages/core/src/features/physics/lib/2d/types.ts:713
selfCollider
readonly selfCollider: PibblPhysicsColliderHandle2DRelated API: PibblPhysicsColliderHandle2D.
Collider receiving the collision or overlap notification. See PibblPhysicsColliderHandle2D.
View source — packages/core/src/features/physics/lib/2d/types.ts:718
otherBody
readonly otherBody: PibblPhysicsBodyHandle2DRelated API: PibblPhysicsBodyHandle2D.
The other body in the collision or overlap pair. See PibblPhysicsBodyHandle2D.
View source — packages/core/src/features/physics/lib/2d/types.ts:720
otherCollider
readonly otherCollider: PibblPhysicsColliderHandle2DRelated API: PibblPhysicsColliderHandle2D.
The other collider in the collision or overlap pair. See PibblPhysicsColliderHandle2D.
View source — packages/core/src/features/physics/lib/2d/types.ts:724
tick
readonly tick: numberSimulation tick associated with this observation. See PibblPhysicsOverlapEvent2D.
View source — packages/core/src/features/physics/lib/2d/types.ts:726
selfTag
readonly selfTag: unknownApplication tag attached to the receiving collider. See PibblPhysicsOverlapEvent2D.
View source — packages/core/src/features/physics/lib/2d/types.ts:728
otherTag
readonly otherTag: unknownApplication tag attached to the other collider. See PibblPhysicsOverlapEvent2D.
View source — packages/core/src/features/physics/lib/2d/types.ts:730
PibblPhysicsBodyStateEvent2D
Section titled “PibblPhysicsBodyStateEvent2D”Body identity and sleeping state at the reported simulation tick.
interface PibblPhysicsBodyStateEvent2DRelated API: PibblPhysicsBodyStateEvent2D.
See also
Section titled “See also”PibblPhysicsBodyStateHandler2D
View source — packages/core/src/features/physics/lib/2d/types.ts:739
Properties and methods
Section titled “Properties and methods”
body
readonly body: PibblPhysicsBodyHandle2DRelated API: PibblPhysicsBodyHandle2D.
Body identity associated with this event or result. See PibblPhysicsBodyHandle2D.
View source — packages/core/src/features/physics/lib/2d/types.ts:741
sleeping
readonly sleeping: booleanWhether the body is currently sleeping. See PibblPhysicsBodyStateEvent2D.
View source — packages/core/src/features/physics/lib/2d/types.ts:743
tick
readonly tick: numberSimulation tick associated with this observation. See PibblPhysicsBodyStateEvent2D.
View source — packages/core/src/features/physics/lib/2d/types.ts:745
PibblPhysicsVector2
Section titled “PibblPhysicsVector2”An x/y pair in the 2D physics coordinate system.
type PibblPhysicsVector2 = readonly [x: number, y: number]Related API: PibblPhysicsVector2.
See also
Section titled “See also”View source — packages/core/src/features/physics/2d-geometry.ts:13
PibblPhysicsPose2D
Section titled “PibblPhysicsPose2D”Position and rotation in degrees for a 2D shape or body.
interface PibblPhysicsPose2DRelated API: PibblPhysicsPose2D.
See also
Section titled “See also”View source — packages/core/src/features/physics/2d-geometry.ts:22
Properties and methods
Section titled “Properties and methods”
position
readonly position: PibblPhysicsVector2Related API: PibblPhysicsVector2.
Position of the geometry, source, or selected resize handle. See PibblPhysicsVector2.
View source — packages/core/src/features/physics/2d-geometry.ts:24
rotationDegrees
readonly rotationDegrees: numberRotation in degrees. See PibblPhysicsPose2D.
View source — packages/core/src/features/physics/2d-geometry.ts:26
PibblPhysicsTransform2D
Section titled “PibblPhysicsTransform2D”A rigid 2D transform expressed as position and rotation in degrees.
type PibblPhysicsTransform2D = PibblPhysicsPose2DRelated API: PibblPhysicsTransform2D, PibblPhysicsPose2D.
See also
Section titled “See also”View source — packages/core/src/features/physics/2d-geometry.ts:35
Properties and methods
Section titled “Properties and methods”
position
readonly position: PibblPhysicsVector2Related API: PibblPhysicsVector2.
Position of the geometry, source, or selected resize handle. See PibblPhysicsVector2.
View source — packages/core/src/features/physics/2d-geometry.ts:24
rotationDegrees
readonly rotationDegrees: numberRotation in degrees. See PibblPhysicsPose2D.
View source — packages/core/src/features/physics/2d-geometry.ts:26
PibblPhysicsAabb2D
Section titled “PibblPhysicsAabb2D”Axis-aligned bounds expressed as minimum and maximum coordinates.
interface PibblPhysicsAabb2DRelated API: PibblPhysicsAabb2D.
See also
Section titled “See also”View source — packages/core/src/features/physics/2d-geometry.ts:44
Properties and methods
Section titled “Properties and methods”
min
readonly min: PibblPhysicsVector2Related API: PibblPhysicsVector2.
Lower bound of the coordinate or sampling interval. See PibblPhysicsVector2.
View source — packages/core/src/features/physics/2d-geometry.ts:46
max
readonly max: PibblPhysicsVector2Related API: PibblPhysicsVector2.
Upper bound of the coordinate or sampling interval. See PibblPhysicsVector2.
View source — packages/core/src/features/physics/2d-geometry.ts:48
PibblPhysicsRay2D
Section titled “PibblPhysicsRay2D”Origin, direction, and maximum travel distance of a 2D query ray.
interface PibblPhysicsRay2DRelated API: PibblPhysicsRay2D.
See also
Section titled “See also”View source — packages/core/src/features/physics/2d-geometry.ts:58
Properties and methods
Section titled “Properties and methods”
origin
readonly origin: PibblPhysicsVector2Related API: PibblPhysicsVector2.
Origin of the transform or geometric query. See PibblPhysicsVector2.
View source — packages/core/src/features/physics/2d-geometry.ts:60
direction
readonly direction: PibblPhysicsVector2Related API: PibblPhysicsVector2.
Direction in which this operation proceeds. See PibblPhysicsVector2.
View source — packages/core/src/features/physics/2d-geometry.ts:62
maxDistance
readonly maxDistance: numberMaximum distance accepted by the query. See PibblPhysicsRay2D.
View source — packages/core/src/features/physics/2d-geometry.ts:64
PibblPhysicsShape2D
Section titled “PibblPhysicsShape2D”An immutable branded shape created by the public 2D geometry constructors.
interface PibblPhysicsShape2DRelated API: PibblPhysicsShape2D.
See also
Section titled “See also”View source — packages/core/src/features/physics/2d-geometry.ts:75
PibblPhysicsMassProperties2D
Section titled “PibblPhysicsMassProperties2D”Area, centroid, mass, and rotational inertia derived from a shape and density.
interface PibblPhysicsMassProperties2DRelated API: PibblPhysicsMassProperties2D.
See also
Section titled “See also”View source — packages/core/src/features/physics/2d-geometry.ts:85
Properties and methods
Section titled “Properties and methods”
area
readonly area: numberArea enclosed by the shape. See PibblPhysicsMassProperties2D.
View source — packages/core/src/features/physics/2d-geometry.ts:87
centroid
readonly centroid: PibblPhysicsVector2Related API: PibblPhysicsVector2.
Area-weighted center of the shape. See PibblPhysicsVector2.
View source — packages/core/src/features/physics/2d-geometry.ts:89
mass
readonly mass: numberMass used by the spring or physics calculation. See PibblPhysicsMassProperties2D.
View source — packages/core/src/features/physics/2d-geometry.ts:91
rotationalInertia
readonly rotationalInertia: numberMoment of inertia about the shape’s center of mass. See PibblPhysicsMassProperties2D.
View source — packages/core/src/features/physics/2d-geometry.ts:93
PibblPhysicsDistance2D
Section titled “PibblPhysicsDistance2D”Signed separation, witness points, and normal between two posed shapes.
interface PibblPhysicsDistance2DRelated API: PibblPhysicsDistance2D.
See also
Section titled “See also”View source — packages/core/src/features/physics/2d-geometry.ts:102
Properties and methods
Section titled “Properties and methods”
separation
readonly separation: numberSigned distance between the witness points. See PibblPhysicsDistance2D.
View source — packages/core/src/features/physics/2d-geometry.ts:104
pointOnFirst
readonly pointOnFirst: PibblPhysicsVector2Related API: PibblPhysicsVector2.
Witness point on the first shape. See PibblPhysicsVector2.
View source — packages/core/src/features/physics/2d-geometry.ts:106
pointOnSecond
readonly pointOnSecond: PibblPhysicsVector2Related API: PibblPhysicsVector2.
Witness point on the second shape. See PibblPhysicsVector2.
View source — packages/core/src/features/physics/2d-geometry.ts:108
normal
readonly normal: PibblPhysicsVector2Related API: PibblPhysicsVector2.
Direction from the second shape toward the first.
View source — packages/core/src/features/physics/2d-geometry.ts:110
PibblPhysicsContactPoint2D
Section titled “PibblPhysicsContactPoint2D”A pair of contact witness points and their signed separation.
interface PibblPhysicsContactPoint2DRelated API: PibblPhysicsContactPoint2D.
See also
Section titled “See also”PibblPhysicsContactInspection2D
View source — packages/core/src/features/physics/2d-geometry.ts:121
Properties and methods
Section titled “Properties and methods”
pointOnFirst
readonly pointOnFirst: PibblPhysicsVector2Related API: PibblPhysicsVector2.
Witness point on the first shape. See PibblPhysicsVector2.
View source — packages/core/src/features/physics/2d-geometry.ts:123
pointOnSecond
readonly pointOnSecond: PibblPhysicsVector2Related API: PibblPhysicsVector2.
Witness point on the second shape. See PibblPhysicsVector2.
View source — packages/core/src/features/physics/2d-geometry.ts:125
separation
readonly separation: numberSigned distance between the witness points. See PibblPhysicsContactPoint2D.
View source — packages/core/src/features/physics/2d-geometry.ts:127
PibblPhysicsShapeContact2D
Section titled “PibblPhysicsShapeContact2D”Contact normal and witness-point pairs for two overlapping or touching shapes.
interface PibblPhysicsShapeContact2DRelated API: PibblPhysicsShapeContact2D.
See also
Section titled “See also”View source — packages/core/src/features/physics/2d-geometry.ts:137
Properties and methods
Section titled “Properties and methods”
normal
readonly normal: PibblPhysicsVector2Related API: PibblPhysicsVector2.
Direction from the second shape toward the first.
View source — packages/core/src/features/physics/2d-geometry.ts:139
points
readonly points: readonly PibblPhysicsContactPoint2D[]Related API: PibblPhysicsContactPoint2D.
Points defining the geometry or reported by the contact query. See PibblPhysicsContactPoint2D.
View source — packages/core/src/features/physics/2d-geometry.ts:144
PibblPhysicsShapeHit2D
Section titled “PibblPhysicsShapeHit2D”Point, normal, distance, and time of impact returned by a geometry cast.
interface PibblPhysicsShapeHit2DRelated API: PibblPhysicsShapeHit2D.
See also
Section titled “See also”View source — packages/core/src/features/physics/2d-geometry.ts:155
Properties and methods
Section titled “Properties and methods”
point
readonly point: PibblPhysicsVector2Related API: PibblPhysicsVector2.
A point in the operation’s coordinate system. See PibblPhysicsVector2.
View source — packages/core/src/features/physics/2d-geometry.ts:157
normal
readonly normal: PibblPhysicsVector2Related API: PibblPhysicsVector2.
Contact or surface normal returned by this query. See PibblPhysicsVector2.
View source — packages/core/src/features/physics/2d-geometry.ts:159
distance
readonly distance: numberDistance measured in this query or guide’s coordinate system. See PibblPhysicsShapeHit2D .
View source — packages/core/src/features/physics/2d-geometry.ts:164
timeOfImpact
readonly timeOfImpact: numberPosition along the cast at which contact first occurs. See PibblPhysicsShapeHit2D.
View source — packages/core/src/features/physics/2d-geometry.ts:166
PibblPhysicsInspection2D
Section titled “PibblPhysicsInspection2D”Read-only observations, not an engine serialization/restore format.
interface PibblPhysicsInspection2DRelated API: PibblPhysicsInspection2D.
See also
Section titled “See also”PibblPhysicsColliderInspection2D
PibblPhysicsContactInspection2D
View source — packages/core/src/features/physics/lib/2d/inspection-types.ts:124
Properties and methods
Section titled “Properties and methods”
engine
readonly engine: "rapier-2d@0.21.0"The literal “rapier-2d@0.21.0” identifying this variant. See PibblPhysicsInspection2D.
View source — packages/core/src/features/physics/lib/2d/inspection-types.ts:128
space
readonly space: "local" | "root"Selects "root", "local" for space. See PibblPhysicsInspection2D.
View source — packages/core/src/features/physics/lib/2d/inspection-types.ts:130
revision
readonly revision: numberRevision used to detect changes to the underlying state or geometry. See PibblPhysicsInspection2D.
View source — packages/core/src/features/physics/lib/2d/inspection-types.ts:135
tick
readonly tick: numberSimulation tick associated with this observation. See PibblPhysicsInspection2D.
View source — packages/core/src/features/physics/lib/2d/inspection-types.ts:137
advancing
readonly advancing: booleanWhether the inspected world is actively advancing simulation. See PibblPhysicsInspection2D.
View source — packages/core/src/features/physics/lib/2d/inspection-types.ts:142
failedFrames
readonly failedFrames: numberNumber of scheduler frames in which this world failed to advance. See PibblPhysicsInspection2D.
View source — packages/core/src/features/physics/lib/2d/inspection-types.ts:147
lastFailure
readonly lastFailure: string | nullDiagnostic information about the most recent simulation failure. See PibblPhysicsInspection2D.
View source — packages/core/src/features/physics/lib/2d/inspection-types.ts:152
bodies
readonly bodies: readonly PibblPhysicsBodyInspection2D[]Related API: PibblPhysicsBodyInspection2D.
Committed body snapshots in the inspected world. See PibblPhysicsBodyInspection2D.
View source — packages/core/src/features/physics/lib/2d/inspection-types.ts:154
colliders
readonly colliders: readonly PibblPhysicsColliderInspection2D[]Related API: PibblPhysicsColliderInspection2D.
Committed collider snapshots in the inspected world. See PibblPhysicsColliderInspection2D.
View source — packages/core/src/features/physics/lib/2d/inspection-types.ts:159
contacts
readonly contacts: readonly PibblPhysicsContactInspection2D[]Related API: PibblPhysicsContactInspection2D.
Committed contact snapshots in the inspected world. See PibblPhysicsContactInspection2D .
View source — packages/core/src/features/physics/lib/2d/inspection-types.ts:164
PibblPhysicsBodyInspection2D
Section titled “PibblPhysicsBodyInspection2D”Diagnostic body identity, committed and presented poses, motion, sleeping state, and mass.
interface PibblPhysicsBodyInspection2DRelated API: PibblPhysicsBodyInspection2D.
See also
Section titled “See also”View source — packages/core/src/features/physics/lib/2d/inspection-types.ts:15
Properties and methods
Section titled “Properties and methods”
id
readonly id: numberStable identifier of this resource or connection. See PibblPhysicsBodyInspection2D.
View source — packages/core/src/features/physics/lib/2d/inspection-types.ts:17
generation
readonly generation: numberGeneration counter distinguishing successive bindings of a stable identity. See PibblPhysicsBodyInspection2D.
View source — packages/core/src/features/physics/lib/2d/inspection-types.ts:22
type
readonly type: "dynamic" | "kinematic" | "static"Selects "dynamic" , "kinematic" , "static" for type. See
PibblPhysicsBodyInspection2D.
View source — packages/core/src/features/physics/lib/2d/inspection-types.ts:27
enabled
readonly enabled: booleanWhether this operation or resource participates in updates. See PibblPhysicsBodyInspection2D.
View source — packages/core/src/features/physics/lib/2d/inspection-types.ts:32
sleeping
readonly sleeping: booleanWhether the body is currently sleeping. See PibblPhysicsBodyInspection2D.
View source — packages/core/src/features/physics/lib/2d/inspection-types.ts:34
pose
readonly pose: PibblPhysicsPose2DRelated API: PibblPhysicsPose2D.
Committed physical position and rotation. See PibblPhysicsPose2D.
View source — packages/core/src/features/physics/lib/2d/inspection-types.ts:36
presentationPose
readonly presentationPose: PibblPhysicsPose2DRelated API: PibblPhysicsPose2D.
Interpolated pose currently used for drawing. See PibblPhysicsPose2D.
View source — packages/core/src/features/physics/lib/2d/inspection-types.ts:38
centerOfMass
readonly centerOfMass: PibblPhysicsVector2Related API: PibblPhysicsVector2.
Center of mass in the reported physics coordinate system. See PibblPhysicsVector2.
View source — packages/core/src/features/physics/lib/2d/inspection-types.ts:40
linearVelocity
readonly linearVelocity: PibblPhysicsVector2Related API: PibblPhysicsVector2.
Linear velocity in the simulation coordinate system per second. See PibblPhysicsVector2 .
View source — packages/core/src/features/physics/lib/2d/inspection-types.ts:45
angularVelocityDegreesPerSecond
readonly angularVelocityDegreesPerSecond: numberAngular velocity in degrees per second. See PibblPhysicsBodyInspection2D.
View source — packages/core/src/features/physics/lib/2d/inspection-types.ts:47
mass
readonly mass: number | nullMass used by the spring or physics calculation. See PibblPhysicsBodyInspection2D.
View source — packages/core/src/features/physics/lib/2d/inspection-types.ts:49
PibblPhysicsColliderInspection2D
Section titled “PibblPhysicsColliderInspection2D”Serializable collider identity, shape kinds, bounds, sensor state, and string label.
interface PibblPhysicsColliderInspection2DRelated API: PibblPhysicsColliderInspection2D.
See also
Section titled “See also”View source — packages/core/src/features/physics/lib/2d/inspection-types.ts:57
Properties and methods
Section titled “Properties and methods”
id
readonly id: numberStable identifier of this resource or connection. See PibblPhysicsColliderInspection2D.
View source — packages/core/src/features/physics/lib/2d/inspection-types.ts:61
generation
readonly generation: numberGeneration counter distinguishing successive bindings of a stable identity. See PibblPhysicsColliderInspection2D.
View source — packages/core/src/features/physics/lib/2d/inspection-types.ts:66
bodyId
readonly bodyId: numberIdentifier of the collider’s owning body. See PibblPhysicsColliderInspection2D.
View source — packages/core/src/features/physics/lib/2d/inspection-types.ts:68
sensor
readonly sensor: booleanWhether the collider reports overlaps instead of producing contact response. See PibblPhysicsColliderInspection2D.
View source — packages/core/src/features/physics/lib/2d/inspection-types.ts:73
label
readonly label: string | nullString tags only. Arbitrary application objects are never serialized.
View source — packages/core/src/features/physics/lib/2d/inspection-types.ts:75
shapeKinds
readonly shapeKinds: readonly string[]Kinds of shape geometry represented by the collider. See PibblPhysicsColliderInspection2D.
View source — packages/core/src/features/physics/lib/2d/inspection-types.ts:80
bounds
readonly bounds: PibblPhysicsAabb2DRelated API: PibblPhysicsAabb2D.
Logical region constraining the content or query. See PibblPhysicsAabb2D.
View source — packages/core/src/features/physics/lib/2d/inspection-types.ts:82
PibblPhysicsContactInspection2D
Section titled “PibblPhysicsContactInspection2D”Diagnostic contact geometry and impulse between two collider identities.
interface PibblPhysicsContactInspection2DRelated API: PibblPhysicsContactInspection2D.
See also
Section titled “See also”View source — packages/core/src/features/physics/lib/2d/inspection-types.ts:91
Properties and methods
Section titled “Properties and methods”
firstColliderId
readonly firstColliderId: numberIdentifier of the first collider in the contact pair. See PibblPhysicsContactInspection2D.
View source — packages/core/src/features/physics/lib/2d/inspection-types.ts:96
secondColliderId
readonly secondColliderId: numberIdentifier of the second collider in the contact pair. See PibblPhysicsContactInspection2D.
View source — packages/core/src/features/physics/lib/2d/inspection-types.ts:101
sensor
readonly sensor: booleanWhether the collider reports overlaps instead of producing contact response. See PibblPhysicsContactInspection2D.
View source — packages/core/src/features/physics/lib/2d/inspection-types.ts:106
normal
readonly normal: PibblPhysicsVector2Related API: PibblPhysicsVector2.
Contact or surface normal returned by this query. See PibblPhysicsVector2.
View source — packages/core/src/features/physics/lib/2d/inspection-types.ts:108
points
readonly points: readonly PibblPhysicsContactPoint2D[]Related API: PibblPhysicsContactPoint2D.
Points defining the geometry or reported by the contact query. See PibblPhysicsContactPoint2D.
View source — packages/core/src/features/physics/lib/2d/inspection-types.ts:113
normalImpulse
readonly normalImpulse: numberNormal contact impulse reported by the solver. See PibblPhysicsContactInspection2D.
View source — packages/core/src/features/physics/lib/2d/inspection-types.ts:115
PibblPhysicsDebug2DProps
Section titled “PibblPhysicsDebug2DProps”Authored inputs for PhysicsDebug2D, including the declared data and presentation options.
interface PibblPhysicsDebug2DPropsRelated API: PibblPhysicsDebug2DProps.
See also
Section titled “See also”View source — packages/core/src/features/physics/lib/2d/canvas/debug.ts:12
Properties and methods
Section titled “Properties and methods”
world
readonly world: PibblPhysicsWorldHandle2DRelated API: PibblPhysicsWorldHandle2D.
World identity whose state is queried or drawn. See PibblPhysicsWorldHandle2D.
View source — packages/core/src/features/physics/lib/2d/canvas/debug.ts:14
color (optional)
readonly color?: string | undefinedColor used by the mark or effect. See PibblPhysicsDebug2DProps.
View source — packages/core/src/features/physics/lib/2d/canvas/debug.ts:16
Implementation guidance for agents
Section titled “Implementation guidance for agents”Read the Physics and geometry companion for ownership, adaptation, failure modes, and verification. Agent start provides the version-selection workflow.
Complete minimal examples
Section titled “Complete minimal examples”- Shape measurements: Compare bounds, area, and mass for four common 2D shapes. Plain source
- Physics drawing components: Draw four physics shapes and move a custom kinematic collider. Plain source
- Live physics world: Mount a falling ball, inspect it, and control its body with buttons. Plain source
- Physics events: Record collisions, sensor overlap, body sleep, and contact inspection. Plain source
- World queries: Query a static collider by ray, moving shape, overlap, point, and bounds. Plain source
- Geometry queries: Check point containment, separation, overlap, contact, and casts. Plain source
- Path-like shapes: Create curved, stroked, and polygonal shapes and transform them. Plain source
Documentation version
Section titled “Documentation version”Documentation built with @pibbl/core 0.0.2, revision 272a94a. ALPHA — NOT FOR PRODUCTION USE.