the-world-engine
Version:
three.js based, unity like game engine for browser
39 lines (38 loc) • 1.42 kB
TypeScript
export class b2Island {
m_bodies: any[];
m_contacts: any[];
m_joints: any[];
m_positions: b2Position[];
m_velocities: b2Velocity[];
m_bodyCount: number;
m_jointCount: number;
m_contactCount: number;
m_bodyCapacity: number;
m_contactCapacity: number;
m_jointCapacity: number;
Initialize(bodyCapacity: any, contactCapacity: any, jointCapacity: any, listener: any): void;
m_listener: any;
Clear(): void;
AddBody(body: any): void;
AddContact(contact: any): void;
AddJoint(joint: any): void;
Solve(profile: any, step: any, gravity: any, allowSleep: any): void;
SolveTOI(subStep: any, toiIndexA: any, toiIndexB: any): void;
Report(constraints: any): void;
}
export namespace b2Island {
const s_timer: b2Timer;
const s_solverData: b2SolverData;
const s_contactSolverDef: b2ContactSolverDef;
const s_contactSolver: b2ContactSolver;
const s_translation: b2Vec2;
const s_impulse: b2ContactImpulse;
}
import { b2Position } from "./b2_time_step.js";
import { b2Velocity } from "./b2_time_step.js";
import { b2Timer } from "../common/b2_timer.js";
import { b2SolverData } from "./b2_time_step.js";
import { b2ContactSolverDef } from "./b2_contact_solver.js";
import { b2ContactSolver } from "./b2_contact_solver.js";
import { b2Vec2 } from "../common/b2_math.js";
import { b2ContactImpulse } from "./b2_world_callbacks.js";