diff --git a/dist/demo/demo.bundle.js b/dist/demo/demo.bundle.js index 97d42ca6..8925074e 100644 --- a/dist/demo/demo.bundle.js +++ b/dist/demo/demo.bundle.js @@ -829,13 +829,19 @@ class System extends base_system_1.BaseSystem { result = (0, sat_1.testPolygonPolygon)(body, candidate, this.response); } if (state.collisionVector) { + this.response.overlapV = state.collisionVector; + this.response.overlapN = this.response.overlapV.clone().normalize(); + this.response.overlap = this.response.overlapV.len(); + } + if (!body.isConvex || !candidate.isConvex) { this.response.a = body; this.response.b = candidate; + } + if (!body.isConvex) { this.response.aInB = (0, utils_1.checkAInB)(body, candidate); + } + if (!candidate.isConvex) { this.response.bInA = (0, utils_1.checkAInB)(candidate, body); - this.response.overlapV = state.collisionVector; - this.response.overlapN = this.response.overlapV.clone().normalize(); - this.response.overlap = this.response.overlapV.len(); } return result; } diff --git a/dist/system.d.ts.map b/dist/system.d.ts.map index c5128190..c856125c 100644 --- a/dist/system.d.ts.map +++ b/dist/system.d.ts.map @@ -1 +1 @@ -{"version":3,"file":"system.d.ts","sourceRoot":"","sources":["../src/system.ts"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAE3C,OAAO,EACL,IAAI,EAEJ,IAAI,EACJ,aAAa,EACb,QAAQ,EAGR,MAAM,EACP,MAAM,SAAS,CAAC;AASjB;;GAEG;AACH,qBAAa,MAAO,SAAQ,UAAW,YAAW,IAAI;IACpD,QAAQ,EAAE,QAAQ,CAAkB;IAEpC;;OAEG;IACH,UAAU,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI;IAoB5B;;OAEG;IACH,MAAM,CAAC,IAAI,EAAE,IAAI,EAAE,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,KAAK,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC;IAMvE;;OAEG;IACH,MAAM,CAAC,IAAI,EAAE,IAA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IACH,MAAM,CAAC,IAAI,EAAE,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;IAM/B;;OAEG;IACH,MAAM,IAAI,IAAI;IASd;;OAEG;IACH,QAAQ,IAAI,IAAI;IAchB;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,IAAI,EAAE,QAAQ,EAAE,CAAC,QAAQ,EAAE,QAAQ,KAAK,IAAI,GAAG,IAAI;IAalE;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,CAAC,QAAQ,EAAE,QAAQ,KAAK,IAAI,GAAG,IAAI;IAMtD;;OAEG;IACH,aAAa,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,EAAE;IAKjC;;OAEG;IACH,cAAc,CAAC,IAAI,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,GAAG,OAAO;IAqFpD;;OAEG;IACH,OAAO,CACL,KAAK,EAAE,MAAM,EACb,GAAG,EAAE,MAAM,EACX,aAAa,GAAE,CAAC,YAAY,EAAE,IAAI,KAAK,OAAoB,GAC1D,aAAa;IA+BhB,OAAO,CAAC,QAAQ;CAajB"} \ No newline at end of file diff --git a/dist/system.js b/dist/system.js index d19f2626..8bab0970 100644 --- a/dist/system.js +++ b/dist/system.js @@ -138,13 +138,19 @@ class System extends base_system_1.BaseSystem { result = (0, sat_1.testPolygonPolygon)(body, candidate, this.response); } if (state.collisionVector) { + this.response.overlapV = state.collisionVector; + this.response.overlapN = this.response.overlapV.clone().normalize(); + this.response.overlap = this.response.overlapV.len(); + } + if (!body.isConvex || !candidate.isConvex) { this.response.a = body; this.response.b = candidate; + } + if (!body.isConvex) { this.response.aInB = (0, utils_1.checkAInB)(body, candidate); + } + if (!candidate.isConvex) { this.response.bInA = (0, utils_1.checkAInB)(candidate, body); - this.response.overlapV = state.collisionVector; - this.response.overlapN = this.response.overlapV.clone().normalize(); - this.response.overlap = this.response.overlapV.len(); } return result; } diff --git a/dist/system.js.map b/dist/system.js.map index 56afa581..018f8ae0 100644 --- a/dist/system.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M,GACV,QAAQ,CAAC,IAAI,KAAK,aAAK,CAAC,MAAM;gBAC5B,CAAC,CAAC,IAAA,2BAAmB,EAAC,GAAG,EAAE,QAAQ,CAAC;gBACpC,CAAC,CAAC,IAAA,4BAAoB,EAAC,GAAG,EAAE,QAAQ,CAAC,CAAC;YAE1C,MAAM,CAAC,OAAO,CAAC,CAAC,KAAa,EAAE,EAAE;gBAC/B,MAAM,aAAa,GAAW,IAAA,gBAAQ,EAAC,KAAK,EAAE,KAAK,CAAC,CAAC;gBAErD,IAAI,aAAa,GAAG,WAAW,EAAE;oBAC/B,WAAW,GAAG,aAAa,CAAC;oBAC5B,MAAM,GAAG,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC;iBAC9B;YACH,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;QAEH,OAAO,MAAM,CAAC;IAChB,CAAC;IAEO,QAAQ,CAAC,KAAqB;QACpC,IAAI,KAAK,CAAC,QAAQ,EAAE;YAClB,IAAI,OAAO,KAAK,CAAC,eAAe,KAAK,WAAW,EAAE;gBAChD,KAAK,CAAC,eAAe,GAAG,IAAI,iBAAS,EAAE,CAAC;aACzC;YAED,KAAK,CAAC,eAAe,CAAC,GAAG,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;SACnD;QAED,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC;QAEtB,OAAO,KAAK,CAAC,QAAQ,CAAC;IACxB,CAAC;CACF;AArPD,wBAqPC"} \ No newline at end of file diff --git a/docs/classes/Box.html b/docs/classes/Box.html index 97910cf4..3ec7989a 100644 --- a/docs/classes/Box.html +++ b/docs/classes/Box.html @@ -25,7 +25,7 @@
Optional
options: Returns BoxPrivate
_heightPrivate
_widthOptional
isOptional
Inherited from Polygon.isStatic
Optional
isOptional
Inherited from Polygon.isTrigger
Inherited from Polygon.maxX
Inherited from Polygon.maxY
Inherited from Polygon.minX
Inherited from Polygon.minY
Inherited from Polygon.padding
Optional
Inherited from Polygon.system
Readonly
typeOverrides Polygon.type
set box width, update points
@@ -286,7 +286,7 @@Inherited from Polygon.x
updating this.pos.x by this.x = x updates AABB
@@ -308,7 +308,7 @@Inherited from Polygon.x
Inherited from Polygon.y
updating this.pos.y by this.y = y updates AABB
@@ -330,7 +330,7 @@Inherited from Polygon.y
Inherited from Polygon.center
Inherited from Polygon.draw
Inherited from Polygon.getAABBAsBBox
Inherited from Polygon.getCentroidWithoutRotation
Inherited from Polygon.getConvex
Inherited from Polygon.setPosition
Inherited from Polygon.updateAABB
Inherited from Polygon.updateConvexPolygons
Implementation of Collider.updateAABB
Inherited from Polygon.setPosition
Inherited from Polygon.updateAABB
Inherited from Polygon.updateConvexPolygons
Inherited from Box.setPosition
Inherited from Box.updateAABB
Inherited from Box.updateConvexPolygons
Optional
isOptional
Implementation of Collider.isStatic
Optional
isOptional
Implementation of Collider.isTrigger
Implementation of BBox.maxX
Implementation of BBox.maxY
Implementation of BBox.minX
Implementation of BBox.minY
Implementation of Collider.padding
Optional
Implementation of Collider.system
Readonly
typeImplementation of Collider.type
updating this.pos.x by this.x = x updates AABB
@@ -254,7 +254,7 @@updating this.pos.y by this.y = y updates AABB
@@ -274,7 +274,7 @@Implementation of Collider.draw
Implementation of Collider.getAABBAsBBox
Implementation of Collider.updateAABB
Optional
options: Returns BoxInherited from BaseSystem.createBox
Optional
options: Returns CircleInherited from BaseSystem.createCircle
Optional
options: Returns EllipseInherited from BaseSystem.createEllipse
Optional
options: Returns LineInherited from BaseSystem.createLine
Optional
options: Returns PointInherited from BaseSystem.createPoint
Optional
options: Returns PolygonInherited from BaseSystem.createPolygon
Inherited from BaseSystem.draw
Inherited from BaseSystem.drawBVH
Overrides BaseSystem.insert
Overrides BaseSystem.remove
set box height, update points
@@ -264,7 +264,7 @@Parameters
height: number