UNPKG

the-world-engine

Version:

three.js based, unity like game engine for browser

19 lines (15 loc) 612 B
import { b2CollideEdgeAndPolygon } from "../collision/b2_collide_edge.js"; import { b2EdgeShape } from "../collision/b2_edge_shape.js"; import { b2Contact } from "./b2_contact.js"; export class b2ChainAndPolygonContact extends b2Contact { static Create() { return new b2ChainAndPolygonContact; } static Destroy(o) {} Evaluate(o, t, n) { const e = b2ChainAndPolygonContact.Evaluate_s_edge; this.GetShapeA().GetChildEdge(e, this.m_indexA); b2CollideEdgeAndPolygon(o, e, t, this.GetShapeB(), n); } } b2ChainAndPolygonContact.Evaluate_s_edge = new b2EdgeShape;