UNPKG

@box2d/debug-draw

Version:

Debug drawing helper for @box2d

93 lines 3.89 kB
export declare function b2Assert(condition: boolean, message?: string): asserts condition; export declare function b2Verify<T>(value: T | null): T; export declare const b2_maxFloat = 1e+37; export declare const b2_epsilon = 0.00001; export declare const b2_epsilon_sq: number; /** * The maximum number of contact points between two convex shapes. Do * not change this value. */ export declare const b2_maxManifoldPoints = 2; /** * This is used to fatten AABBs in the dynamic tree. This allows proxies * to move by a small amount without triggering a tree adjustment. * This is in meters. */ export declare const b2_aabbExtension: number; /** * This is used to fatten AABBs in the dynamic tree. This is used to predict * the future position based on the current displacement. * This is a dimensionless multiplier. */ export declare const b2_aabbMultiplier = 4; /** * A small length used as a collision and constraint tolerance. Usually it is * chosen to be numerically significant, but visually insignificant. In meters. */ export declare const b2_linearSlop: number; /** * A small angle used as a collision and constraint tolerance. Usually it is * chosen to be numerically significant, but visually insignificant. */ export declare const b2_angularSlop: number; /** * The radius of the polygon/edge shape skin. This should not be modified. Making * this smaller means polygons will have an insufficient buffer for continuous collision. * Making it larger may create artifacts for vertex collision. */ export declare const b2_polygonRadius: number; /** Maximum number of sub-steps per contact in continuous physics simulation. */ export declare const b2_maxSubSteps = 8; /** Maximum number of contacts to be handled to solve a TOI impact. */ export declare const b2_maxTOIContacts = 32; /** * The maximum linear position correction used when solving constraints. This helps to * prevent overshoot. Meters. */ export declare const b2_maxLinearCorrection: number; /** * The maximum angular position correction used when solving constraints. This helps to * prevent overshoot. */ export declare const b2_maxAngularCorrection: number; /** * The maximum linear translation of a body per step. This limit is very large and is used * to prevent numerical problems. You shouldn't need to adjust this. Meters. */ export declare const b2_maxTranslation: number; export declare const b2_maxTranslationSquared: number; /** * The maximum angular velocity of a body. This limit is very large and is used * to prevent numerical problems. You shouldn't need to adjust this. */ export declare const b2_maxRotation: number; export declare const b2_maxRotationSquared: number; /** * This scale factor controls how fast overlap is resolved. Ideally this would be 1 so * that overlap is removed in one time step. However using values close to 1 often lead * to overshoot. */ export declare const b2_baumgarte = 0.2; export declare const b2_toiBaumgarte = 0.75; /** The time that a body must be still before it will go to sleep. */ export declare const b2_timeToSleep = 0.5; /** A body cannot sleep if its linear velocity is above this tolerance. */ export declare const b2_linearSleepTolerance: number; /** A body cannot sleep if its angular velocity is above this tolerance. */ export declare const b2_angularSleepTolerance: number; /** * Current version. * @see http://en.wikipedia.org/wiki/Software_versioning */ export declare const b2_version: { major: number; minor: number; patch: number; }; export declare function b2MakeNumberArray(length: number, init?: number): number[]; export declare function b2MakeBooleanArray(length: number, init?: boolean): boolean[]; export interface NoArgsConstructor<T> { new (): T; } export declare function b2MakeArray<T>(length: number, Class: NoArgsConstructor<T>): T[]; //# sourceMappingURL=b2_common.d.ts.map