* Stroke the orange body AABB and the red collision shapes for the * given renderable. Caller is responsible for positioning the renderer * at the body's local-coordinate origin (i.e. the renderable origin * for general renderables, or the anchor-shifted body origin for * entities). Used by both
(renderer, panel, adapter, renderable, aabb)
| 136 | * @param {Bounds} aabb |
| 137 | */ |
| 138 | function strokeBodyHitbox(renderer, panel, adapter, renderable, aabb) { |
| 139 | renderer.setColor("orange"); |
| 140 | renderer.stroke(aabb); |
| 141 | renderer.setColor("red"); |
| 142 | for (const shape of adapter.getBodyShapes(renderable)) { |
| 143 | renderer.stroke(shape); |
| 144 | panel.counters.inc("shapes"); |
| 145 | } |
| 146 | } |
| 147 | |
| 148 | /** |
| 149 | * Stroke a blue velocity arrow from `(originX, originY)` along the |
no test coverage detected