Documentation
    Preparing search index...

    Interface CollectBodyVelocitiesOptions

    Options for collectBodyVelocities.

    interface CollectBodyVelocitiesOptions {
        angularColor?: DebugColor;
        color?: DebugColor;
        includeAngular?: boolean;
        scale?: number;
        skipSleeping?: boolean;
    }
    Index
    angularColor?: DebugColor

    Angular velocity colour. Defaults to DEBUG_DRAW_DEFAULT_COLORS.

    color?: DebugColor

    Linear velocity colour. Defaults to DEBUG_DRAW_DEFAULT_COLORS.

    includeAngular?: boolean

    Also draw the angular velocity vector (rad/s), from the same origin, with the same scale. Defaults to false because in a "2d" world the angular velocity lies on ±Z (§21) and is therefore invisible to a Z-facing camera — useful in 3D, misleading as a default in 2D.

    scale?: number

    Seconds of travel the drawn vector represents: the segment runs from the body origin to origin + velocity * scale, so scale is a time and the tip is where the body would be after that long at its current velocity. Defaults to 1 (§7a: seconds everywhere).

    skipSleeping?: boolean

    Skip bodies the solver reports asleep (§32). Defaults to false: a sleeping body's velocity is zero, so its segment is a degenerate point and costs one segment; skipping is offered for large worlds where that adds up.