@dominicstop/utils
Version:
Yet another event emitter written in typescript.
26 lines • 1.12 kB
TypeScript
import { AnyParticle } from "./AnyParticle";
import { PhysicsEngine } from "./PhysicsEngine";
import { SomeOfflineSimulation } from "./SomeOfflineSimulation";
import { SomeParticleForce } from "./SomeParticleForce";
import { SomeSystemForce } from "./SomeSystemForce";
export declare class OfflineSimulation<SomeParticle extends AnyParticle> implements SomeOfflineSimulation<SomeParticle> {
engine: PhysicsEngine<SomeParticle>;
isRunning: boolean;
private _totalSimulatedTime;
private _iterationCount;
readonly fixedDeltaTimeSeconds: number;
maxIterations: number;
onPreStep: ((deltaTime: number) => void) | null;
onPostStep: ((deltaTime: number) => void) | null;
onUpdate: (() => void) | null;
constructor(engine: PhysicsEngine<SomeParticle>, fixedDeltaTime?: number);
get totalSimulatedTime(): number;
get iterationCount(): number;
run(): void;
step(): void;
reset(): void;
addParticle(particle: SomeParticle): void;
addForce(force: SomeParticleForce | SomeSystemForce): void;
isStable(): boolean;
}
//# sourceMappingURL=OfflineSimulation.d.ts.map