the-world-engine
Version:
three.js based, unity like game engine for browser
49 lines (48 loc) • 1.13 kB
TypeScript
/**
* Calculates buoyancy forces for fluids in the form of a half
* plane.
*/
export class b2BuoyancyController extends b2Controller {
constructor(...args: any[]);
/**
* The outer surface normal
*/
normal: b2Vec2;
/**
* The height of the fluid surface along the normal
*/
offset: number;
/**
* The fluid density
*/
density: number;
/**
* Fluid velocity, for drag calculations
*/
velocity: b2Vec2;
/**
* Linear drag co-efficient
*/
linearDrag: number;
/**
* Angular drag co-efficient
*/
angularDrag: number;
/**
* If false, bodies are assumed to be uniformly dense, otherwise
* use the shapes densities
*/
useDensity: boolean;
/**
* If true, gravity is taken from the world instead of the
*/
useWorldGravity: boolean;
/**
* Gravity vector, if the world's gravity is not used
*/
gravity: b2Vec2;
Step(step: any): void;
Draw(debugDraw: any): void;
}
import { b2Controller } from "./b2_controller.js";
import { b2Vec2 } from "../common/b2_math.js";