UNPKG

the-world-engine

Version:

three.js based, unity like game engine for browser

36 lines (32 loc) 860 B
import { b2Vec2 } from "../common/b2_math.js"; export class b2MassData { constructor() { this.mass = 0; this.center = new b2Vec2(0, 0); this.I = 0; } } export var b2ShapeType; (function(e) { e[e["e_unknown"] = -1] = "e_unknown"; e[e["e_circleShape"] = 0] = "e_circleShape"; e[e["e_edgeShape"] = 1] = "e_edgeShape"; e[e["e_polygonShape"] = 2] = "e_polygonShape"; e[e["e_chainShape"] = 3] = "e_chainShape"; e[e["e_shapeTypeCount"] = 4] = "e_shapeTypeCount"; })(b2ShapeType || (b2ShapeType = {})); export class b2Shape { constructor(e, t) { this.m_type = b2ShapeType.e_unknown; this.m_radius = 0; this.m_type = e; this.m_radius = t; } Copy(e) { this.m_radius = e.m_radius; return this; } GetType() { return this.m_type; } }