API

Interface PhysicsAggregateParameters

The interface for the physics aggregate parameters

interface PhysicsAggregateParameters {
    center?: Vector3;
    extents?: Vector3;
    friction?: number;
    isTriggerShape?: boolean;
    mass: number;
    mesh?: Mesh;
    pointA?: Vector3;
    pointB?: Vector3;
    radius?: number;
    restitution?: number;
    rotation?: Quaternion;
    startAsleep?: boolean;
}
Index
center?: Vector3

mesh local center

extents?: Vector3

Extents for box

friction?: number

The friction of the physics aggregate

isTriggerShape?: boolean

If true, mark the created shape as a trigger shape

mass: number

The mass of the physics aggregate

mesh?: Mesh

mesh object. Used for mesh and convex hull aggregates.

pointA?: Vector3

Starting point for cylinder/capsule

pointB?: Vector3

Ending point for cylinder/capsule

radius?: number

Radius for sphere, cylinder and capsule

restitution?: number

The coefficient of restitution of the physics aggregate

rotation?: Quaternion

Orientation for box

startAsleep?: boolean

Physics engine will try to make this body sleeping and not active