Full Code of Sinova/Collisions for AI

master f59299c1a333 cached
69 files
7.4 MB
1.9M tokens
156 symbols
1 requests
Download .txt
Showing preview only (7,797K chars total). Download the full file or copy to clipboard to get everything.
Repository: Sinova/Collisions
Branch: master
Commit: f59299c1a333
Files: 69
Total size: 7.4 MB

Directory structure:
gitextract_owam7utj/

├── .esdoc.json
├── .gitignore
├── LICENSE
├── README.md
├── collisions.d.ts
├── demo/
│   ├── examples/
│   │   ├── Stress.mjs
│   │   └── Tank.mjs
│   └── index.mjs
├── docs/
│   ├── ast/
│   │   └── source/
│   │       ├── .external-ecmascript.js.json
│   │       ├── Collisions.mjs.json
│   │       └── modules/
│   │           ├── BVH.mjs.json
│   │           ├── BVHBranch.mjs.json
│   │           ├── Body.mjs.json
│   │           ├── Circle.mjs.json
│   │           ├── Point.mjs.json
│   │           ├── Polygon.mjs.json
│   │           ├── Result.mjs.json
│   │           └── SAT.mjs.json
│   ├── class/
│   │   └── src/
│   │       ├── Collisions.mjs~Collisions.html
│   │       └── modules/
│   │           ├── Body.mjs~Body.html
│   │           ├── Circle.mjs~Circle.html
│   │           ├── Point.mjs~Point.html
│   │           ├── Polygon.mjs~Polygon.html
│   │           └── Result.mjs~Result.html
│   ├── coverage.json
│   ├── css/
│   │   ├── github.css
│   │   ├── identifiers.css
│   │   ├── manual.css
│   │   ├── prettify-tomorrow.css
│   │   ├── search.css
│   │   ├── source.css
│   │   ├── style.css
│   │   └── test.css
│   ├── demo/
│   │   ├── index.html
│   │   └── index.js
│   ├── file/
│   │   └── src/
│   │       ├── Collisions.mjs.html
│   │       └── modules/
│   │           ├── BVH.mjs.html
│   │           ├── BVHBranch.mjs.html
│   │           ├── Body.mjs.html
│   │           ├── Circle.mjs.html
│   │           ├── Point.mjs.html
│   │           ├── Polygon.mjs.html
│   │           ├── Result.mjs.html
│   │           └── SAT.mjs.html
│   ├── identifiers.html
│   ├── index.html
│   ├── index.json
│   ├── script/
│   │   ├── inherited-summary.js
│   │   ├── inner-link.js
│   │   ├── manual.js
│   │   ├── patch-for-local.js
│   │   ├── prettify/
│   │   │   ├── Apache-License-2.0.txt
│   │   │   └── prettify.js
│   │   ├── pretty-print.js
│   │   ├── search.js
│   │   ├── search_index.js
│   │   └── test-summary.js
│   └── source.html
├── package.json
├── src/
│   ├── Collisions.mjs
│   └── modules/
│       ├── BVH.mjs
│       ├── BVHBranch.mjs
│       ├── Body.mjs
│       ├── Circle.mjs
│       ├── Point.mjs
│       ├── Polygon.mjs
│       ├── Result.mjs
│       └── SAT.mjs
└── webpack.config.js

================================================
FILE CONTENTS
================================================

================================================
FILE: .esdoc.json
================================================
{
	"source"      : "./src",
	"destination" : "./docs",
	"includes"    : ["\\.js$", "\\.mjs$"],

	"plugins" : [
		{
			"name" : "esdoc-standard-plugin",

			"option" : {
				"accessor": {
					"access" : ["public", "protected"],
					"autoPrivate" : true
				},

				"lint": {"enable": false},
				"typeInference": {"enable": false}
			}
		}
	]
}


================================================
FILE: .gitignore
================================================
node_modules


================================================
FILE: LICENSE
================================================
MIT License

Copyright (c) 2017 Sinova

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


================================================
FILE: README.md
================================================
Collisions
===============================================================================

**Collisions** is a JavaScript library for quickly and accurately detecting collisions between Polygons, Circles, and Points. It combines the efficiency of a [Bounding Volume Hierarchy](https://en.wikipedia.org/wiki/Bounding_volume_hierarchy) (BVH) for broad-phase searching and the accuracy of the [Separating Axis Theorem](https://en.wikipedia.org/wiki/Separating_axis_theorem) (SAT) for narrow-phase collision testing.

* [Installation](#anchor-installation)
* [Documentation](#anchor-documentation)
* [Demos](#anchor-demos)
* [Usage](#anchor-usage)
* [Getting Started](#anchor-getting-started)
	1. [Creating a Collision System](#anchor-step-1)
	2. [Creating, Inserting, Updating, and Removing Bodies](#anchor-step-2)
	3. [Updating the Collision System](#anchor-step-3)
	4. [Testing for Collisions](#anchor-step-4)
	5. [Getting Detailed Collision Information](#anchor-step-5)
	6. [Negating Overlap](#anchor-step-6)
* [Lines](#anchor-lines)
* [Concave Polygons](#anchor-concave-polygons)
* [Rendering](#anchor-rendering)
* [Bounding Volume Padding](#anchor-bounding-volume-padding)
* [Only using SAT](#anchor-only-using-sat)
* [FAQ](#anchor-faq)

<a name="anchor-installation"></a>
Installation
===============================================================================

```bash
npm install collisions
```

> **Note:** This library uses the native ECMAScript Module syntax. Most environments support native modules, but the following exceptions apply:
>
> * Node.js (9.2.0) requires the [--experimental-modules](https://nodejs.org/api/esm.html) flag
> * Firefox (54) requires the [dom.moduleScripts.enabled](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/import#Browser_compatibility) setting
>
> Bundling solutions such as [Webpack](https://webpack.js.org/) or [Rollup.js](https://rollupjs.org/) make native modules compatible with all environments.

<a name="anchor-documentation"></a>
Documentation
===============================================================================

View the [documentation](https://sinova.github.com/Collisions/) (this README is also there).

<a name="anchor-demos"></a>
Demos
===============================================================================

* [Tank](https://sinova.github.com/Collisions/demo/)
* [Stress Test](https://sinova.github.com/Collisions/demo/?stress)

<a name="anchor-usage"></a>
Usage
===============================================================================

```JavaScript
import Collisions from 'collisions';

// Create the collision system
const system = new Collisions();

// Create a Result object for collecting information about the collisions
const result = system.createResult();

// Create the player (represented by a Circle)
const player = system.createCircle(100, 100, 10);

// Create some walls (represented by Polygons)
const wall1 = system.createPolygon(400, 500, [[-60, -20], [60, -20], [60, 20], [-60, 20]], 1.7);
const wall2 = system.createPolygon(200, 100, [[-60, -20], [60, -20], [60, 20], [-60, 20]], 2.2);
const wall3 = system.createPolygon(400, 50, [[-60, -20], [60, -20], [60, 20], [-60, 20]], 0.7);

// Update the collision system
system.update();

// Get any potential collisions (this quickly rules out walls that have no chance of colliding with the player)
const potentials = player.potentials();

// Loop through the potential wall collisions
for(const wall of potentials) {
	// Test if the player collides with the wall
	if(player.collides(wall, result)) {
		// Push the player out of the wall
		player.x -= result.overlap * result.overlap_x;
		player.y -= result.overlap * result.overlap_y;
	}
}
```

<a name="anchor-getting-started"></a>
Getting Started
===============================================================================

<a name="anchor-step-1"></a>
## 1. Creating a Collision System

**Collisions** provides functions for performing both broad-phase and narrow-phase collision tests. In order to take full advantage of both phases, bodies need to be tracked within a collision system.

Call the Collisions constructor to create a collision system.

```JavaScript
import Collisions from 'collisions';

const system = new Collisions();
```

<a name="anchor-step-2"></a>
## 2. Creating, Inserting, Updating, and Removing Bodies

**Collisions** supports the following body types:

* **Circle:** A shape with infinite sides equidistant from a single point
* **Polygon:** A shape made up of line segments
* **Point:** A single coordinate

To use them, import the desired body class, call its constructor, and insert it into the collision system using `insert()`.

```JavaScript
import {Collisions, Circle, Polygon, Point} from 'collisions';

const system = new Collisions();

const circle  = new Circle(100, 100, 10);
const polygon = new Polygon(50, 50, [[0, 0], [20, 20], [-10, 10]]);
const line    = new Polygon(200, 5, [[-30, 0], [10, 20]]);
const point   = new Point(10, 10);

system.insert(circle)
system.insert(polygon, line, point);
```

Collision systems expose several convenience functions for creating bodies and inserting them into the system in one step. This also avoids having to import the different body classes.

```JavaScript
import Collisions from 'collisions';

const system = new Collisions();

const circle  = system.createCircle(100, 100, 10);
const polygon = system.createPolygon(50, 50, [[0, 0], [20, 20], [-10, 10]]);
const line    = system.createPolygon(200, 5, [[-30, 0], [10, 20]]);
const point   = system.createPoint(10, 10);
```

All bodies have `x` and `y` properties that can be manipulated. Additionally, `Circle` bodies have a `scale` property that can be used to scale their overall size. `Polygon` bodies have `scale_x` and `scale_y` properties to scale their points along a particular axis and an `angle` property to rotate their points around their current position (using radians).

```JavaScript
circle.x     = 20;
circle.y     = 30;
circle.scale = 1.5;

polygon.x       = 40;
polygon.y       = 100;
polygon.scale_x = 1.2;
polygon.scale_y = 3.4;
polygon.angle   = 1.2;
```

And, of course, bodies can be removed when they are no longer needed.

```JavaScript
system.remove(polygon, point);
circle.remove();
```

<a name="anchor-step-3"></a>
## 3. Updating the Collision System

Collision systems need to be updated when the bodies within them change. This includes when bodies are inserted, removed, or when their properties change (e.g. position, angle, scaling, etc.). Updating a collision system is done by calling `update()` and should typically occur once per frame.

```JavaScript
system.update();
```

The optimal time for updating a collision system is **after** its bodies have changed and **before** collisions are tested. For example, a game loop might use the following order of events:

```JavaScript
function gameLoop() {
	handleInput();
	processGameLogic();

	system.update();

	handleCollisions();
	render();
}
```

<a name="anchor-step-4"></a>
## 4. Testing for Collisions

When testing for collisions on a body, it is generally recommended that a broad-phase search be performed first by calling `potentials()` in order to quickly rule out bodies that are too far away to collide. **Collisions** uses a [Bounding Volume Hierarchy](https://en.wikipedia.org/wiki/Bounding_volume_hierarchy) (BVH) for its broad-phase search. Calling `potentials()` on a body traverses the BVH and builds a list of potential collision candidates.

```JavaScript
const potentials = polygon.potentials();
```

Once a list of potential collisions is acquired, loop through them and perform a narrow-phase collision test using `collides()`. **Collisions** uses the [Separating Axis Theorem](https://en.wikipedia.org/wiki/Separating_axis_theorem) (SAT) for its narrow-phase collision tests.

```JavaScript
const potentials = polygon.potentials();

for(const body of potentials) {
	if(polygon.collides(body)) {
		console.log('Collision detected!');
	}
}
```

It is also possible to skip the broad-phase search entirely and call `collides()` directly on two bodies.

> **Note:** Skipping the broad-phase search is not recommended. When testing for collisions against large numbers of bodies, performing a broad-phase search using a BVH is *much* more efficient.

```JavaScript
if(polygon.collides(line)) {
	console.log('Collision detected!');
}
```

<a name="anchor-step-5"></a>
## 5. Getting Detailed Collision Information

There is often a need for detailed information about a collision in order to react to it appropriately. This information is stored using a `Result` object. `Result` objects have several properties set on them when a collision occurs, all of which are described in the [documentation](https://sinova.github.com/Collisions/).

For convenience, there are several ways to create a `Result` object. `Result` objects do not belong to any particular collision system, so any of the following methods for creating one can be used interchangeably. This also means the same `Result` object can be used for collisions across multiple systems.

> **Note:** It is highly recommended that `Result` objects be recycled when performing multiple collision tests in order to save memory. The following example creates multiple `Result` objects strictly as a demonstration.

```JavaScript
import {Collisions, Result, Polygon} from 'collisions';

const system     = new Collisions();
const my_polygon = new Polygon(100, 100, 10);

const result1 = new Result();
const result2 = Collisions.createResult();
const result3 = system.createResult();
const result4 = Polygon.createResult();
const result5 = my_polygon.createResult();
```

To use a `Result` object, pass it into `collides()`. If a collision occurs, it will be populated with information about the collision. Take note in the following example that the same `Result` object is being reused each iteration.

```JavaScript
const result     = system.createResult();
const potentials = point.potentials();

for(const body of potentials) {
	if(point.collides(body, result)) {
		console.log(result);
	}
}
```

<a name="anchor-step-6"></a>
## 6. Negating Overlap

A common use-case in collision detection is negating overlap when a collision occurs (such as when a player hits a wall). This can be done using the collision information in a `Result` object (see [Getting Detailed Collision Information](#anchor-getting-detailed-collision-information)).

The three most useful properties on a `Result` object are `overlap`, `overlap_x`, and `overlap_y`. Together, these values describe how much and in what direction the source body is overlapping the target body. More specifically, `overlap_x` and `overlap_y` describe the direction vector, and `overlap` describes the magnitude of that vector.

These values can be used to "push" one body out of another using the minimum distance required. More simply, subtracting this vector from the source body's position will cause the bodies to no longer collide. Here's an example:

```JavaScript
if(player.collides(wall, result)) {
	player.x -= result.overlap * result.overlap_x;
	player.y -= result.overlap * result.overlap_y;
}
```

<a name="anchor-lines"></a>
Lines
===============================================================================

Creating a line is simply a matter of creating a single-sided polygon (i.e. a polygon with only two coordinate pairs).

```JavaScript
const line = new Polygon(200, 5, [[-30, 0], [10, 20]]);
```

<a name="anchor-concave-polygons"></a>
Concave Polygons
===============================================================================

**Collisions** uses the [Separating Axis Theorem](https://en.wikipedia.org/wiki/Separating_axis_theorem) (SAT) for its narrow-phase collision tests. One caveat to SAT is that it only works properly on convex bodies. However, concave polygons can be "faked" by using a series of [Lines](#anchor-lines). Keep in mind that a polygon drawn using [Lines](#anchor-lines) is "hollow".

Handling true concave polygons requires breaking them down into their component convex polygons (Convex Decomposition) and testing them for collisions individually. There are plans to integrate this functionality into the library in the future, but for now, check out [poly-decomp.js](https://github.com/schteppe/poly-decomp.js).

<a name="anchor-rendering"></a>
Rendering
===============================================================================

For debugging, it is often useful to be able to visualize the collision bodies. All of the bodies in a Collision system can be drawn to a `<canvas>` element by calling `draw()` and passing in the canvas' 2D context.

```JavaScript
const canvas  = document.createElement('canvas');
const context = canvas.getContext('2d');

// ...
context.strokeStyle = '#FFFFFF';
context.beginPath();

system.draw(context);

context.stroke();
```

Bodies can be individually drawn as well.

```JavaScript
context.strokeStyle = '#FFFFFF';
context.beginPath();

polygon.draw(context);
circle.draw(context);

context.stroke();
```

The BVH can also be drawn to help test [Bounding Volume Padding](#anchor-bounding-volume-padding).

```JavaScript
context.strokeStyle = '#FFFFFF';
context.beginPath();

system.drawBVH(context);

context.stroke();
```

<a name="anchor-bounding-volume-padding"></a>
Bounding Volume Padding
===============================================================================

When bodies move around within a collision system, the internal BVH has to remove and reinsert the body in order to determine where it belongs in the hierarchy. This is one of the most costly operations in maintaining a BVH. In general, most projects will never see a performance issue from this unless they are dealing with thousands of moving bodies at once. In these cases, it can *sometimes* be beneficial to "pad" the bounding volumes of each body so that the BVH doesn't need to remove and reinsert bodies that haven't changed position too much. In other words, padding the bounding volume allows "breathing room" for the body within it to move around without being flagged for an update.

The tradeoff is that the slightly larger bounding volumes can trigger more false-positives during the broad-phase `potentials()` search. While the narrow phase will ultimately rule these out using Axis Aligned Bounding Box tests, putting too much padding on bodies that are crowded can lead to too many false positives and a diminishing return in performance. It is up to the developer to determine how much padding each body will need based on how much it can move within a single frame and how crowded the bodies in the system are.

Padding can be added to a body when instantiating it (see the [documentation](https://sinova.github.com/Collisions/) for each body) or at any time by changing its `padding` property.

```JavaScript
const padding = 5;
const circle  = new Circle(100, 100, 10, 1, padding);

// ...

circle.padding = 10;
```

<a name="anchor-only-using-sat"></a>
Only using SAT
===============================================================================

Some projects may only have a need to perform SAT collision tests without broad-phase searching. This can be achieved by avoiding collision systems altogether and only using the `collides()` function.

```JavaScript
import {Circle, Polygon, Result} from 'collisions';

const circle  = new Circle(45, 45, 20);
const polygon = new Polygon(50, 50, [[0, 0], [20, 20], [-10, 10]]);
const result  = new Result();

if(circle.collides(polygon, result)) {
	console.log(result);
}
```

<a name="anchor-faq"></a>
FAQ
===============================================================================

## Why shouldn't I just use a physics engine?

Projects requiring physics are encouraged to use one of the several physics engines out there (e.g. [Matter.js](https://github.com/liabru/matter-js), [Planck.js](https://github.com/shakiba/planck.js)). However, many projects end up using physics engines solely for collision detection, and developers often find themselves having to work around some of the assumptions that these engines make (gravity, velocity, friction, etc.). **Collisions** was created to provide robust collision detection and nothing more. In fact, a physics engine could easily be written with **Collisions** at its core.

## Why does the source code seem to have quite a bit of copy/paste?

**Collisions** was written with performance as its primary focus. Conscious decisions were made to sacrifice readability in order to avoid the overhead of unnecessary function calls or property lookups.

## Sometimes bodies can "squeeze" between two other bodies. What's going on?

This isn't caused by faulty collisions, but rather how a project handles its collision responses. There are several ways to go about responding to collisions, the most common of which is to loop through all bodies, find their potential collisions, and negate any overlaps that are found one at a time. Since the overlaps are negated one at a time, the last negation takes precedence and can cause the body to be pushed into another body.

One workaround is to resolve each collision, update the collision system, and repeat until no collisions are found. Keep in mind that this can potentially lead to infinite loops if the two colliding bodies equally negate each other. Another solution is to collect all overlaps and combine them into a single resultant vector and then push the body out, but this can get rather complicated.

There is no perfect solution. How collisions are handled depends on the project.


================================================
FILE: collisions.d.ts
================================================
/**
 * The base class for bodies used to detect collisions
 * @export
 * @abstract
 * @class Body
 */
export abstract class Body {
    x: number;
    y: number;
    padding: number;

    /**
     * Determines if the body is colliding with another body
     * @param {Circle|Polygon|Point} target The target body to test against
     * @param {Result} [result = null] A Result object on which to store information about the collision
     * @param {boolean} [aabb = true] Set to false to skip the AABB test (useful if you use your own potential collision heuristic)
     * @returns {boolean}
     */
    collides(target: Body, result?: Result, aabb?: boolean): boolean;

    /**
     * Returns a list of potential collisions
     * @returns {Body[]}
     */
    potentials(): Body[];

    /**
     * Removes the body from its current collision system
     */
    remove(): void;

    /**
     * Draws the bodies within the system to a CanvasRenderingContext2D's current path
     * @param {CanvasRenderingContext2D} context
     */
    draw(context: CanvasRenderingContext2D): void;
}

/**
 * A circle used to detect collisions
 * @export
 * @class Circle
 * @extends {Body}
 */
export class Circle extends Body {
    /**
     * @constructor
     * @param {number} [x = 0] The starting X coordinate
     * @param {number} [y = 0] The starting Y coordinate
     * @param {number} [radius = 0] The radius
     * @param {number} [scale = 1] The scale
     * @param {number} [padding = 0] The amount to pad the bounding volume when testing for potential collisions
     */
    constructor(x?: number, y?: number, radius?: number, scale?: number, padding?: number);
    radius: number;
    scale: number;
}

/**
 * A polygon used to detect collisions
 * @export
 * @class Polygon
 * @extends {Body}
 */
export class Polygon extends Body {
    /**
     * @constructor
     * @param {number} [x = 0] The starting X coordinate
     * @param {number} [y = 0] The starting Y coordinate
     * @param {number[][]} [points = []] An array of coordinate pairs making up the polygon - [[x1, y1], [x2, y2], ...]
     * @param {number} [angle = 0] The starting rotation in radians
     * @param {number} [scale_x = 1] The starting scale along the X axis
     * @param {number} [scale_y = 1] The starting scale long the Y axis
     * @param {number} [padding = 0] The amount to pad the bounding volume when testing for potential collisions
     */
    constructor(x?: number, y?: number, points?: number[][], angle?: number, scale_x?: number, scale_y?: number, padding?: number);
    angle: number;
    scale_x: number;
    scale_y: number;
}

/**
 * A point used to detect collisions
 * @export
 * @class Point
 * @extends {Body}
 */
export class Point extends Body {
    constructor(x?: number, y?: number, padding?: number);
}

/**
 * An object used to collect the detailed results of a collision test
 *
 * > **Note:** It is highly recommended you recycle the same Result object if possible in order to avoid wasting memory
 * @export
 * @class Result
 */
export class Result {
    collision: boolean;
    a: Body;
    b: Body;
    a_in_b: boolean;
    b_in_a: boolean;
    overlap: number;
    overlap_x: number;
    overlap_y: number;
}

/**
 * A collision system used to track bodies in order to improve collision detection performance
 * @export
 * @class Collisions
 */
export class Collisions {
    /**
     * Creates a {@link Circle} and inserts it into the collision system
     * @param {number} [x = 0] The starting X coordinate
     * @param {number} [y = 0] The starting Y coordinate
     * @param {number} [radius = 0] The radius
     * @param {number} [scale = 1] The scale
     * @param {number} [padding = 0] The amount to pad the bounding volume when testing for potential collisions
     * @returns {Circle}
     */
    createCircle(x?: number, y?: number, radius?: number, scale?: number, padding?: number): Circle;

    /**
     * Creates a {@link Polygon} and inserts it into the collision system
     * @param {number} [x = 0] The starting X coordinate
     * @param {number} [y = 0] The starting Y coordinate
     * @param {number[][]} [points = []] An array of coordinate pairs making up the polygon - [[x1, y1], [x2, y2], ...]
     * @param {number} [angle = 0] The starting rotation in radians
     * @param {number} [scale_x = 1] The starting scale along the X axis
     * @param {number} [scale_y = 1] The starting scale long the Y axis
     * @param {number} [padding = 0] The amount to pad the bounding volume when testing for potential collisions
     * @returns {Polygon}
     */
    createPolygon(x?: number, y?: number, points?: number[][], angle?: number, scale_x?: number, scale_y?: number, padding?: number): Polygon;

    /**
     * Creates a {@link Point} and inserts it into the collision system
     * @param {number} [x = 0] The starting X coordinate
     * @param {number} [y = 0] The starting Y coordinate
     * @param {number} [padding = 0] The amount to pad the bounding volume when testing for potential collisions
     * @returns {Point}
     */
    createPoint(x?: number, y?: number, padding?: number): Point;

    /**
     * Creates a {@link Result} used to collect the detailed results of a collision test
     * @returns {Result}
     */
    createResult(): Result;

    /**
     * Inserts bodies into the collision system
     * @param {Body} bodies
     * @returns {Collisions}
     */
    insert(bodies: Body): Collisions;

    /**
     * Removes bodies from the collision system
     * @param {Body} bodies
     * @returns {Collisions}
     */
    remove(bodies: Body): Collisions;

    /**
     * Updates the collision system. This should be called before any collisions are tested.
     * @returns {Collisions}
     */
    update(): Collisions;

    /**
     * Returns a list of potential collisions for a body
     * @param {Body} [body]
     * @returns {Body[]}
     */
    potentials(body?: Body): Body[];

    /**
     * Determines if two bodies are colliding
     * @param {Body} source
     * @param {Body} target
     * @param {Result} [result]
     * @param {boolean} [aabb]
     * @returns {boolean}
     */
    collides(source: Body, target: Body, result?: Result, aabb?: boolean): boolean;

    /**
     * Draws the bodies within the system to a CanvasRenderingContext2D's current path
     * @param {CanvasRenderingContext2D} context
     */
    draw(context: CanvasRenderingContext2D): void;

    /**
     * Draws the system's BVH to a CanvasRenderingContext2D's current path. This is useful for testing out different padding values for bodies.
     * @param {CanvasRenderingContext2D} context
     */
    drawBVH(context: CanvasRenderingContext2D): void;
}

================================================
FILE: demo/examples/Stress.mjs
================================================
import Collisions from '../../src/Collisions.mjs';

const result = Collisions.createResult();
const width  = 800;
const height = 600;
const count  = 500
const speed  = 1;
const size   = 5;

let frame     = 0;
let fps_total = 0;

export default class Stress {
	constructor() {
		this.element    = document.createElement('div');
		this.canvas     = document.createElement('canvas');
		this.context    = this.canvas.getContext('2d');
		this.collisions = new Collisions();
		this.bodies     = [];
		this.polygons   = 0;
		this.circles    = 0;

		this.canvas.width  = width;
		this.canvas.height = height;
		this.context.font  = '24px Arial';

		// World bounds
		this.collisions.createPolygon(0, 0, [[0, 0], [width, 0]]);
		this.collisions.createPolygon(0, 0, [[width, 0], [width, height]]);
		this.collisions.createPolygon(0, 0, [[width, height], [0, height]]);
		this.collisions.createPolygon(0, 0, [[0, height], [0, 0]]);

		for(let i = 0; i < count; ++i) {
			this.createShape(!random(0, 49));
		}

		this.element.innerHTML = `
			<div><b>Total:</b> ${count}</div>
			<div><b>Polygons:</b> ${this.polygons}</div>
			<div><b>Circles:</b> ${this.circles}</div>
			<div><label><input id="bvh" type="checkbox"> Show Bounding Volume Hierarchy</label></div>
		`;

		this.bvh_checkbox = this.element.querySelector('#bvh');
		this.element.appendChild(this.canvas);

		const self = this;

		let time = performance.now();

		this.frame = requestAnimationFrame(function frame() {
			const current_time = performance.now();

			self.update(1000 / (current_time - time));
			self.frame = requestAnimationFrame(frame);

			time = current_time;
		});
	}

	update(fps) {
		this.collisions.update();

		++frame;
		fps_total += fps;

		const average_fps = Math.round(fps_total / frame);

		if(frame > 100) {
			frame     = 1;
			fps_total = average_fps;
		}

		for(let i = 0; i < this.bodies.length; ++i) {
			const body = this.bodies[i];

			body.x += body.direction_x * speed;
			body.y += body.direction_y * speed;

			const potentials = body.potentials();

			for(const body2 of potentials) {
				if(body.collides(body2, result)) {
					body.x -= result.overlap * result.overlap_x;
					body.y -= result.overlap * result.overlap_y;

					let dot = body.direction_x * result.overlap_y + body.direction_y * -result.overlap_x;

					body.direction_x = 2 * dot * result.overlap_y - body.direction_x;
					body.direction_y = 2 * dot * -result.overlap_x - body.direction_y;

					dot = body2.direction_x * result.overlap_y + body2.direction_y * -result.overlap_x;

					body2.direction_x = 2 * dot * result.overlap_y - body2.direction_x;
					body2.direction_y = 2 * dot * -result.overlap_x - body2.direction_y;
				}
			}
		}

		// Clear the canvas
		this.context.fillStyle = '#000000';
		this.context.fillRect(0, 0, width, height);

		// Render the bodies
		this.context.strokeStyle = '#FFFFFF';
		this.context.beginPath();
		this.collisions.draw(this.context);
		this.context.stroke();

		// Render the BVH
		if(this.bvh_checkbox.checked) {
			this.context.strokeStyle = '#00FF00';
			this.context.beginPath();
			this.collisions.drawBVH(this.context);
			this.context.stroke();
		}

		// Render the FPS
		this.context.fillStyle = '#FFCC00';
		this.context.fillText(average_fps, 10, 30);
	}

	createShape(large) {
		const min_size  = size * 0.75 * (large ? 3 : 1);
		const max_size  = size * 1.25 * (large ? 5 : 1);
		const x         = random(0, width);
		const y         = random(0, height);
		const direction = random(0, 360) * Math.PI / 180;

		let body;

		if(random(0, 2)) {
			body = this.collisions.createCircle(x, y, random(min_size, max_size));

			++this.circles;
		}
		else {
			body = this.collisions.createPolygon(x, y, [
				[-random(min_size, max_size), -random(min_size, max_size)],
				[random(min_size, max_size), -random(min_size, max_size)],
				[random(min_size, max_size), random(min_size, max_size)],
				[-random(min_size, max_size), random(3, size)],
			], random(0, 360) * Math.PI / 180);

			++this.polygons;
		}

		body.direction_x = Math.cos(direction);
		body.direction_y = Math.sin(direction);

		this.bodies.push(body);
	}
}

function random(min, max) {
	return Math.floor(Math.random() * max) + min;
}


================================================
FILE: demo/examples/Tank.mjs
================================================
import Collisions from '../../src/Collisions.mjs';

const width  = 800;
const height = 600;
const result = Collisions.createResult();

export default class Tank {
	constructor() {
		const collisions = new Collisions();

		this.element    = document.createElement('div');
		this.canvas     = document.createElement('canvas');
		this.context    = this.canvas.getContext('2d');
		this.collisions = collisions;
		this.bodies     = [];

		this.canvas.width  = width;
		this.canvas.height = height;
		this.player        = null;

		this.up    = false;
		this.down  = false;
		this.left  = false;
		this.right = false;

		this.element.innerHTML = `
			<div><b>W, S</b> - Accelerate/Decelerate</div>
			<div><b>A, D</b> - Turn</div>
			<div><label><input id="bvh" type="checkbox"> Show Bounding Volume Hierarchy</label></div>
		`;

		const updateKeys = (e) => {
			const keydown = e.type === 'keydown';
			const key     = e.key.toLowerCase();

			key === 'w' && (this.up = keydown);
			key === 's' && (this.down = keydown);
			key === 'a' && (this.left = keydown);
			key === 'd' && (this.right = keydown);
		};

		document.addEventListener('keydown', updateKeys);
		document.addEventListener('keyup', updateKeys);

		this.bvh_checkbox = this.element.querySelector('#bvh');
		this.element.appendChild(this.canvas);

		this.createPlayer(400, 300);
		this.createMap();

		const frame = () => {
			this.update();
			requestAnimationFrame(frame);
		};

		frame();
	}

	update() {
		this.handleInput();
		this.processGameLogic();
		this.handleCollisions();
		this.render();
	}

	handleInput() {
		this.up    && (this.player.velocity += 0.1);
		this.down  && (this.player.velocity -= 0.1);
		this.left  && (this.player.angle -= 0.04);
		this.right && (this.player.angle += 0.04);
	}

	processGameLogic() {
		const x = Math.cos(this.player.angle);
		const y = Math.sin(this.player.angle);

		if(this.player.velocity > 0) {
			this.player.velocity -= 0.05;

			if(this.player.velocity > 3) {
				this.player.velocity = 3;
			}
		}
		else if(this.player.velocity < 0) {
			this.player.velocity += 0.05;

			if(this.player.velocity < -2) {
				this.player.velocity = -2;
			}
		}

		if(!Math.round(this.player.velocity * 100)) {
			this.player.velocity = 0;
		}

		if(this.player.velocity) {
			this.player.x += x * this.player.velocity;
			this.player.y += y * this.player.velocity;
		}
	}

	handleCollisions() {
		this.collisions.update();

		const potentials = this.player.potentials();

		// Negate any collisions
		for(const body of potentials) {
			if(this.player.collides(body, result)) {
				this.player.x -= result.overlap * result.overlap_x;
				this.player.y -= result.overlap * result.overlap_y;

				this.player.velocity *= 0.9
			}
		}
	}

	render() {
		this.context.fillStyle = '#000000';
		this.context.fillRect(0, 0, 800, 600);

		this.context.strokeStyle = '#FFFFFF';
		this.context.beginPath();
		this.collisions.draw(this.context);
		this.context.stroke();

		if(this.bvh_checkbox.checked) {
			this.context.strokeStyle = '#00FF00';
			this.context.beginPath();
			this.collisions.drawBVH(this.context);
			this.context.stroke();
		}
	}

	createPlayer(x, y) {
		const size = 15;

		this.player = this.collisions.createPolygon(x, y, [
			[-20, -10],
			[20, -10],
			[20, 10],
			[-20, 10],
		], 0.2);

		this.player.velocity = 0;
	}

	createMap() {
		// World bounds
		this.collisions.createPolygon(0, 0, [[0, 0], [width, 0]]);
		this.collisions.createPolygon(0, 0, [[width, 0], [width, height]]);
		this.collisions.createPolygon(0, 0, [[width, height], [0, height]]);
		this.collisions.createPolygon(0, 0, [[0, height], [0, 0]]);

		// Factory
		this.collisions.createPolygon(100, 100, [[-50, -50], [50, -50], [50, 50], [-50, 50],], 0.4);
		this.collisions.createPolygon(190, 105, [[-20, -20], [20, -20], [20, 20], [-20, 20],], 0.4);
		this.collisions.createCircle(170, 140, 8);
		this.collisions.createCircle(185, 155, 8);
		this.collisions.createCircle(165, 165, 8);
		this.collisions.createCircle(145, 165, 8);

		// Airstrip
		this.collisions.createPolygon(230, 50, [[-150, -30], [150, -30], [150, 30], [-150, 30],], 0.4);

		// HQ
		this.collisions.createPolygon(100, 500, [[-40, -50], [40, -50], [50, 50], [-50, 50],], 0.2);
		this.collisions.createCircle(180, 490, 20);
		this.collisions.createCircle(175, 540, 20);

		// Barracks
		this.collisions.createPolygon(400, 500, [[-60, -20], [60, -20], [60, 20], [-60, 20]], 1.7);
		this.collisions.createPolygon(350, 494, [[-60, -20], [60, -20], [60, 20], [-60, 20]], 1.7);

		// Mountains
		this.collisions.createPolygon(750, 0, [[0, 0], [-20, 100]]);
		this.collisions.createPolygon(750, 0, [[-20, 100], [30, 250]]);
		this.collisions.createPolygon(750, 0, [[30, 250], [20, 300]]);
		this.collisions.createPolygon(750, 0, [[20, 300], [-50, 320]]);
		this.collisions.createPolygon(750, 0, [[-50, 320], [-90, 500]]);
		this.collisions.createPolygon(750, 0, [[-90, 500], [-200, 600]]);

		// Lake
		this.collisions.createPolygon(550, 100, [
			[-60, -20],
			[-20, -40],
			[30, -30],
			[60, 20],
			[40, 70],
			[10, 100],
			[-30, 110],
			[-80, 90],
			[-110, 50],
			[-100, 20],
		]);
	}
}

function random(min, max) {
	return Math.floor(Math.random() * max) + min;
}


================================================
FILE: demo/index.mjs
================================================
import Tank   from './examples/Tank.mjs';
import Stress from './examples/Stress.mjs';

let example;

switch(window.location.search) {
	case '?stress':
		example = new Stress();
		break;

	default:
		example = new Tank();
		break;
}

document.body.appendChild(example.element);


================================================
FILE: docs/ast/source/.external-ecmascript.js.json
================================================
{
  "type": "File",
  "start": 0,
  "end": 6058,
  "loc": {
    "start": {
      "line": 1,
      "column": 0
    },
    "end": {
      "line": 193,
      "column": 0
    }
  },
  "program": {
    "type": "Program",
    "start": 0,
    "end": 6058,
    "loc": {
      "start": {
        "line": 1,
        "column": 0
      },
      "end": {
        "line": 193,
        "column": 0
      }
    },
    "sourceType": "module",
    "body": [],
    "directives": [],
    "leadingComments": null,
    "innerComments": [
      {
        "type": "CommentLine",
        "value": " https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects",
        "start": 0,
        "end": 83,
        "loc": {
          "start": {
            "line": 1,
            "column": 0
          },
          "end": {
            "line": 1,
            "column": 83
          }
        }
      },
      {
        "type": "CommentLine",
        "value": " Value properties",
        "start": 85,
        "end": 104,
        "loc": {
          "start": {
            "line": 3,
            "column": 0
          },
          "end": {
            "line": 3,
            "column": 19
          }
        }
      },
      {
        "type": "CommentBlock",
        "value": "*\n * @external {Infinity} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Infinity\n ",
        "start": 105,
        "end": 226,
        "loc": {
          "start": {
            "line": 4,
            "column": 0
          },
          "end": {
            "line": 6,
            "column": 3
          }
        }
      },
      {
        "type": "CommentBlock",
        "value": "*\n * @external {NaN} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NaN\n ",
        "start": 228,
        "end": 339,
        "loc": {
          "start": {
            "line": 8,
            "column": 0
          },
          "end": {
            "line": 10,
            "column": 3
          }
        }
      },
      {
        "type": "CommentBlock",
        "value": "*\n * @external {undefined} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined\n ",
        "start": 341,
        "end": 464,
        "loc": {
          "start": {
            "line": 12,
            "column": 0
          },
          "end": {
            "line": 14,
            "column": 3
          }
        }
      },
      {
        "type": "CommentBlock",
        "value": "*\n * @external {null} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/null\n ",
        "start": 466,
        "end": 579,
        "loc": {
          "start": {
            "line": 16,
            "column": 0
          },
          "end": {
            "line": 18,
            "column": 3
          }
        }
      },
      {
        "type": "CommentLine",
        "value": " Fundamental objects",
        "start": 581,
        "end": 603,
        "loc": {
          "start": {
            "line": 20,
            "column": 0
          },
          "end": {
            "line": 20,
            "column": 22
          }
        }
      },
      {
        "type": "CommentBlock",
        "value": "*\n * @external {Object} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object\n ",
        "start": 604,
        "end": 721,
        "loc": {
          "start": {
            "line": 21,
            "column": 0
          },
          "end": {
            "line": 23,
            "column": 3
          }
        }
      },
      {
        "type": "CommentBlock",
        "value": "*\n * @external {object} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object\n ",
        "start": 722,
        "end": 839,
        "loc": {
          "start": {
            "line": 24,
            "column": 0
          },
          "end": {
            "line": 26,
            "column": 3
          }
        }
      },
      {
        "type": "CommentBlock",
        "value": "*\n * @external {Function} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function\n ",
        "start": 841,
        "end": 962,
        "loc": {
          "start": {
            "line": 28,
            "column": 0
          },
          "end": {
            "line": 30,
            "column": 3
          }
        }
      },
      {
        "type": "CommentBlock",
        "value": "*\n * @external {function} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function\n ",
        "start": 963,
        "end": 1084,
        "loc": {
          "start": {
            "line": 31,
            "column": 0
          },
          "end": {
            "line": 33,
            "column": 3
          }
        }
      },
      {
        "type": "CommentBlock",
        "value": "*\n * @external {Boolean} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean\n ",
        "start": 1086,
        "end": 1205,
        "loc": {
          "start": {
            "line": 35,
            "column": 0
          },
          "end": {
            "line": 37,
            "column": 3
          }
        }
      },
      {
        "type": "CommentBlock",
        "value": "*\n * @external {boolean} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean\n ",
        "start": 1206,
        "end": 1325,
        "loc": {
          "start": {
            "line": 38,
            "column": 0
          },
          "end": {
            "line": 40,
            "column": 3
          }
        }
      },
      {
        "type": "CommentBlock",
        "value": "*\n * @external {Symbol} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol\n ",
        "start": 1327,
        "end": 1444,
        "loc": {
          "start": {
            "line": 42,
            "column": 0
          },
          "end": {
            "line": 44,
            "column": 3
          }
        }
      },
      {
        "type": "CommentBlock",
        "value": "*\n * @external {Error} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error\n ",
        "start": 1446,
        "end": 1561,
        "loc": {
          "start": {
            "line": 46,
            "column": 0
          },
          "end": {
            "line": 48,
            "column": 3
          }
        }
      },
      {
        "type": "CommentBlock",
        "value": "*\n * @external {EvalError} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/EvalError\n ",
        "start": 1563,
        "end": 1686,
        "loc": {
          "start": {
            "line": 50,
            "column": 0
          },
          "end": {
            "line": 52,
            "column": 3
          }
        }
      },
      {
        "type": "CommentBlock",
        "value": "*\n * @external {InternalError} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/InternalError\n ",
        "start": 1688,
        "end": 1819,
        "loc": {
          "start": {
            "line": 54,
            "column": 0
          },
          "end": {
            "line": 56,
            "column": 3
          }
        }
      },
      {
        "type": "CommentBlock",
        "value": "*\n * @external {RangeError} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RangeError\n ",
        "start": 1821,
        "end": 1946,
        "loc": {
          "start": {
            "line": 58,
            "column": 0
          },
          "end": {
            "line": 60,
            "column": 3
          }
        }
      },
      {
        "type": "CommentBlock",
        "value": "*\n * @external {ReferenceError} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ReferenceError\n ",
        "start": 1948,
        "end": 2081,
        "loc": {
          "start": {
            "line": 62,
            "column": 0
          },
          "end": {
            "line": 64,
            "column": 3
          }
        }
      },
      {
        "type": "CommentBlock",
        "value": "*\n * @external {SyntaxError} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError\n ",
        "start": 2083,
        "end": 2210,
        "loc": {
          "start": {
            "line": 66,
            "column": 0
          },
          "end": {
            "line": 68,
            "column": 3
          }
        }
      },
      {
        "type": "CommentBlock",
        "value": "*\n * @external {TypeError} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError\n ",
        "start": 2212,
        "end": 2335,
        "loc": {
          "start": {
            "line": 70,
            "column": 0
          },
          "end": {
            "line": 72,
            "column": 3
          }
        }
      },
      {
        "type": "CommentBlock",
        "value": "*\n * @external {URIError} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/URIError\n ",
        "start": 2337,
        "end": 2458,
        "loc": {
          "start": {
            "line": 74,
            "column": 0
          },
          "end": {
            "line": 76,
            "column": 3
          }
        }
      },
      {
        "type": "CommentLine",
        "value": " Numbers and dates",
        "start": 2460,
        "end": 2480,
        "loc": {
          "start": {
            "line": 78,
            "column": 0
          },
          "end": {
            "line": 78,
            "column": 20
          }
        }
      },
      {
        "type": "CommentBlock",
        "value": "*\n * @external {Number} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number\n ",
        "start": 2481,
        "end": 2598,
        "loc": {
          "start": {
            "line": 79,
            "column": 0
          },
          "end": {
            "line": 81,
            "column": 3
          }
        }
      },
      {
        "type": "CommentBlock",
        "value": "*\n * @external {number} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number\n ",
        "start": 2599,
        "end": 2716,
        "loc": {
          "start": {
            "line": 82,
            "column": 0
          },
          "end": {
            "line": 84,
            "column": 3
          }
        }
      },
      {
        "type": "CommentBlock",
        "value": "*\n * @external {Date} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date\n ",
        "start": 2718,
        "end": 2831,
        "loc": {
          "start": {
            "line": 86,
            "column": 0
          },
          "end": {
            "line": 88,
            "column": 3
          }
        }
      },
      {
        "type": "CommentLine",
        "value": " Text processing",
        "start": 2833,
        "end": 2851,
        "loc": {
          "start": {
            "line": 90,
            "column": 0
          },
          "end": {
            "line": 90,
            "column": 18
          }
        }
      },
      {
        "type": "CommentBlock",
        "value": "*\n * @external {String} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String\n ",
        "start": 2852,
        "end": 2969,
        "loc": {
          "start": {
            "line": 91,
            "column": 0
          },
          "end": {
            "line": 93,
            "column": 3
          }
        }
      },
      {
        "type": "CommentBlock",
        "value": "*\n * @external {string} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String\n ",
        "start": 2970,
        "end": 3087,
        "loc": {
          "start": {
            "line": 94,
            "column": 0
          },
          "end": {
            "line": 96,
            "column": 3
          }
        }
      },
      {
        "type": "CommentBlock",
        "value": "*\n * @external {RegExp} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp\n ",
        "start": 3089,
        "end": 3206,
        "loc": {
          "start": {
            "line": 98,
            "column": 0
          },
          "end": {
            "line": 100,
            "column": 3
          }
        }
      },
      {
        "type": "CommentLine",
        "value": " Indexed collections",
        "start": 3208,
        "end": 3230,
        "loc": {
          "start": {
            "line": 102,
            "column": 0
          },
          "end": {
            "line": 102,
            "column": 22
          }
        }
      },
      {
        "type": "CommentBlock",
        "value": "*\n * @external {Array} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array\n ",
        "start": 3231,
        "end": 3346,
        "loc": {
          "start": {
            "line": 103,
            "column": 0
          },
          "end": {
            "line": 105,
            "column": 3
          }
        }
      },
      {
        "type": "CommentBlock",
        "value": "*\n * @external {Int8Array} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int8Array\n ",
        "start": 3348,
        "end": 3471,
        "loc": {
          "start": {
            "line": 107,
            "column": 0
          },
          "end": {
            "line": 109,
            "column": 3
          }
        }
      },
      {
        "type": "CommentBlock",
        "value": "*\n * @external {Uint8Array} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array\n ",
        "start": 3472,
        "end": 3597,
        "loc": {
          "start": {
            "line": 110,
            "column": 0
          },
          "end": {
            "line": 112,
            "column": 3
          }
        }
      },
      {
        "type": "CommentBlock",
        "value": "*\n * @external {Uint8ClampedArray} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8ClampedArray\n ",
        "start": 3599,
        "end": 3738,
        "loc": {
          "start": {
            "line": 114,
            "column": 0
          },
          "end": {
            "line": 116,
            "column": 3
          }
        }
      },
      {
        "type": "CommentBlock",
        "value": "*\n * @external {Int16Array} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int16Array\n ",
        "start": 3740,
        "end": 3865,
        "loc": {
          "start": {
            "line": 118,
            "column": 0
          },
          "end": {
            "line": 120,
            "column": 3
          }
        }
      },
      {
        "type": "CommentBlock",
        "value": "*\n * @external {Uint16Array} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint16Array\n ",
        "start": 3867,
        "end": 3994,
        "loc": {
          "start": {
            "line": 122,
            "column": 0
          },
          "end": {
            "line": 124,
            "column": 3
          }
        }
      },
      {
        "type": "CommentBlock",
        "value": "*\n * @external {Int32Array} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int32Array\n ",
        "start": 3996,
        "end": 4121,
        "loc": {
          "start": {
            "line": 126,
            "column": 0
          },
          "end": {
            "line": 128,
            "column": 3
          }
        }
      },
      {
        "type": "CommentBlock",
        "value": "*\n * @external {Uint32Array} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint32Array\n ",
        "start": 4123,
        "end": 4250,
        "loc": {
          "start": {
            "line": 130,
            "column": 0
          },
          "end": {
            "line": 132,
            "column": 3
          }
        }
      },
      {
        "type": "CommentBlock",
        "value": "*\n * @external {Float32Array} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array\n ",
        "start": 4252,
        "end": 4381,
        "loc": {
          "start": {
            "line": 134,
            "column": 0
          },
          "end": {
            "line": 136,
            "column": 3
          }
        }
      },
      {
        "type": "CommentBlock",
        "value": "*\n * @external {Float64Array} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float64Array\n ",
        "start": 4383,
        "end": 4512,
        "loc": {
          "start": {
            "line": 138,
            "column": 0
          },
          "end": {
            "line": 140,
            "column": 3
          }
        }
      },
      {
        "type": "CommentLine",
        "value": " Keyed collections",
        "start": 4514,
        "end": 4534,
        "loc": {
          "start": {
            "line": 142,
            "column": 0
          },
          "end": {
            "line": 142,
            "column": 20
          }
        }
      },
      {
        "type": "CommentBlock",
        "value": "*\n * @external {Map} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map\n ",
        "start": 4535,
        "end": 4646,
        "loc": {
          "start": {
            "line": 143,
            "column": 0
          },
          "end": {
            "line": 145,
            "column": 3
          }
        }
      },
      {
        "type": "CommentBlock",
        "value": "*\n * @external {Set} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set\n ",
        "start": 4648,
        "end": 4759,
        "loc": {
          "start": {
            "line": 147,
            "column": 0
          },
          "end": {
            "line": 149,
            "column": 3
          }
        }
      },
      {
        "type": "CommentBlock",
        "value": "*\n * @external {WeakMap} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap\n ",
        "start": 4761,
        "end": 4880,
        "loc": {
          "start": {
            "line": 151,
            "column": 0
          },
          "end": {
            "line": 153,
            "column": 3
          }
        }
      },
      {
        "type": "CommentBlock",
        "value": "*\n * @external {WeakSet} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet\n ",
        "start": 4882,
        "end": 5001,
        "loc": {
          "start": {
            "line": 155,
            "column": 0
          },
          "end": {
            "line": 157,
            "column": 3
          }
        }
      },
      {
        "type": "CommentLine",
        "value": " Structured data",
        "start": 5003,
        "end": 5021,
        "loc": {
          "start": {
            "line": 159,
            "column": 0
          },
          "end": {
            "line": 159,
            "column": 18
          }
        }
      },
      {
        "type": "CommentBlock",
        "value": "*\n * @external {ArrayBuffer} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer\n ",
        "start": 5022,
        "end": 5149,
        "loc": {
          "start": {
            "line": 160,
            "column": 0
          },
          "end": {
            "line": 162,
            "column": 3
          }
        }
      },
      {
        "type": "CommentBlock",
        "value": "*\n * @external {DataView} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView\n ",
        "start": 5151,
        "end": 5272,
        "loc": {
          "start": {
            "line": 164,
            "column": 0
          },
          "end": {
            "line": 166,
            "column": 3
          }
        }
      },
      {
        "type": "CommentBlock",
        "value": "*\n * @external {JSON} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON\n ",
        "start": 5274,
        "end": 5387,
        "loc": {
          "start": {
            "line": 168,
            "column": 0
          },
          "end": {
            "line": 170,
            "column": 3
          }
        }
      },
      {
        "type": "CommentLine",
        "value": " Control abstraction objects",
        "start": 5389,
        "end": 5419,
        "loc": {
          "start": {
            "line": 172,
            "column": 0
          },
          "end": {
            "line": 172,
            "column": 30
          }
        }
      },
      {
        "type": "CommentBlock",
        "value": "*\n * @external {Promise} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise\n ",
        "start": 5420,
        "end": 5539,
        "loc": {
          "start": {
            "line": 173,
            "column": 0
          },
          "end": {
            "line": 175,
            "column": 3
          }
        }
      },
      {
        "type": "CommentBlock",
        "value": "*\n * @external {Generator} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Generator\n ",
        "start": 5541,
        "end": 5664,
        "loc": {
          "start": {
            "line": 177,
            "column": 0
          },
          "end": {
            "line": 179,
            "column": 3
          }
        }
      },
      {
        "type": "CommentBlock",
        "value": "*\n * @external {GeneratorFunction} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/GeneratorFunction\n ",
        "start": 5666,
        "end": 5805,
        "loc": {
          "start": {
            "line": 181,
            "column": 0
          },
          "end": {
            "line": 183,
            "column": 3
          }
        }
      },
      {
        "type": "CommentLine",
        "value": " Reflection",
        "start": 5807,
        "end": 5820,
        "loc": {
          "start": {
            "line": 185,
            "column": 0
          },
          "end": {
            "line": 185,
            "column": 13
          }
        }
      },
      {
        "type": "CommentBlock",
        "value": "*\n * @external {Reflect} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect\n ",
        "start": 5821,
        "end": 5940,
        "loc": {
          "start": {
            "line": 186,
            "column": 0
          },
          "end": {
            "line": 188,
            "column": 3
          }
        }
      },
      {
        "type": "CommentBlock",
        "value": "*\n * @external {Proxy} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy\n ",
        "start": 5942,
        "end": 6057,
        "loc": {
          "start": {
            "line": 190,
            "column": 0
          },
          "end": {
            "line": 192,
            "column": 3
          }
        }
      }
    ]
  },
  "comments": [
    {
      "type": "CommentLine",
      "value": " https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects",
      "start": 0,
      "end": 83,
      "loc": {
        "start": {
          "line": 1,
          "column": 0
        },
        "end": {
          "line": 1,
          "column": 83
        }
      }
    },
    {
      "type": "CommentLine",
      "value": " Value properties",
      "start": 85,
      "end": 104,
      "loc": {
        "start": {
          "line": 3,
          "column": 0
        },
        "end": {
          "line": 3,
          "column": 19
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {Infinity} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Infinity\n ",
      "start": 105,
      "end": 226,
      "loc": {
        "start": {
          "line": 4,
          "column": 0
        },
        "end": {
          "line": 6,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {NaN} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NaN\n ",
      "start": 228,
      "end": 339,
      "loc": {
        "start": {
          "line": 8,
          "column": 0
        },
        "end": {
          "line": 10,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {undefined} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined\n ",
      "start": 341,
      "end": 464,
      "loc": {
        "start": {
          "line": 12,
          "column": 0
        },
        "end": {
          "line": 14,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {null} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/null\n ",
      "start": 466,
      "end": 579,
      "loc": {
        "start": {
          "line": 16,
          "column": 0
        },
        "end": {
          "line": 18,
          "column": 3
        }
      }
    },
    {
      "type": "CommentLine",
      "value": " Fundamental objects",
      "start": 581,
      "end": 603,
      "loc": {
        "start": {
          "line": 20,
          "column": 0
        },
        "end": {
          "line": 20,
          "column": 22
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {Object} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object\n ",
      "start": 604,
      "end": 721,
      "loc": {
        "start": {
          "line": 21,
          "column": 0
        },
        "end": {
          "line": 23,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {object} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object\n ",
      "start": 722,
      "end": 839,
      "loc": {
        "start": {
          "line": 24,
          "column": 0
        },
        "end": {
          "line": 26,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {Function} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function\n ",
      "start": 841,
      "end": 962,
      "loc": {
        "start": {
          "line": 28,
          "column": 0
        },
        "end": {
          "line": 30,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {function} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function\n ",
      "start": 963,
      "end": 1084,
      "loc": {
        "start": {
          "line": 31,
          "column": 0
        },
        "end": {
          "line": 33,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {Boolean} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean\n ",
      "start": 1086,
      "end": 1205,
      "loc": {
        "start": {
          "line": 35,
          "column": 0
        },
        "end": {
          "line": 37,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {boolean} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean\n ",
      "start": 1206,
      "end": 1325,
      "loc": {
        "start": {
          "line": 38,
          "column": 0
        },
        "end": {
          "line": 40,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {Symbol} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol\n ",
      "start": 1327,
      "end": 1444,
      "loc": {
        "start": {
          "line": 42,
          "column": 0
        },
        "end": {
          "line": 44,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {Error} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error\n ",
      "start": 1446,
      "end": 1561,
      "loc": {
        "start": {
          "line": 46,
          "column": 0
        },
        "end": {
          "line": 48,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {EvalError} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/EvalError\n ",
      "start": 1563,
      "end": 1686,
      "loc": {
        "start": {
          "line": 50,
          "column": 0
        },
        "end": {
          "line": 52,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {InternalError} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/InternalError\n ",
      "start": 1688,
      "end": 1819,
      "loc": {
        "start": {
          "line": 54,
          "column": 0
        },
        "end": {
          "line": 56,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {RangeError} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RangeError\n ",
      "start": 1821,
      "end": 1946,
      "loc": {
        "start": {
          "line": 58,
          "column": 0
        },
        "end": {
          "line": 60,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {ReferenceError} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ReferenceError\n ",
      "start": 1948,
      "end": 2081,
      "loc": {
        "start": {
          "line": 62,
          "column": 0
        },
        "end": {
          "line": 64,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {SyntaxError} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError\n ",
      "start": 2083,
      "end": 2210,
      "loc": {
        "start": {
          "line": 66,
          "column": 0
        },
        "end": {
          "line": 68,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {TypeError} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError\n ",
      "start": 2212,
      "end": 2335,
      "loc": {
        "start": {
          "line": 70,
          "column": 0
        },
        "end": {
          "line": 72,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {URIError} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/URIError\n ",
      "start": 2337,
      "end": 2458,
      "loc": {
        "start": {
          "line": 74,
          "column": 0
        },
        "end": {
          "line": 76,
          "column": 3
        }
      }
    },
    {
      "type": "CommentLine",
      "value": " Numbers and dates",
      "start": 2460,
      "end": 2480,
      "loc": {
        "start": {
          "line": 78,
          "column": 0
        },
        "end": {
          "line": 78,
          "column": 20
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {Number} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number\n ",
      "start": 2481,
      "end": 2598,
      "loc": {
        "start": {
          "line": 79,
          "column": 0
        },
        "end": {
          "line": 81,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {number} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number\n ",
      "start": 2599,
      "end": 2716,
      "loc": {
        "start": {
          "line": 82,
          "column": 0
        },
        "end": {
          "line": 84,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {Date} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date\n ",
      "start": 2718,
      "end": 2831,
      "loc": {
        "start": {
          "line": 86,
          "column": 0
        },
        "end": {
          "line": 88,
          "column": 3
        }
      }
    },
    {
      "type": "CommentLine",
      "value": " Text processing",
      "start": 2833,
      "end": 2851,
      "loc": {
        "start": {
          "line": 90,
          "column": 0
        },
        "end": {
          "line": 90,
          "column": 18
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {String} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String\n ",
      "start": 2852,
      "end": 2969,
      "loc": {
        "start": {
          "line": 91,
          "column": 0
        },
        "end": {
          "line": 93,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {string} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String\n ",
      "start": 2970,
      "end": 3087,
      "loc": {
        "start": {
          "line": 94,
          "column": 0
        },
        "end": {
          "line": 96,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {RegExp} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp\n ",
      "start": 3089,
      "end": 3206,
      "loc": {
        "start": {
          "line": 98,
          "column": 0
        },
        "end": {
          "line": 100,
          "column": 3
        }
      }
    },
    {
      "type": "CommentLine",
      "value": " Indexed collections",
      "start": 3208,
      "end": 3230,
      "loc": {
        "start": {
          "line": 102,
          "column": 0
        },
        "end": {
          "line": 102,
          "column": 22
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {Array} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array\n ",
      "start": 3231,
      "end": 3346,
      "loc": {
        "start": {
          "line": 103,
          "column": 0
        },
        "end": {
          "line": 105,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {Int8Array} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int8Array\n ",
      "start": 3348,
      "end": 3471,
      "loc": {
        "start": {
          "line": 107,
          "column": 0
        },
        "end": {
          "line": 109,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {Uint8Array} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array\n ",
      "start": 3472,
      "end": 3597,
      "loc": {
        "start": {
          "line": 110,
          "column": 0
        },
        "end": {
          "line": 112,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {Uint8ClampedArray} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8ClampedArray\n ",
      "start": 3599,
      "end": 3738,
      "loc": {
        "start": {
          "line": 114,
          "column": 0
        },
        "end": {
          "line": 116,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {Int16Array} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int16Array\n ",
      "start": 3740,
      "end": 3865,
      "loc": {
        "start": {
          "line": 118,
          "column": 0
        },
        "end": {
          "line": 120,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {Uint16Array} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint16Array\n ",
      "start": 3867,
      "end": 3994,
      "loc": {
        "start": {
          "line": 122,
          "column": 0
        },
        "end": {
          "line": 124,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {Int32Array} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int32Array\n ",
      "start": 3996,
      "end": 4121,
      "loc": {
        "start": {
          "line": 126,
          "column": 0
        },
        "end": {
          "line": 128,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {Uint32Array} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint32Array\n ",
      "start": 4123,
      "end": 4250,
      "loc": {
        "start": {
          "line": 130,
          "column": 0
        },
        "end": {
          "line": 132,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {Float32Array} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array\n ",
      "start": 4252,
      "end": 4381,
      "loc": {
        "start": {
          "line": 134,
          "column": 0
        },
        "end": {
          "line": 136,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {Float64Array} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float64Array\n ",
      "start": 4383,
      "end": 4512,
      "loc": {
        "start": {
          "line": 138,
          "column": 0
        },
        "end": {
          "line": 140,
          "column": 3
        }
      }
    },
    {
      "type": "CommentLine",
      "value": " Keyed collections",
      "start": 4514,
      "end": 4534,
      "loc": {
        "start": {
          "line": 142,
          "column": 0
        },
        "end": {
          "line": 142,
          "column": 20
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {Map} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map\n ",
      "start": 4535,
      "end": 4646,
      "loc": {
        "start": {
          "line": 143,
          "column": 0
        },
        "end": {
          "line": 145,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {Set} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set\n ",
      "start": 4648,
      "end": 4759,
      "loc": {
        "start": {
          "line": 147,
          "column": 0
        },
        "end": {
          "line": 149,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {WeakMap} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap\n ",
      "start": 4761,
      "end": 4880,
      "loc": {
        "start": {
          "line": 151,
          "column": 0
        },
        "end": {
          "line": 153,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {WeakSet} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet\n ",
      "start": 4882,
      "end": 5001,
      "loc": {
        "start": {
          "line": 155,
          "column": 0
        },
        "end": {
          "line": 157,
          "column": 3
        }
      }
    },
    {
      "type": "CommentLine",
      "value": " Structured data",
      "start": 5003,
      "end": 5021,
      "loc": {
        "start": {
          "line": 159,
          "column": 0
        },
        "end": {
          "line": 159,
          "column": 18
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {ArrayBuffer} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer\n ",
      "start": 5022,
      "end": 5149,
      "loc": {
        "start": {
          "line": 160,
          "column": 0
        },
        "end": {
          "line": 162,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {DataView} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView\n ",
      "start": 5151,
      "end": 5272,
      "loc": {
        "start": {
          "line": 164,
          "column": 0
        },
        "end": {
          "line": 166,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {JSON} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON\n ",
      "start": 5274,
      "end": 5387,
      "loc": {
        "start": {
          "line": 168,
          "column": 0
        },
        "end": {
          "line": 170,
          "column": 3
        }
      }
    },
    {
      "type": "CommentLine",
      "value": " Control abstraction objects",
      "start": 5389,
      "end": 5419,
      "loc": {
        "start": {
          "line": 172,
          "column": 0
        },
        "end": {
          "line": 172,
          "column": 30
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {Promise} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise\n ",
      "start": 5420,
      "end": 5539,
      "loc": {
        "start": {
          "line": 173,
          "column": 0
        },
        "end": {
          "line": 175,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {Generator} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Generator\n ",
      "start": 5541,
      "end": 5664,
      "loc": {
        "start": {
          "line": 177,
          "column": 0
        },
        "end": {
          "line": 179,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {GeneratorFunction} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/GeneratorFunction\n ",
      "start": 5666,
      "end": 5805,
      "loc": {
        "start": {
          "line": 181,
          "column": 0
        },
        "end": {
          "line": 183,
          "column": 3
        }
      }
    },
    {
      "type": "CommentLine",
      "value": " Reflection",
      "start": 5807,
      "end": 5820,
      "loc": {
        "start": {
          "line": 185,
          "column": 0
        },
        "end": {
          "line": 185,
          "column": 13
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {Reflect} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect\n ",
      "start": 5821,
      "end": 5940,
      "loc": {
        "start": {
          "line": 186,
          "column": 0
        },
        "end": {
          "line": 188,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {Proxy} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy\n ",
      "start": 5942,
      "end": 6057,
      "loc": {
        "start": {
          "line": 190,
          "column": 0
        },
        "end": {
          "line": 192,
          "column": 3
        }
      }
    }
  ],
  "tokens": [
    {
      "type": "CommentLine",
      "value": " https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects",
      "start": 0,
      "end": 83,
      "loc": {
        "start": {
          "line": 1,
          "column": 0
        },
        "end": {
          "line": 1,
          "column": 83
        }
      }
    },
    {
      "type": "CommentLine",
      "value": " Value properties",
      "start": 85,
      "end": 104,
      "loc": {
        "start": {
          "line": 3,
          "column": 0
        },
        "end": {
          "line": 3,
          "column": 19
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {Infinity} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Infinity\n ",
      "start": 105,
      "end": 226,
      "loc": {
        "start": {
          "line": 4,
          "column": 0
        },
        "end": {
          "line": 6,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {NaN} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NaN\n ",
      "start": 228,
      "end": 339,
      "loc": {
        "start": {
          "line": 8,
          "column": 0
        },
        "end": {
          "line": 10,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {undefined} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/undefined\n ",
      "start": 341,
      "end": 464,
      "loc": {
        "start": {
          "line": 12,
          "column": 0
        },
        "end": {
          "line": 14,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {null} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/null\n ",
      "start": 466,
      "end": 579,
      "loc": {
        "start": {
          "line": 16,
          "column": 0
        },
        "end": {
          "line": 18,
          "column": 3
        }
      }
    },
    {
      "type": "CommentLine",
      "value": " Fundamental objects",
      "start": 581,
      "end": 603,
      "loc": {
        "start": {
          "line": 20,
          "column": 0
        },
        "end": {
          "line": 20,
          "column": 22
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {Object} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object\n ",
      "start": 604,
      "end": 721,
      "loc": {
        "start": {
          "line": 21,
          "column": 0
        },
        "end": {
          "line": 23,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {object} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object\n ",
      "start": 722,
      "end": 839,
      "loc": {
        "start": {
          "line": 24,
          "column": 0
        },
        "end": {
          "line": 26,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {Function} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function\n ",
      "start": 841,
      "end": 962,
      "loc": {
        "start": {
          "line": 28,
          "column": 0
        },
        "end": {
          "line": 30,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {function} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Function\n ",
      "start": 963,
      "end": 1084,
      "loc": {
        "start": {
          "line": 31,
          "column": 0
        },
        "end": {
          "line": 33,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {Boolean} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean\n ",
      "start": 1086,
      "end": 1205,
      "loc": {
        "start": {
          "line": 35,
          "column": 0
        },
        "end": {
          "line": 37,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {boolean} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Boolean\n ",
      "start": 1206,
      "end": 1325,
      "loc": {
        "start": {
          "line": 38,
          "column": 0
        },
        "end": {
          "line": 40,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {Symbol} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol\n ",
      "start": 1327,
      "end": 1444,
      "loc": {
        "start": {
          "line": 42,
          "column": 0
        },
        "end": {
          "line": 44,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {Error} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error\n ",
      "start": 1446,
      "end": 1561,
      "loc": {
        "start": {
          "line": 46,
          "column": 0
        },
        "end": {
          "line": 48,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {EvalError} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/EvalError\n ",
      "start": 1563,
      "end": 1686,
      "loc": {
        "start": {
          "line": 50,
          "column": 0
        },
        "end": {
          "line": 52,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {InternalError} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/InternalError\n ",
      "start": 1688,
      "end": 1819,
      "loc": {
        "start": {
          "line": 54,
          "column": 0
        },
        "end": {
          "line": 56,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {RangeError} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RangeError\n ",
      "start": 1821,
      "end": 1946,
      "loc": {
        "start": {
          "line": 58,
          "column": 0
        },
        "end": {
          "line": 60,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {ReferenceError} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ReferenceError\n ",
      "start": 1948,
      "end": 2081,
      "loc": {
        "start": {
          "line": 62,
          "column": 0
        },
        "end": {
          "line": 64,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {SyntaxError} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SyntaxError\n ",
      "start": 2083,
      "end": 2210,
      "loc": {
        "start": {
          "line": 66,
          "column": 0
        },
        "end": {
          "line": 68,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {TypeError} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypeError\n ",
      "start": 2212,
      "end": 2335,
      "loc": {
        "start": {
          "line": 70,
          "column": 0
        },
        "end": {
          "line": 72,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {URIError} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/URIError\n ",
      "start": 2337,
      "end": 2458,
      "loc": {
        "start": {
          "line": 74,
          "column": 0
        },
        "end": {
          "line": 76,
          "column": 3
        }
      }
    },
    {
      "type": "CommentLine",
      "value": " Numbers and dates",
      "start": 2460,
      "end": 2480,
      "loc": {
        "start": {
          "line": 78,
          "column": 0
        },
        "end": {
          "line": 78,
          "column": 20
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {Number} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number\n ",
      "start": 2481,
      "end": 2598,
      "loc": {
        "start": {
          "line": 79,
          "column": 0
        },
        "end": {
          "line": 81,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {number} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number\n ",
      "start": 2599,
      "end": 2716,
      "loc": {
        "start": {
          "line": 82,
          "column": 0
        },
        "end": {
          "line": 84,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {Date} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date\n ",
      "start": 2718,
      "end": 2831,
      "loc": {
        "start": {
          "line": 86,
          "column": 0
        },
        "end": {
          "line": 88,
          "column": 3
        }
      }
    },
    {
      "type": "CommentLine",
      "value": " Text processing",
      "start": 2833,
      "end": 2851,
      "loc": {
        "start": {
          "line": 90,
          "column": 0
        },
        "end": {
          "line": 90,
          "column": 18
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {String} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String\n ",
      "start": 2852,
      "end": 2969,
      "loc": {
        "start": {
          "line": 91,
          "column": 0
        },
        "end": {
          "line": 93,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {string} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String\n ",
      "start": 2970,
      "end": 3087,
      "loc": {
        "start": {
          "line": 94,
          "column": 0
        },
        "end": {
          "line": 96,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {RegExp} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/RegExp\n ",
      "start": 3089,
      "end": 3206,
      "loc": {
        "start": {
          "line": 98,
          "column": 0
        },
        "end": {
          "line": 100,
          "column": 3
        }
      }
    },
    {
      "type": "CommentLine",
      "value": " Indexed collections",
      "start": 3208,
      "end": 3230,
      "loc": {
        "start": {
          "line": 102,
          "column": 0
        },
        "end": {
          "line": 102,
          "column": 22
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {Array} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array\n ",
      "start": 3231,
      "end": 3346,
      "loc": {
        "start": {
          "line": 103,
          "column": 0
        },
        "end": {
          "line": 105,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {Int8Array} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int8Array\n ",
      "start": 3348,
      "end": 3471,
      "loc": {
        "start": {
          "line": 107,
          "column": 0
        },
        "end": {
          "line": 109,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {Uint8Array} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8Array\n ",
      "start": 3472,
      "end": 3597,
      "loc": {
        "start": {
          "line": 110,
          "column": 0
        },
        "end": {
          "line": 112,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {Uint8ClampedArray} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint8ClampedArray\n ",
      "start": 3599,
      "end": 3738,
      "loc": {
        "start": {
          "line": 114,
          "column": 0
        },
        "end": {
          "line": 116,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {Int16Array} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int16Array\n ",
      "start": 3740,
      "end": 3865,
      "loc": {
        "start": {
          "line": 118,
          "column": 0
        },
        "end": {
          "line": 120,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {Uint16Array} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint16Array\n ",
      "start": 3867,
      "end": 3994,
      "loc": {
        "start": {
          "line": 122,
          "column": 0
        },
        "end": {
          "line": 124,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {Int32Array} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Int32Array\n ",
      "start": 3996,
      "end": 4121,
      "loc": {
        "start": {
          "line": 126,
          "column": 0
        },
        "end": {
          "line": 128,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {Uint32Array} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Uint32Array\n ",
      "start": 4123,
      "end": 4250,
      "loc": {
        "start": {
          "line": 130,
          "column": 0
        },
        "end": {
          "line": 132,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {Float32Array} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array\n ",
      "start": 4252,
      "end": 4381,
      "loc": {
        "start": {
          "line": 134,
          "column": 0
        },
        "end": {
          "line": 136,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {Float64Array} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float64Array\n ",
      "start": 4383,
      "end": 4512,
      "loc": {
        "start": {
          "line": 138,
          "column": 0
        },
        "end": {
          "line": 140,
          "column": 3
        }
      }
    },
    {
      "type": "CommentLine",
      "value": " Keyed collections",
      "start": 4514,
      "end": 4534,
      "loc": {
        "start": {
          "line": 142,
          "column": 0
        },
        "end": {
          "line": 142,
          "column": 20
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {Map} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map\n ",
      "start": 4535,
      "end": 4646,
      "loc": {
        "start": {
          "line": 143,
          "column": 0
        },
        "end": {
          "line": 145,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {Set} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set\n ",
      "start": 4648,
      "end": 4759,
      "loc": {
        "start": {
          "line": 147,
          "column": 0
        },
        "end": {
          "line": 149,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {WeakMap} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakMap\n ",
      "start": 4761,
      "end": 4880,
      "loc": {
        "start": {
          "line": 151,
          "column": 0
        },
        "end": {
          "line": 153,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {WeakSet} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/WeakSet\n ",
      "start": 4882,
      "end": 5001,
      "loc": {
        "start": {
          "line": 155,
          "column": 0
        },
        "end": {
          "line": 157,
          "column": 3
        }
      }
    },
    {
      "type": "CommentLine",
      "value": " Structured data",
      "start": 5003,
      "end": 5021,
      "loc": {
        "start": {
          "line": 159,
          "column": 0
        },
        "end": {
          "line": 159,
          "column": 18
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {ArrayBuffer} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/ArrayBuffer\n ",
      "start": 5022,
      "end": 5149,
      "loc": {
        "start": {
          "line": 160,
          "column": 0
        },
        "end": {
          "line": 162,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {DataView} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView\n ",
      "start": 5151,
      "end": 5272,
      "loc": {
        "start": {
          "line": 164,
          "column": 0
        },
        "end": {
          "line": 166,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {JSON} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON\n ",
      "start": 5274,
      "end": 5387,
      "loc": {
        "start": {
          "line": 168,
          "column": 0
        },
        "end": {
          "line": 170,
          "column": 3
        }
      }
    },
    {
      "type": "CommentLine",
      "value": " Control abstraction objects",
      "start": 5389,
      "end": 5419,
      "loc": {
        "start": {
          "line": 172,
          "column": 0
        },
        "end": {
          "line": 172,
          "column": 30
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {Promise} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise\n ",
      "start": 5420,
      "end": 5539,
      "loc": {
        "start": {
          "line": 173,
          "column": 0
        },
        "end": {
          "line": 175,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {Generator} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Generator\n ",
      "start": 5541,
      "end": 5664,
      "loc": {
        "start": {
          "line": 177,
          "column": 0
        },
        "end": {
          "line": 179,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {GeneratorFunction} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/GeneratorFunction\n ",
      "start": 5666,
      "end": 5805,
      "loc": {
        "start": {
          "line": 181,
          "column": 0
        },
        "end": {
          "line": 183,
          "column": 3
        }
      }
    },
    {
      "type": "CommentLine",
      "value": " Reflection",
      "start": 5807,
      "end": 5820,
      "loc": {
        "start": {
          "line": 185,
          "column": 0
        },
        "end": {
          "line": 185,
          "column": 13
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {Reflect} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Reflect\n ",
      "start": 5821,
      "end": 5940,
      "loc": {
        "start": {
          "line": 186,
          "column": 0
        },
        "end": {
          "line": 188,
          "column": 3
        }
      }
    },
    {
      "type": "CommentBlock",
      "value": "*\n * @external {Proxy} https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy\n ",
      "start": 5942,
      "end": 6057,
      "loc": {
        "start": {
          "line": 190,
          "column": 0
        },
        "end": {
          "line": 192,
          "column": 3
        }
      }
    },
    {
      "type": {
        "label": "eof",
        "beforeExpr": false,
        "startsExpr": false,
        "rightAssociative": false,
        "isLoop": false,
        "isAssign": false,
        "prefix": false,
        "postfix": false,
        "binop": null,
        "updateContext": null
      },
      "start": 6058,
      "end": 6058,
      "loc": {
        "start": {
          "line": 193,
          "column": 0
        },
        "end": {
          "line": 193,
          "column": 0
        }
      }
    }
  ]
}

================================================
FILE: docs/ast/source/Collisions.mjs.json
================================================
{
  "type": "File",
  "start": 0,
  "end": 4552,
  "loc": {
    "start": {
      "line": 1,
      "column": 0
    },
    "end": {
      "line": 164,
      "column": 0
    }
  },
  "program": {
    "type": "Program",
    "start": 0,
    "end": 4552,
    "loc": {
      "start": {
        "line": 1,
        "column": 0
      },
      "end": {
        "line": 164,
        "column": 0
      }
    },
    "sourceType": "module",
    "body": [
      {
        "type": "ImportDeclaration",
        "start": 0,
        "end": 40,
        "loc": {
          "start": {
            "line": 1,
            "column": 0
          },
          "end": {
            "line": 1,
            "column": 40
          }
        },
        "specifiers": [
          {
            "type": "ImportDefaultSpecifier",
            "start": 7,
            "end": 10,
            "loc": {
              "start": {
                "line": 1,
                "column": 7
              },
              "end": {
                "line": 1,
                "column": 10
              }
            },
            "local": {
              "type": "Identifier",
              "start": 7,
              "end": 10,
              "loc": {
                "start": {
                  "line": 1,
                  "column": 7
                },
                "end": {
                  "line": 1,
                  "column": 10
                },
                "identifierName": "BVH"
              },
              "name": "BVH"
            }
          }
        ],
        "source": {
          "type": "StringLiteral",
          "start": 20,
          "end": 39,
          "loc": {
            "start": {
              "line": 1,
              "column": 20
            },
            "end": {
              "line": 1,
              "column": 39
            }
          },
          "extra": {
            "rawValue": "./modules/BVH.mjs",
            "raw": "'./modules/BVH.mjs'"
          },
          "value": "./modules/BVH.mjs"
        }
      },
      {
        "type": "ImportDeclaration",
        "start": 41,
        "end": 84,
        "loc": {
          "start": {
            "line": 2,
            "column": 0
          },
          "end": {
            "line": 2,
            "column": 43
          }
        },
        "specifiers": [
          {
            "type": "ImportDefaultSpecifier",
            "start": 48,
            "end": 54,
            "loc": {
              "start": {
                "line": 2,
                "column": 7
              },
              "end": {
                "line": 2,
                "column": 13
              }
            },
            "local": {
              "type": "Identifier",
              "start": 48,
              "end": 54,
              "loc": {
                "start": {
                  "line": 2,
                  "column": 7
                },
                "end": {
                  "line": 2,
                  "column": 13
                },
                "identifierName": "Circle"
              },
              "name": "Circle"
            }
          }
        ],
        "source": {
          "type": "StringLiteral",
          "start": 61,
          "end": 83,
          "loc": {
            "start": {
              "line": 2,
              "column": 20
            },
            "end": {
              "line": 2,
              "column": 42
            }
          },
          "extra": {
            "rawValue": "./modules/Circle.mjs",
            "raw": "'./modules/Circle.mjs'"
          },
          "value": "./modules/Circle.mjs"
        }
      },
      {
        "type": "ImportDeclaration",
        "start": 85,
        "end": 129,
        "loc": {
          "start": {
            "line": 3,
            "column": 0
          },
          "end": {
            "line": 3,
            "column": 44
          }
        },
        "specifiers": [
          {
            "type": "ImportDefaultSpecifier",
            "start": 92,
            "end": 99,
            "loc": {
              "start": {
                "line": 3,
                "column": 7
              },
              "end": {
                "line": 3,
                "column": 14
              }
            },
            "local": {
              "type": "Identifier",
              "start": 92,
              "end": 99,
              "loc": {
                "start": {
                  "line": 3,
                  "column": 7
                },
                "end": {
                  "line": 3,
                  "column": 14
                },
                "identifierName": "Polygon"
              },
              "name": "Polygon"
            }
          }
        ],
        "source": {
          "type": "StringLiteral",
          "start": 105,
          "end": 128,
          "loc": {
            "start": {
              "line": 3,
              "column": 20
            },
            "end": {
              "line": 3,
              "column": 43
            }
          },
          "extra": {
            "rawValue": "./modules/Polygon.mjs",
            "raw": "'./modules/Polygon.mjs'"
          },
          "value": "./modules/Polygon.mjs"
        }
      },
      {
        "type": "ImportDeclaration",
        "start": 130,
        "end": 172,
        "loc": {
          "start": {
            "line": 4,
            "column": 0
          },
          "end": {
            "line": 4,
            "column": 42
          }
        },
        "specifiers": [
          {
            "type": "ImportDefaultSpecifier",
            "start": 137,
            "end": 142,
            "loc": {
              "start": {
                "line": 4,
                "column": 7
              },
              "end": {
                "line": 4,
                "column": 12
              }
            },
            "local": {
              "type": "Identifier",
              "start": 137,
              "end": 142,
              "loc": {
                "start": {
                  "line": 4,
                  "column": 7
                },
                "end": {
                  "line": 4,
                  "column": 12
                },
                "identifierName": "Point"
              },
              "name": "Point"
            }
          }
        ],
        "source": {
          "type": "StringLiteral",
          "start": 150,
          "end": 171,
          "loc": {
            "start": {
              "line": 4,
              "column": 20
            },
            "end": {
              "line": 4,
              "column": 41
            }
          },
          "extra": {
            "rawValue": "./modules/Point.mjs",
            "raw": "'./modules/Point.mjs'"
          },
          "value": "./modules/Point.mjs"
        }
      },
      {
        "type": "ImportDeclaration",
        "start": 173,
        "end": 216,
        "loc": {
          "start": {
            "line": 5,
            "column": 0
          },
          "end": {
            "line": 5,
            "column": 43
          }
        },
        "specifiers": [
          {
            "type": "ImportDefaultSpecifier",
            "start": 180,
            "end": 186,
            "loc": {
              "start": {
                "line": 5,
                "column": 7
              },
              "end": {
                "line": 5,
                "column": 13
              }
            },
            "local": {
              "type": "Identifier",
              "start": 180,
              "end": 186,
              "loc": {
                "start": {
                  "line": 5,
                  "column": 7
                },
                "end": {
                  "line": 5,
                  "column": 13
                },
                "identifierName": "Result"
              },
              "name": "Result"
            }
          }
        ],
        "source": {
          "type": "StringLiteral",
          "start": 193,
          "end": 215,
          "loc": {
            "start": {
              "line": 5,
              "column": 20
            },
            "end": {
              "line": 5,
              "column": 42
            }
          },
          "extra": {
            "rawValue": "./modules/Result.mjs",
            "raw": "'./modules/Result.mjs'"
          },
          "value": "./modules/Result.mjs"
        }
      },
      {
        "type": "ImportDeclaration",
        "start": 217,
        "end": 257,
        "loc": {
          "start": {
            "line": 6,
            "column": 0
          },
          "end": {
            "line": 6,
            "column": 40
          }
        },
        "specifiers": [
          {
            "type": "ImportDefaultSpecifier",
            "start": 224,
            "end": 227,
            "loc": {
              "start": {
                "line": 6,
                "column": 7
              },
              "end": {
                "line": 6,
                "column": 10
              }
            },
            "local": {
              "type": "Identifier",
              "start": 224,
              "end": 227,
              "loc": {
                "start": {
                  "line": 6,
                  "column": 7
                },
                "end": {
                  "line": 6,
                  "column": 10
                },
                "identifierName": "SAT"
              },
              "name": "SAT"
            }
          }
        ],
        "source": {
          "type": "StringLiteral",
          "start": 237,
          "end": 256,
          "loc": {
            "start": {
              "line": 6,
              "column": 20
            },
            "end": {
              "line": 6,
              "column": 39
            }
          },
          "extra": {
            "rawValue": "./modules/SAT.mjs",
            "raw": "'./modules/SAT.mjs'"
          },
          "value": "./modules/SAT.mjs"
        },
        "trailingComments": [
          {
            "type": "CommentBlock",
            "value": "*\n * A collision system used to track bodies in order to improve collision detection performance\n * @class\n ",
            "start": 259,
            "end": 371,
            "loc": {
              "start": {
                "line": 8,
                "column": 0
              },
              "end": {
                "line": 11,
                "column": 3
              }
            }
          }
        ]
      },
      {
        "type": "Identifier",
        "start": 372,
        "end": 4464,
        "loc": {
          "start": {
            "line": 12,
            "column": 0
          },
          "end": {
            "line": 154,
            "column": 1
          }
        },
        "id": {
          "type": "Identifier",
          "start": 378,
          "end": 388,
          "loc": {
            "start": {
              "line": 12,
              "column": 6
            },
            "end": {
              "line": 12,
              "column": 16
            },
            "identifierName": "Collisions"
          },
          "name": "Collisions",
          "leadingComments": null
        },
        "superClass": null,
        "body": {
          "type": "ClassBody",
          "start": 389,
          "end": 4464,
          "loc": {
            "start": {
              "line": 12,
              "column": 17
            },
            "end": {
              "line": 154,
              "column": 1
            }
          },
          "body": [
            {
              "type": "ClassMethod",
              "start": 419,
              "end": 480,
              "loc": {
                "start": {
                  "line": 16,
                  "column": 1
                },
                "end": {
                  "line": 19,
                  "column": 2
                }
              },
              "static": false,
              "computed": false,
              "key": {
                "type": "Identifier",
                "start": 419,
                "end": 430,
                "loc": {
                  "start": {
                    "line": 16,
                    "column": 1
                  },
                  "end": {
                    "line": 16,
                    "column": 12
                  },
                  "identifierName": "constructor"
                },
                "name": "constructor",
                "leadingComments": null
              },
              "kind": "constructor",
              "id": null,
              "generator": false,
              "expression": false,
              "async": false,
              "params": [],
              "body": {
                "type": "BlockStatement",
                "start": 433,
                "end": 480,
                "loc": {
                  "start": {
                    "line": 16,
                    "column": 15
                  },
                  "end": {
                    "line": 19,
                    "column": 2
                  }
                },
                "body": [
                  {
                    "type": "ExpressionStatement",
                    "start": 455,
                    "end": 477,
                    "loc": {
                      "start": {
                        "line": 18,
                        "column": 2
                      },
                      "end": {
                        "line": 18,
                        "column": 24
                      }
                    },
                    "expression": {
                      "type": "AssignmentExpression",
                      "start": 455,
                      "end": 476,
                      "loc": {
                        "start": {
                          "line": 18,
                          "column": 2
                        },
                        "end": {
                          "line": 18,
                          "column": 23
                        }
                      },
                      "operator": "=",
                      "left": {
                        "type": "MemberExpression",
                        "start": 455,
                        "end": 464,
                        "loc": {
                          "start": {
                            "line": 18,
                            "column": 2
                          },
                          "end": {
                            "line": 18,
                            "column": 11
                          }
                        },
                        "object": {
                          "type": "ThisExpression",
                          "start": 455,
                          "end": 459,
                          "loc": {
                            "start": {
                              "line": 18,
                              "column": 2
                            },
                            "end": {
                              "line": 18,
                              "column": 6
                            }
                          },
                          "leadingComments": null
                        },
                        "property": {
                          "type": "Identifier",
                          "start": 460,
                          "end": 464,
                          "loc": {
                            "start": {
                              "line": 18,
                              "column": 7
                            },
                            "end": {
                              "line": 18,
                              "column": 11
                            },
                            "identifierName": "_bvh"
                          },
                          "name": "_bvh"
                        },
                        "computed": false,
                        "leadingComments": null
                      },
                      "right": {
                        "type": "NewExpression",
                        "start": 467,
                        "end": 476,
                        "loc": {
                          "start": {
                            "line": 18,
                            "column": 14
                          },
                          "end": {
                            "line": 18,
                            "column": 23
                          }
                        },
                        "callee": {
                          "type": "Identifier",
                          "start": 471,
                          "end": 474,
                          "loc": {
                            "start": {
                              "line": 18,
                              "column": 18
                            },
                            "end": {
                              "line": 18,
                              "column": 21
                            },
                            "identifierName": "BVH"
                          },
                          "name": "BVH"
                        },
                        "arguments": []
                      },
                      "leadingComments": null
                    },
                    "leadingComments": [
                      {
                        "type": "CommentBlock",
                        "value": "* @private ",
                        "start": 437,
                        "end": 452,
                        "loc": {
                          "start": {
                            "line": 17,
                            "column": 2
                          },
                          "end": {
                            "line": 17,
                            "column": 17
                          }
                        }
                      }
                    ]
                  }
                ],
                "directives": [],
                "trailingComments": null
              },
              "leadingComments": [
                {
                  "type": "CommentBlock",
                  "value": "*\n\t * @constructor\n\t ",
                  "start": 392,
                  "end": 417,
                  "loc": {
                    "start": {
                      "line": 13,
                      "column": 1
                    },
                    "end": {
                      "line": 15,
                      "column": 4
                    }
                  }
                }
              ],
              "trailingComments": [
                {
                  "type": "CommentBlock",
                  "value": "*\n\t * Creates a {@link Circle} and inserts it into the collision system\n\t * @param {Number} [x = 0] The starting X coordinate\n\t * @param {Number} [y = 0] The starting Y coordinate\n\t * @param {Number} [radius = 0] The radius\n\t * @param {Number} [scale = 1] The scale\n\t * @param {Number} [padding = 0] The amount to pad the bounding volume when testing for potential collisions\n\t * @returns {Circle}\n\t ",
                  "start": 483,
                  "end": 887,
                  "loc": {
                    "start": {
                      "line": 21,
                      "column": 1
                    },
                    "end": {
                      "line": 29,
                      "column": 4
                    }
                  }
                }
              ]
            },
            {
              "type": "ClassMethod",
              "start": 889,
              "end": 1056,
              "loc": {
                "start": {
                  "line": 30,
                  "column": 1
                },
                "end": {
                  "line": 36,
                  "column": 2
                }
              },
              "static": false,
              "computed": false,
              "key": {
                "type": "Identifier",
                "start": 889,
                "end": 901,
                "loc": {
                  "start": {
                    "line": 30,
                    "column": 1
                  },
                  "end": {
                    "line": 30,
                    "column": 13
                  },
                  "identifierName": "createCircle"
                },
                "name": "createCircle",
                "leadingComments": null
              },
              "kind": "method",
              "id": null,
              "generator": false,
              "expression": false,
              "async": false,
              "params": [
                {
                  "type": "AssignmentPattern",
                  "start": 902,
                  "end": 907,
                  "loc": {
                    "start": {
                      "line": 30,
                      "column": 14
                    },
                    "end": {
                      "line": 30,
                      "column": 19
                    }
                  },
                  "left": {
                    "type": "Identifier",
                    "start": 902,
                    "end": 903,
                    "loc": {
                      "start": {
                        "line": 30,
                        "column": 14
                      },
                      "end": {
                        "line": 30,
                        "column": 15
                      },
                      "identifierName": "x"
                    },
                    "name": "x"
                  },
                  "right": {
                    "type": "NumericLiteral",
                    "start": 906,
                    "end": 907,
                    "loc": {
                      "start": {
                        "line": 30,
                        "column": 18
                      },
                      "end": {
                        "line": 30,
                        "column": 19
                      }
                    },
                    "extra": {
                      "rawValue": 0,
                      "raw": "0"
                    },
                    "value": 0
                  }
                },
                {
                  "type": "AssignmentPattern",
                  "start": 909,
                  "end": 914,
                  "loc": {
                    "start": {
                      "line": 30,
                      "column": 21
                    },
                    "end": {
                      "line": 30,
                      "column": 26
                    }
                  },
                  "left": {
                    "type": "Identifier",
                    "start": 909,
                    "end": 910,
                    "loc": {
                      "start": {
                        "line": 30,
                        "column": 21
                      },
                      "end": {
                        "line": 30,
                        "column": 22
                      },
                      "identifierName": "y"
                    },
                    "name": "y"
                  },
                  "right": {
                    "type": "NumericLiteral",
                    "start": 913,
                    "end": 914,
                    "loc": {
                      "start": {
                        "line": 30,
                        "column": 25
                      },
                      "end": {
                        "line": 30,
                        "column": 26
                      }
                    },
                    "extra": {
                      "rawValue": 0,
                      "raw": "0"
                    },
                    "value": 0
                  }
                },
                {
                  "type": "AssignmentPattern",
                  "start": 916,
                  "end": 926,
                  "loc": {
                    "start": {
                      "line": 30,
                      "column": 28
                    },
                    "end": {
                      "line": 30,
                      "column": 38
                    }
                  },
                  "left": {
                    "type": "Identifier",
                    "start": 916,
                    "end": 922,
                    "loc": {
                      "start": {
                        "line": 30,
                        "column": 28
                      },
                      "end": {
                        "line": 30,
                        "column": 34
                      },
                      "identifierName": "radius"
                    },
                    "name": "radius"
                  },
                  "right": {
                    "type": "NumericLiteral",
                    "start": 925,
                    "end": 926,
                    "loc": {
                      "start": {
                        "line": 30,
                        "column": 37
                      },
                      "end": {
                        "line": 30,
                        "column": 38
                      }
                    },
                    "extra": {
                      "rawValue": 0,
                      "raw": "0"
                    },
                    "value": 0
                  }
                },
                {
                  "type": "AssignmentPattern",
                  "start": 928,
                  "end": 937,
                  "loc": {
                    "start": {
                      "line": 30,
                      "column": 40
                    },
                    "end": {
                      "line": 30,
                      "column": 49
                    }
                  },
                  "left": {
                    "type": "Identifier",
                    "start": 928,
                    "end": 933,
                    "loc": {
                      "start": {
                        "line": 30,
                        "column": 40
                      },
                      "end": {
                        "line": 30,
                        "column": 45
                      },
                      "identifierName": "scale"
                    },
                    "name": "scale"
                  },
                  "right": {
                    "type": "NumericLiteral",
                    "start": 936,
                    "end": 937,
                    "loc": {
                      "start": {
                        "line": 30,
                        "column": 48
                      },
                      "end": {
                        "line": 30,
                        "column": 49
                      }
                    },
                    "extra": {
                      "rawValue": 1,
                      "raw": "1"
                    },
                    "value": 1
                  }
                },
                {
                  "type": "AssignmentPattern",
                  "start": 939,
                  "end": 950,
                  "loc": {
                    "start": {
                      "line": 30,
                      "column": 51
                    },
                    "end": {
                      "line": 30,
                      "column": 62
                    }
                  },
                  "left": {
                    "type": "Identifier",
                    "start": 939,
                    "end": 946,
                    "loc": {
                      "start": {
                        "line": 30,
                        "column": 51
                      },
                      "end": {
                        "line": 30,
                        "column": 58
                      },
                      "identifierName": "padding"
                    },
                    "name": "padding"
                  },
                  "right": {
                    "type": "NumericLiteral",
                    "start": 949,
                    "end": 950,
                    "loc": {
                      "start": {
                        "line": 30,
                        "column": 61
                      },
                      "end": {
                        "line": 30,
                        "column": 62
                      }
                    },
                    "extra": {
                      "rawValue": 0,
                      "raw": "0"
                    },
                    "value": 0
                  }
                }
              ],
              "body": {
                "type": "BlockStatement",
                "start": 952,
                "end": 1056,
                "loc": {
                  "start": {
                    "line": 30,
                    "column": 64
                  },
                  "end": {
                    "line": 36,
                    "column": 2
                  }
                },
                "body": [
                  {
                    "type": "VariableDeclaration",
                    "start": 956,
                    "end": 1010,
                    "loc": {
                      "start": {
                        "line": 31,
                        "column": 2
                      },
                      "end": {
                        "line": 31,
                        "column": 56
                      }
                    },
                    "declarations": [
                      {
                        "type": "VariableDeclarator",
                        "start": 962,
                        "end": 1009,
                        "loc": {
                          "start": {
                            "line": 31,
                            "column": 8
                          },
                          "end": {
                            "line": 31,
                            "column": 55
                          }
                        },
                        "id": {
                          "type": "Identifier",
                          "start": 962,
                          "end": 966,
                          "loc": {
                            "start": {
                              "line": 31,
                              "column": 8
                            },
                            "end": {
                              "line": 31,
                              "column": 12
                            },
                            "identifierName": "body"
                          },
                          "name": "body"
                        },
                        "init": {
                          "type": "NewExpression",
                          "start": 969,
                          "end": 1009,
                          "loc": {
                            "start": {
                              "line": 31,
                              "column": 15
                            },
                            "end": {
                              "line": 31,
                              "column": 55
                            }
                          },
                          "callee": {
                            "type": "Identifier",
                            "start": 973,
                            "end": 979,
                            "loc": {
                              "start": {
                                "line": 31,
                                "column": 19
                              },
                              "end": {
                                "line": 31,
                                "column": 25
                              },
                              "identifierName": "Circle"
                            },
                            "name": "Circle"
                          },
                          "arguments": [
                            {
                              "type": "Identifier",
                              "start": 980,
                              "end": 981,
                              "loc": {
                                "start": {
                                  "line": 31,
                                  "column": 26
                                },
                                "end": {
                                  "line": 31,
                                  "column": 27
                                },
                                "identifierName": "x"
                              },
                              "name": "x"
                            },
                            {
                              "type": "Identifier",
                              "start": 983,
                              "end": 984,
                              "loc": {
                                "start": {
                                  "line": 31,
                                  "column": 29
                                },
                                "end": {
                                  "line": 31,
                                  "column": 30
                                },
                                "identifierName": "y"
                              },
                              "name": "y"
                            },
                            {
                              "type": "Identifier",
                              "start": 986,
                              "end": 992,
                              "loc": {
                                "start": {
                                  "line": 31,
                                  "column": 32
                                },
                                "end": {
                                  "line": 31,
                                  "column": 38
                                },
                                "identifierName": "radius"
                              },
                              "name": "radius"
                            },
                            {
                              "type": "Identifier",
                              "start": 994,
                              "end": 999,
                              "loc": {
                                "start": {
                                  "line": 31,
                                  "column": 40
                                },
                                "end": {
                                  "line": 31,
                                  "column": 45
                                },
                                "identifierName": "scale"
                              },
                              "name": "scale"
                            },
                            {
                              "type": "Identifier",
                              "start": 1001,
                              "end": 1008,
                              "loc": {
                                "start": {
                                  "line": 31,
                                  "column": 47
                                },
                                "end": {
                                  "line": 31,
                                  "column": 54
                                },
                                "identifierName": "padding"
                              },
                              "name": "padding"
                            }
                          ]
                        }
                      }
                    ],
                    "kind": "const"
                  },
                  {
                    "type": "ExpressionStatement",
                    "start": 1014,
                    "end": 1037,
                    "loc": {
                      "start": {
                        "line": 33,
                        "column": 2
                      },
                      "end": {
                        "line": 33,
                        "column": 25
                      }
                    },
                    "expression": {
                      "type": "CallExpression",
                      "start": 1014,
                      "end": 1036,
                      "loc": {
                        "start": {
                          "line": 33,
                          "column": 2
                        },
                        "end": {
                          "line": 33,
                          "column": 24
                        }
                      },
                      "callee": {
                        "type": "MemberExpression",
                        "start": 1014,
                        "end": 1030,
                        "loc": {
                          "start": {
                            "line": 33,
                            "column": 2
                          },
                          "end": {
                            "line": 33,
                            "column": 18
                          }
                        },
                        "object": {
                          "type": "MemberExpression",
                          "start": 1014,
                          "end": 1023,
                          "loc": {
                            "start": {
                              "line": 33,
                              "column": 2
                            },
                            "end": {
                              "line": 33,
                              "column": 11
                            }
                          },
                          "object": {
                            "type": "ThisExpression",
                            "start": 1014,
                            "end": 1018,
                            "loc": {
                              "start": {
                                "line": 33,
                                "column": 2
                              },
                              "end": {
                                "line": 33,
                                "column": 6
                              }
                            }
                          },
                          "property": {
                            "type": "Identifier",
                            "start": 1019,
                            "end": 1023,
                            "loc": {
                              "start": {
                                "line": 33,
                                "column": 7
                              },
                              "end": {
                                "line": 33,
                                "column": 11
                              },
                              "identifierName": "_bvh"
                            },
                            "name": "_bvh"
                          },
                          "computed": false
                        },
                        "property": {
                          "type": "Identifier",
                          "start": 1024,
                          "end": 1030,
                          "loc": {
                            "start": {
                              "line": 33,
                              "column": 12
                            },
                            "end": {
                              "line": 33,
                              "column": 18
                            },
                            "identifierName": "insert"
                          },
                          "name": "insert"
                        },
                        "computed": false
                      },
                      "arguments": [
                        {
                          "type": "Identifier",
                          "start": 1031,
                          "end": 1035,
                          "loc": {
                            "start": {
                              "line": 33,
                              "column": 19
                            },
                            "end": {
                              "line": 33,
                              "column": 23
                            },
                            "identifierName": "body"
                          },
                          "name": "body"
                        }
                      ]
                    }
                  },
                  {
                    "type": "ReturnStatement",
                    "start": 1041,
                    "end": 1053,
                    "loc": {
                      "start": {
                        "line": 35,
                        "column": 2
                      },
                      "end": {
                        "line": 35,
                        "column": 14
                      }
                    },
                    "argument": {
                      "type": "Identifier",
                      "start": 1048,
                      "end": 1052,
                      "loc": {
                        "start": {
                          "line": 35,
                          "column": 9
                        },
                        "end": {
                          "line": 35,
                          "column": 13
                        },
                        "identifierName": "body"
                      },
                      "name": "body"
                    }
                  }
                ],
                "directives": [],
                "trailingComments": null
              },
              "leadingComments": [
                {
                  "type": "CommentBlock",
                  "value": "*\n\t * Creates a {@link Circle} and inserts it into the collision system\n\t * @param {Number} [x = 0] The starting X coordinate\n\t * @param {Number} [y = 0] The starting Y coordinate\n\t * @param {Number} [radius = 0] The radius\n\t * @param {Number} [scale = 1] The scale\n\t * @param {Number} [padding = 0] The amount to pad the bounding volume when testing for potential collisions\n\t * @returns {Circle}\n\t ",
                  "start": 483,
                  "end": 887,
                  "loc": {
                    "start": {
                      "line": 21,
                      "column": 1
                    },
                    "end": {
                      "line": 29,
                      "column": 4
                    }
                  }
                }
              ],
              "trailingComments": [
                {
                  "type": "CommentBlock",
                  "value": "*\n\t * Creates a {@link Polygon} and inserts it into the collision system\n\t * @param {Number} [x = 0] The starting X coordinate\n\t * @param {Number} [y = 0] The starting Y coordinate\n\t * @param {Array<Number[]>} [points = []] An array of coordinate pairs making up the polygon - [[x1, y1], [x2, y2], ...]\n\t * @param {Number} [angle = 0] The starting rotation in radians\n\t * @param {Number} [scale_x = 1] The starting scale along the X axis\n\t * @param {Number} [scale_y = 1] The starting scale long the Y axis\n\t * @param {Number} [padding = 0] The amount to pad the bounding volume when testing for potential collisions\n\t * @returns {Polygon}\n\t ",
                  "start": 1059,
                  "end": 1705,
                  "loc": {
                    "start": {
                      "line": 38,
                      "column": 1
                    },
                    "end": {
                      "line": 48,
                      "column": 4
                    }
                  }
                }
              ]
            },
            {
              "type": "ClassMethod",
              "start": 1707,
              "end": 1927,
              "loc": {
                "start": {
                  "line": 49,
                  "column": 1
                },
                "end": {
                  "line": 55,
                  "column": 2
                }
              },
              "static": false,
              "computed": false,
              "key": {
                "type": "Identifier",
                "start": 1707,
                "end": 1720,
                "loc": {
                  "start": {
                    "line": 49,
                    "column": 1
                  },
                  "end": {
                    "line": 49,
                    "column": 14
                  },
                  "identifierName": "createPolygon"
                },
                "name": "createPolygon",
                "leadingComments": null
              },
              "kind": "method",
              "id": null,
              "generator": false,
              "expression": false,
              "async": false,
              "params": [
                {
                  "type": "AssignmentPattern",
                  "start": 1721,
                  "end": 1726,
                  "loc": {
                    "start": {
                      "line": 49,
                      "column": 15
                    },
                    "end": {
                      "line": 49,
                      "column": 20
                    }
                  },
                  "left": {
                    "type": "Identifier",
                    "start": 1721,
                    "end": 1722,
                    "loc": {
                      "start": {
                        "line": 49,
                        "column": 15
                      },
                      "end": {
                        "line": 49,
                        "column": 16
                      },
                      "identifierName": "x"
                    },
                    "name": "x"
                  },
                  "right": {
                    "type": "NumericLiteral",
                    "start": 1725,
                    "end": 1726,
                    "loc": {
                      "start": {
                        "line": 49,
                        "column": 19
                      },
                      "end": {
                        "line": 49,
                        "column": 20
                      }
                    },
                    "extra": {
                      "rawValue": 0,
                      "raw": "0"
                    },
                    "value": 0
                  }
                },
                {
                  "type": "AssignmentPattern",
                  "start": 1728,
                  "end": 1733,
                  "loc": {
                    "start": {
                      "line": 49,
                      "column": 22
                    },
                    "end": {
                      "line": 49,
                      "column": 27
                    }
                  },
                  "left": {
                    "type": "Identifier",
                    "start": 1728,
                    "end": 1729,
                    "loc": {
                      "start": {
                        "line": 49,
                        "column": 22
                      },
                      "end": {
                        "line": 49,
                        "column": 23
                      },
                      "identifierName": "y"
                    },
                    "name": "y"
                  },
                  "right": {
                    "type": "NumericLiteral",
                    "start": 1732,
                    "end": 1733,
                    "loc": {
                      "start": {
                        "line": 49,
                        "column": 26
                      },
                      "end": {
                        "line": 49,
                        "column": 27
                      }
                    },
                    "extra": {
                      "rawValue": 0,
                      "raw": "0"
                    },
                    "value": 0
                  }
                },
                {
                  "type": "AssignmentPattern",
                  "start": 1735,
                  "end": 1752,
                  "loc": {
                    "start": {
                      "line": 49,
                      "column": 29
                    },
                    "end": {
                      "line": 49,
                      "column": 46
                    }
                  },
                  "left": {
                    "type": "Identifier",
                    "start": 1735,
                    "end": 1741,
                    "loc": {
                      "start": {
                        "line": 49,
                        "column": 29
                      },
                      "end": {
                        "line": 49,
                        "column": 35
                      },
                      "identifierName": "points"
                    },
                    "name": "points"
                  },
                  "right": {
                    "type": "ArrayExpression",
                    "start": 1744,
                    "end": 1752,
                    "loc": {
                      "start": {
                        "line": 49,
                        "column": 38
                      },
                      "end": {
                        "line": 49,
                        "column": 46
                      }
                    },
                    "elements": [
                      {
                        "type": "ArrayExpression",
                        "start": 1745,
                        "end": 1751,
                        "loc": {
                          "start": {
                            "line": 49,
                            "column": 39
                          },
                          "end": {
                            "line": 49,
                            "column": 45
                          }
                        },
                        "elements": [
                          {
                            "type": "NumericLiteral",
                            "start": 1746,
                            "end": 1747,
                            "loc": {
                              "start": {
                                "line": 49,
                                "column": 40
                              },
                              "end": {
                                "line": 49,
                                "column": 41
                              }
                            },
                            "extra": {
                              "rawValue": 0,
                              "raw": "0"
                            },
                            "value": 0
                          },
                          {
                            "type": "NumericLiteral",
                            "start": 1749,
                            "end": 1750,
                            "loc": {
                              "start": {
                                "line": 49,
                                "column": 43
                              },
                              "end": {
                                "line": 49,
                                "column": 44
                              }
                            },
                            "extra": {
                              "rawValue": 0,
                              "raw": "0"
                            },
                            "value": 0
                          }
                        ]
                      }
                    ]
                  }
                },
                {
                  "type": "AssignmentPattern",
                  "start": 1754,
                  "end": 1763,
                  "loc": {
                    "start": {
                      "line": 49,
                      "column": 48
                    },
                    "end": {
                      "line": 49,
                      "column": 57
                    }
                  },
                  "left": {
                    "type": "Identifier",
                    "start": 1754,
                    "end": 1759,
                    "loc": {
                      "start": {
                        "line": 49,
                        "column": 48
                      },
                      "end": {
                        "line": 49,
                        "column": 53
                      },
                      "identifierName": "angle"
                    },
                    "name": "angle"
                  },
                  "right": {
                    "type": "NumericLiteral",
                    "start": 1762,
                    "end": 1763,
                    "loc": {
                      "start": {
                        "line": 49,
                        "column": 56
                      },
                      "end": {
                        "line": 49,
                        "column": 57
                      }
                    },
                    "extra": {
                      "rawValue": 0,
                      "raw": "0"
                    },
                    "value": 0
                  }
                },
                {
                  "type": "AssignmentPattern",
                  "start": 1765,
                  "end": 1776,
                  "loc": {
                    "start": {
                      "line": 49,
                      "column": 59
                    },
                    "end": {
                      "line": 49,
                      "column": 70
                    }
                  },
                  "left": {
                    "type": "Identifier",
                    "start": 1765,
                    "end": 1772,
                    "loc": {
                      "start": {
                        "line": 49,
                        "column": 59
                      },
                      "end": {
                        "line": 49,
                        "column": 66
                      },
                      "identifierName": "scale_x"
                    },
                    "name": "scale_x"
                  },
                  "right": {
                    "type": "NumericLiteral",
                    "start": 1775,
                    "end": 1776,
                    "loc": {
                      "start": {
                        "line": 49,
                        "column": 69
                      },
                      "end": {
                        "line": 49,
                        "column": 70
                      }
                    },
                    "extra": {
                      "rawValue": 1,
                      "raw": "1"
                    },
                    "value": 1
                  }
                },
                {
                  "type": "AssignmentPattern",
                  "start": 1778,
                  "end": 1789,
                  "loc": {
                    "start": {
                      "line": 49,
                      "column": 72
                    },
                    "end": {
                      "line": 49,
                      "column": 83
                    }
                  },
                  "left": {
                    "type": "Identifier",
                    "start": 1778,
                    "end": 1785,
                    "loc": {
                      "start": {
                        "line": 49,
                        "column": 72
                      },
                      "end": {
                        "line": 49,
                        "column": 79
                      },
                      "identifierName": "scale_y"
                    },
                    "name": "scale_y"
                  },
                  "right": {
                    "type": "NumericLiteral",
                    "start": 1788,
                    "end": 1789,
                    "loc": {
                      "start": {
                        "line": 49,
                        "column": 82
                      },
                      "end": {
                        "line": 49,
                        "column": 83
                      }
                    },
                    "extra": {
                      "rawValue": 1,
                      "raw": "1"
                    },
                    "value": 1
                  }
                },
                {
                  "type": "AssignmentPattern",
                  "start": 1791,
                  "end": 1802,
                  "loc": {
                    "start": {
                      "line": 49,
                      "column": 85
                    },
                    "end": {
                      "line": 49,
                      "column": 96
                    }
                  },
                  "left": {
                    "type": "Identifier",
                    "start": 1791,
                    "end": 1798,
                    "loc": {
                      "start": {
                        "line": 49,
                        "column": 85
                      },
                      "end": {
                        "line": 49,
                        "column": 92
                      },
                      "identifierName": "padding"
                    },
                    "name": "padding"
                  },
                  "right": {
                    "type": "NumericLiteral",
                    "start": 1801,
                    "end": 1802,
                    "loc": {
                      "start": {
                        "line": 49,
                        "column": 95
                      },
                      "end": {
                        "line": 49,
                        "column": 96
                      }
                    },
                    "extra": {
                      "rawValue": 0,
                      "raw": "0"
                    },
                    "value": 0
                  }
                }
              ],
              "body": {
                "type": "BlockStatement",
                "start": 1804,
                "end": 1927,
                "loc": {
                  "start": {
                    "line": 49,
                    "column": 98
                  },
                  "end": {
                    "line": 55,
                    "column": 2
                  }
                },
                "body": [
                  {
                    "type": "VariableDeclaration",
                    "start": 1808,
                    "end": 1881,
                    "loc": {
                      "start": {
                        "line": 50,
                        "column": 2
                      },
                      "end": {
                        "line": 50,
                        "column": 75
                      }
                    },
                    "declarations": [
                      {
                        "type": "VariableDeclarator",
                        "start": 1814,
                        "end": 1880,
                        "loc": {
                          "start": {
                            "line": 50,
                            "column": 8
                          },
                          "end": {
                            "line": 50,
                            "column": 74
                          }
                        },
                        "id": {
                          "type": "Identifier",
                          "start": 1814,
                          "end": 1818,
                          "loc": {
                            "start": {
                              "line": 50,
                              "column": 8
                            },
                            "end": {
                              "line": 50,
                              "column": 12
                            },
                            "identifierName": "body"
                          },
                          "name": "body"
                        },
                        "init": {
                          "type": "NewExpression",
                          "start": 1821,
                          "end": 1880,
                          "loc": {
                            "start": {
                              "line": 50,
                              "column": 15
                            },
                            "end": {
                              "line": 50,
                              "column": 74
                            }
                          },
                          "callee": {
                            "type": "Identifier",
                            "start": 1825,
                            "end": 1832,
                            "loc": {
                              "start": {
                                "line": 50,
                                "column": 19
                              },
                              "end": {
                                "line": 50,
                                "column": 26
                              },
                              "identifierName": "Polygon"
                            },
                            "name": "Polygon"
                          },
                          "arguments": [
                            {
                              "type": "Identifier",
                              "start": 1833,
                              "end": 1834,
                              "loc": {
                                "start": {
                                  "line": 50,
                                  "column": 27
                                },
                                "end": {
                                  "line": 50,
                                  "column": 28
                                },
                                "identifierName": "x"
                              },
                              "name": "x"
                            },
                            {
                              "type": "Identifier",
                              "start": 1836,
                              "end": 1837,
                              "loc": {
                                "start": {
                                  "line": 50,
                                  "column": 30
                                },
                                "end": {
                                  "line": 50,
                                  "column": 31
                                },
                                "identifierName": "y"
                              },
                              "name": "y"
                            },
                            {
                              "type": "Identifier",
                              "start": 1839,
                              "end": 1845,
                              "loc": {
                                "start": {
                                  "line": 50,
                                  "column": 33
                                },
                                "end": {
                                  "line": 50,
                                  "column": 39
                                },
                                "identifierName": "points"
                              },
                              "name": "points"
                            },
                            {
                              "type": "Identifier",
                              "start": 1847,
                              "end": 1852,
                              "loc": {
                                "start": {
                                  "line": 50,
                                  "column": 41
                                },
                                "end": {
                                  "line": 50,
                                  "column": 46
                                },
                                "identifierName": "angle"
                              },
                              "name": "angle"
                            },
                            {
                              "type": "Identifier",
                              "start": 1854,
                              "end": 1861,
                              "loc": {
                                "start": {
                                  "line": 50,
                                  "column": 48
                                },
                                "end": {
                                  "line": 50,
                                  "column": 55
                                },
                                "identifierName": "scale_x"
                              },
                              "name": "scale_x"
                            },
                            {
                              "type": "Identifier",
                              "start": 1863,
                              "end": 1870,
                              "loc": {
                                "start": {
                                  "line": 50,
                                  "column": 57
                                },
                                "end": {
                                  "line": 50,
                                  "column": 64
                                },
                                "identifierName": "scale_y"
                              },
                              "name": "scale_y"
                            },
                            {
                              "type": "Identifier",
                              "start": 1872,
                              "end": 1879,
                              "loc": {
                                "start": {
                                  "line": 50,
                                  "column": 66
                                },
                                "end": {
                                  "line": 50,
                                  "column": 73
                                },
                                "identifierName": "padding"
                              },
                              "name": "padding"
                            }
                          ]
                        }
                      }
                    ],
                    "kind": "const"
                  },
                  {
                    "type": "ExpressionStatement",
                    "start": 1885,
                    "end": 1908,
                    "loc": {
                      "start": {
                        "line": 52,
                        "column": 2
                      },
                      "end": {
                        "line": 52,
                        "column": 25
                      }
                    },
                    "expression": {
                      "type": "CallExpression",
                      "start": 1885,
                      "end": 1907,
                      "loc": {
                        "start": {
                          "line": 52,
                          "column": 2
                        },
                        "end": {
                          "line": 52,
                          "column": 24
                        }
                      },
                      "callee": {
                        "type": "MemberExpression",
                        "start": 1885,
                        "end": 1901,
                        "loc": {
                          "start": {
                            "line": 52,
                            "column": 2
                          },
                          "end": {
                            "line": 52,
                            "column": 18
                          }
                        },
                        "object": {
                          "type": "MemberExpression",
                          "start": 1885,
                          "end": 1894,
                          "loc": {
                            "start": {
                              "line": 52,
                              "column": 2
                            },
                            "end": {
                              "line": 52,
                              "column": 11
                            }
                          },
                          "object": {
                            "type": "ThisExpression",
                            "start": 1885,
                            "end": 1889,
                            "loc": {
                              "start": {
                                "line": 52,
                                "column": 2
                              },
                              "end": {
                                "line": 52,
                                "column": 6
                              }
                            }
                          },
                          "property": {
                            "type": "Identifier",
                            "start": 1890,
                            "end": 1894,
                            "loc": {
                              "start": {
                                "line": 52,
                                "column": 7
                              },
                              "end": {
                                "line": 52,
                                "column": 11
                              },
                              "identifierName": "_bvh"
                            },
                            "name": "_bvh"
                          },
                          "computed": false
                        },
                        "property": {
                          "type": "Identifier",
                          "start": 1895,
                          "end": 1901,
                          "loc": {
                            "start": {
                              "line": 52,
                              "column": 12
                            },
                            "end": {
                              "line": 52,
                              "column": 18
                            },
                            "identifierName": "insert"
                          },
                          "name": "insert"
                        },
                        "computed": false
                      },
                      "arguments": [
                        {
                          "type": "Identifier",
                          "start": 1902,
                          "end": 1906,
                          "loc": {
                            "start": {
                              "line": 52,
                              "column": 19
                            },
                            "end": {
                              "line": 52,
                              "column": 23
                            },
                            "identifierName": "body"
                          },
                          "name": "body"
                        }
                      ]
                    }
                  },
                  {
                    "type": "ReturnStatement",
                    "start": 1912,
                    "end": 1924,
                    "loc": {
                      "start": {
                        "line": 54,
                        "column": 2
                      },
                      "end": {
                        "line": 54,
                        "column": 14
                      }
                    },
                    "argument": {
                      "type": "Identifier",
                      "start": 1919,
                      "end": 1923,
                      "loc": {
                        "start": {
                          "line": 54,
                          "column": 9
                        },
                        "end": {
                          "line": 54,
                          "column": 13
                        },
                        "identifierName": "body"
                      },
                      "name": "body"
                    }
                  }
                ],
                "directives": [],
                "trailingComments": null
              },
              "leadingComments": [
                {
                  "type": "CommentBlock",
                  "value": "*\n\t * Creates a {@link Polygon} and inserts it into the collision system\n\t * @param {Number} [x = 0] The starting X coordinate\n\t * @param {Number} [y = 0] The starting Y coordinate\n\t * @param {Array<Number[]>} [points = []] An array of coordinate pairs making up the polygon - [[x1, y1], [x2, y2], ...]\n\t * @param {Number} [angle = 0] The starting rotation in radians\n\t * @param {Number} [scale_x = 1] The starting scale along the X axis\n\t * @param {Number} [scale_y = 1] The starting scale long the Y axis\n\t * @param {Number} [padding = 0] The amount to pad the bounding volume when testing for potential collisions\n\t * @returns {Polygon}\n\t ",
                  "start": 1059,
                  "end": 1705,
                  "loc": {
                    "start": {
                      "line": 38,
                      "column": 1
                    },
                    "end": {
                      "line": 48,
                      "column": 4
                    }
                  }
                }
              ],
              "trailingComments": [
                {
                  "type": "CommentBlock",
                  "value": "*\n\t * Creates a {@link Point} and inserts it into the collision system\n\t * @param {Number} [x = 0] The starting X coordinate\n\t * @param {Number} [y = 0] The starting Y coordinate\n\t * @param {Number} [padding = 0] The amount to pad the bounding volume when testing for potential collisions\n\t * @returns {Point}\n\t ",
                  "start": 1930,
                  "end": 2246,
                  "loc": {
                    "start": {
                      "line": 57,
                      "column": 1
                    },
                    "end": {
                      "line": 63,
                      "column": 4
                    }
                  }
                }
              ]
            },
            {
              "type": "ClassMethod",
              "start": 2248,
              "end": 2375,
              "loc": {
                "start": {
                  "line": 64,
                  "column": 1
                },
                "end": {
                  "line": 70,
                  "column": 2
                }
              },
              "static": false,
              "computed": false,
              "key": {
                "type": "Identifier",
                "start": 2248,
                "end": 2259,
                "loc": {
                  "start": {
                    "line": 64,
                    "column": 1
                  },
                  "end": {
                    "line": 64,
                    "column": 12
                  },
                  "identifierName": "createPoint"
                },
                "name": "createPoint",
                "leadingComments": null
              },
              "kind": "method",
              "id": null,
              "generator": false,
              "expression": false,
              "async": false,
              "params": [
                {
                  "type": "AssignmentPattern",
                  "start": 2260,
                  "end": 2265,
                  "loc": {
                    "start": {
                      "line": 64,
                      "column": 13
                    },
                    "end": {
                      "line": 64,
                      "column": 18
                    }
                  },
                  "left": {
                    "type": "Identifier",
                    "start": 2260,
                    "end": 2261,
                    "loc": {
                      "start": {
                        "line": 64,
                        "column": 13
                      },
                      "end": {
                        "line": 64,
                        "column": 14
                      },
                      "identifierName": "x"
                    },
                    "name": "x"
                  },
                  "right": {
                    "type": "NumericLiteral",
                    "start": 2264,
                    "end": 2265,
                    "loc": {
                      "start": {
                        "line": 64,
                        "column": 17
                      },
                      "end": {
                        "line": 64,
                        "column": 18
                      }
                    },
                    "extra": {
                      "rawValue": 0,
                      "raw": "0"
                    },
                    "value": 0
                  }
                },
                {
                  "type": "AssignmentPattern",
                  "start": 2267,
                  "end": 2272,
                  "loc": {
                    "start": {
                      "line": 64,
                      "column": 20
                    },
                    "end": {
                      "line": 64,
                      "column": 25
                    }
                  },
                  "left": {
                    "type": "Identifier",
                    "start": 2267,
                    "end": 2268,
                    "loc": {
                      "start": {
                        "line": 64,
                        "column": 20
                      },
                      "end": {
                        "line": 64,
                        "column": 21
                      },
                      "identifierName": "y"
                    },
                    "name": "y"
                  },
                  "right": {
                    "type": "NumericLiteral",
                    "start": 2271,
                    "end": 2272,
                    "loc": {
                      "start": {
                        "line": 64,
                        "column": 24
                      },
                      "end": {
                        "line": 64,
                        "column": 25
                      }
                    },
                    "extra": {
                      "rawValue": 0,
                      "raw": "0"
                    },
                    "value": 0
                  }
                },
                {
                  "type": "AssignmentPattern",
                  "start": 2274,
                  "end": 2285,
                  "loc": {
                    "start": {
                      "line": 64,
                      "column": 27
                    },
                    "end": {
                      "line": 64,
                      "column": 38
                    }
                  },
                  "left": {
                    "type": "Identifier",
                    "start": 2274,
                    "end": 2281,
                    "loc": {
                      "start": {
                        "line": 64,
                        "column": 27
                      },
                      "end": {
                        "line": 64,
                        "column": 34
                      },
                      "identifierName": "padding"
                    },
                    "name": "padding"
                  },
                  "right": {
                    "type": "NumericLiteral",
                    "start": 2284,
                    "end": 2285,
                    "loc": {
                      "start": {
                        "line": 64,
                        "column": 37
                      },
                      "end": {
                        "line": 64,
                        "column": 38
                      }
                    },
                    "extra": {
                      "rawValue": 0,
                      "raw": "0"
                    },
                    "value": 0
                  }
                }
              ],
              "body": {
                "type": "BlockStatement",
                "start": 2287,
                "end": 2375,
                "loc": {
                  "start": {
                    "line": 64,
                    "column": 40
                  },
                  "end": {
                    "line": 70,
                    "column": 2
                  }
                },
                "body": [
                  {
                    "type": "VariableDeclaration",
                    "start": 2291,
                    "end": 2329,
                    "loc": {
                      "start": {
                        "line": 65,
                        "column": 2
                      },
                      "end": {
                        "line": 65,
                        "column": 40
                      }
                    },
                    "declarations": [
                      {
                        "type": "VariableDeclarator",
                        "start": 2297,
                        "end": 2328,
                        "loc": {
                          "start": {
                            "line": 65,
                            "column": 8
                          },
                          "end": {
                            "line": 65,
                            "column": 39
                          }
                        },
                        "id": {
                          "type": "Identifier",
                          "start": 2297,
                          "end": 2301,
                          "loc": {
                            "start": {
                              "line": 65,
                              "column": 8
                            },
                            "end": {
                              "line": 65,
                              "column": 12
                            },
                            "identifierName": "body"
                          },
                          "name": "body"
                        },
                        "init": {
                          "type": "NewExpression",
                          "start": 2304,
                          "end": 2328,
                          "loc": {
                            "start": {
                              "line": 65,
                              "column": 15
                            },
                            "end": {
                              "line": 65,
                              "column": 39
                            }
                          },
                          "callee": {
                            "type": "Identifier",
                            "start": 2308,
                            "end": 2313,
                            "loc": {
                              "start": {
                                "line": 65,
                                "column": 19
                              },
                              "end": {
                                "line": 65,
                                "column": 24
                              },
                              "identifierName": "Point"
                            },
                            "name": "Point"
                          },
                          "arguments": [
                            {
                              "type": "Identifier",
                              "start": 2314,
                              "end": 2315,
                              "loc": {
                                "start": {
                                  "line": 65,
                                  "column": 25
                                },
                                "end": {
                                  "line": 65,
                                  "column": 26
                                },
                                "identifierName": "x"
                              },
                              "name": "x"
                            },
                            {
                              "type": "Identifier",
                              "start": 2317,
                              "end": 2318,
                              "loc": {
                                "start": {
                                  "line": 65,
                                  "column": 28
                                },
                                "end": {
                                  "line": 65,
                                  "column": 29
                                },
                                "identifierName": "y"
                              },
                              "name": "y"
                            },
                            {
                              "type": "Identifier",
                              "start": 2320,
                              "end": 2327,
                              "loc": {
                                "start": {
                                  "line": 65,
                                  "column": 31
                                },
                                "end": {
                                  "line": 65,
                                  "column": 38
                                },
                                "identifierName": "padding"
                              },
                              "name": "padding"
                            }
                          ]
                        }
                      }
                    ],
                    "kind": "const"
                  },
                  {
                    "type": "ExpressionStatement",
                    "start": 2333,
                    "end": 2356,
                    "loc": {
                      "start": {
                        "line": 67,
                        "column": 2
                      },
                      "end": {
                        "line": 67,
                        "column": 25
                      }
                    },
                    "expression": {
                      "type": "CallExpression",
                      "start": 2333,
                      "end": 2355,
                      "loc": {
                        "start": {
                          "line": 67,
                          "column": 2
                        },
                        "end": {
                          "line": 67,
                          "column": 24
                        }
                      },
                      "callee": {
                        "type": "MemberExpression",
                        "start": 2333,
                        "end": 2349,
                        "loc": {
                          "start": {
                            "line": 67,
                            "column": 2
                          },
                          "end": {
                            "line": 67,
                            "column": 18
                          }
                        },
                        "object": {
                          "type": "MemberExpression",
                          "start": 2333,
                          "end": 2342,
                          "loc": {
                            "start": {
                              "line": 67,
                              "column": 2
                            },
                            "end": {
                              "line": 67,
                              "column": 11
                            }
                          },
                          "object": {
                            "type": "ThisExpression",
                            "start": 2333,
                            "end": 2337,
                            "loc": {
                              "start": {
                                "line": 67,
                                "column": 2
                              },
                              "end": {
                                "line": 67,
                                "column": 6
                              }
                            }
                          },
                          "property": {
                            "type": "Identifier",
                            "start": 2338,
                            "end": 2342,
                            "loc": {
                              "start": {
                                "line": 67,
                                "column": 7
                              },
                              "end": {
                                "line": 67,
                                "column": 11
                              },
                              "identifierName": "_bvh"
                            },
                            "name": "_bvh"
                          },
                          "computed": false
                        },
                        "property": {
                          "type": "Identifier",
                          "start": 2343,
                          "end": 2349,
                          "loc": {
                            "start": {
                              "line": 67,
                              "column": 12
                            },
                            "end": {
                              "line": 67,
                              "column": 18
                            },
                            "identifierName": "insert"
                          },
                          "name": "insert"
                        },
                        "computed": false
                      },
                      "arguments": [
                        {
                          "type": "Identifier",
                          "start": 2350,
                          "end": 2354,
                          "loc": {
                            "start": {
                              "line": 67,
                              "column": 19
                            },
                            "end": {
                              "line": 67,
                              "column": 23
                            },
                            "identifierName": "body"
                          },
                          "name": "body"
                        }
                      ]
                    }
                  },
                  {
                    "type": "ReturnStatement",
                    "start": 2360,
                    "end": 2372,
                    "loc": {
                      "start": {
                        "line": 69,
                        "column": 2
                      },
                      "end": {
                        "line": 69,
                        "column": 14
                      }
                    },
                    "argument": {
                      "type": "Identifier",
                      "start": 2367,
                      "end": 2371,
                      "loc": {
                        "start": {
                          "line": 69,
                          "column": 9
                        },
                        "end": {
                          "line": 69,
                          "column": 13
                        },
                        "identifierName": "body"
                      },
                      "name": "body"
                    }
                  }
                ],
                "directives": [],
                "trailingComments": null
              },
              "leadingComments": [
                {
                  "type": "CommentBlock",
                  "value": "*\n\t * Creates a {@link Point} and inserts it into the collision system\n\t * @param {Number} [x = 0] The starting X coordinate\n\t * @param {Number} [y = 0] The starting Y coordinate\n\t * @param {Number} [padding = 0] The amount to pad the bounding volume when testing for potential collisions\n\t * @returns {Point}\n\t ",
                  "start": 1930,
                  "end": 2246,
                  "loc": {
                    "start": {
                      "line": 57,
                      "column": 1
                    },
                    "end": {
                      "line": 63,
                      "column": 4
                    }
                  }
                }
              ],
              "trailingComments": [
                {
                  "type": "CommentBlock",
                  "value": "*\n\t * Creates a {@link Result} used to collect the detailed results of a collision test\n\t ",
                  "start": 2378,
                  "end": 2472,
                  "loc": {
                    "start": {
                      "line": 72,
                      "column": 1
                    },
                    "end": {
                      "line": 74,
                      "column": 4
                    }
                  }
                }
              ]
            },
            {
              "type": "ClassMethod",
              "start": 2474,
              "end": 2516,
              "loc": {
                "start": {
                  "line": 75,
                  "column": 1
                },
                "end": {
                  "line": 77,
                  "column": 2
                }
              },
              "static": false,
              "computed": false,
              "key": {
                "type": "Identifier",
                "start": 2474,
                "end": 2486,
                "loc": {
                  "start": {
                    "line": 75,
                    "column": 1
                  },
                  "end": {
                    "line": 75,
                    "column": 13
                  },
                  "identifierName": "createResult"
                },
                "name": "createResult",
                "leadingComments": null
              },
              "kind": "method",
              "id": null,
              "generator": false,
              "expression": false,
              "async": false,
              "params": [],
              "body": {
                "type": "BlockStatement",
                "start": 2489,
                "end": 2516,
                "loc": {
                  "start": {
                    "line": 75,
                    "column": 16
                  },
                  "end": {
                    "line": 77,
                    "column": 2
                  }
                },
                "body": [
                  {
                    "type": "ReturnStatement",
                    "start": 2493,
                    "end": 2513,
                    "loc": {
                      "start": {
                        "line": 76,
                        "column": 2
                      },
                      "end": {
                        "line": 76,
                        "column": 22
                      }
                    },
                    "argument": {
                      "type": "NewExpression",
                      "start": 2500,
                      "end": 2512,
                      "loc": {
                        "start": {
       
Download .txt
gitextract_owam7utj/

├── .esdoc.json
├── .gitignore
├── LICENSE
├── README.md
├── collisions.d.ts
├── demo/
│   ├── examples/
│   │   ├── Stress.mjs
│   │   └── Tank.mjs
│   └── index.mjs
├── docs/
│   ├── ast/
│   │   └── source/
│   │       ├── .external-ecmascript.js.json
│   │       ├── Collisions.mjs.json
│   │       └── modules/
│   │           ├── BVH.mjs.json
│   │           ├── BVHBranch.mjs.json
│   │           ├── Body.mjs.json
│   │           ├── Circle.mjs.json
│   │           ├── Point.mjs.json
│   │           ├── Polygon.mjs.json
│   │           ├── Result.mjs.json
│   │           └── SAT.mjs.json
│   ├── class/
│   │   └── src/
│   │       ├── Collisions.mjs~Collisions.html
│   │       └── modules/
│   │           ├── Body.mjs~Body.html
│   │           ├── Circle.mjs~Circle.html
│   │           ├── Point.mjs~Point.html
│   │           ├── Polygon.mjs~Polygon.html
│   │           └── Result.mjs~Result.html
│   ├── coverage.json
│   ├── css/
│   │   ├── github.css
│   │   ├── identifiers.css
│   │   ├── manual.css
│   │   ├── prettify-tomorrow.css
│   │   ├── search.css
│   │   ├── source.css
│   │   ├── style.css
│   │   └── test.css
│   ├── demo/
│   │   ├── index.html
│   │   └── index.js
│   ├── file/
│   │   └── src/
│   │       ├── Collisions.mjs.html
│   │       └── modules/
│   │           ├── BVH.mjs.html
│   │           ├── BVHBranch.mjs.html
│   │           ├── Body.mjs.html
│   │           ├── Circle.mjs.html
│   │           ├── Point.mjs.html
│   │           ├── Polygon.mjs.html
│   │           ├── Result.mjs.html
│   │           └── SAT.mjs.html
│   ├── identifiers.html
│   ├── index.html
│   ├── index.json
│   ├── script/
│   │   ├── inherited-summary.js
│   │   ├── inner-link.js
│   │   ├── manual.js
│   │   ├── patch-for-local.js
│   │   ├── prettify/
│   │   │   ├── Apache-License-2.0.txt
│   │   │   └── prettify.js
│   │   ├── pretty-print.js
│   │   ├── search.js
│   │   ├── search_index.js
│   │   └── test-summary.js
│   └── source.html
├── package.json
├── src/
│   ├── Collisions.mjs
│   └── modules/
│       ├── BVH.mjs
│       ├── BVHBranch.mjs
│       ├── Body.mjs
│       ├── Circle.mjs
│       ├── Point.mjs
│       ├── Polygon.mjs
│       ├── Result.mjs
│       └── SAT.mjs
└── webpack.config.js
Download .txt
SYMBOL INDEX (156 symbols across 17 files)

FILE: collisions.d.ts
  class Circle (line 45) | class Circle extends Body {
  class Polygon (line 65) | class Polygon extends Body {
  class Point (line 88) | class Point extends Body {
  class Result (line 99) | class Result {
  class Collisions (line 115) | class Collisions {

FILE: demo/examples/Stress.mjs
  class Stress (line 13) | class Stress {
    method constructor (line 14) | constructor() {
    method update (line 61) | update(fps) {
    method createShape (line 123) | createShape(large) {
  function random (line 155) | function random(min, max) {

FILE: demo/examples/Tank.mjs
  class Tank (line 7) | class Tank {
    method constructor (line 8) | constructor() {
    method update (line 59) | update() {
    method handleInput (line 66) | handleInput() {
    method processGameLogic (line 73) | processGameLogic() {
    method handleCollisions (line 102) | handleCollisions() {
    method render (line 118) | render() {
    method createPlayer (line 135) | createPlayer(x, y) {
    method createMap (line 148) | createMap() {
  function random (line 199) | function random(min, max) {

FILE: docs/demo/index.js
  function __webpack_require__ (line 6) | function __webpack_require__(moduleId) {
  class Collisions (line 94) | class Collisions {
    method constructor (line 98) | constructor() {
    method createCircle (line 112) | createCircle(x = 0, y = 0, radius = 0, scale = 1, padding = 0) {
    method createPolygon (line 131) | createPolygon(x = 0, y = 0, points = [[0, 0]], angle = 0, scale_x = 1,...
    method createPoint (line 146) | createPoint(x = 0, y = 0, padding = 0) {
    method createResult (line 157) | createResult() {
    method createResult (line 164) | static createResult() {
    method insert (line 172) | insert(...bodies) {
    method remove (line 184) | remove(...bodies) {
    method update (line 195) | update() {
    method draw (line 205) | draw(context) {
    method drawBVH (line 213) | drawBVH(context) {
    method potentials (line 222) | potentials(body) {
    method collides (line 233) | collides(source, target, result = null, aabb = true) {
  class Body (line 256) | class Body {
    method constructor (line 263) | constructor(x = 0, y = 0, padding = 0) {
    method collides (line 323) | collides(target, result = null, aabb = true) {
    method potentials (line 331) | potentials() {
    method remove (line 344) | remove() {
    method createResult (line 355) | createResult() {
    method createResult (line 362) | static createResult() {
  class Result (line 381) | class Result {
    method constructor (line 385) | constructor() {
  function SAT (line 454) | function SAT(a, b, result = null, aabb = true) {
  function aabbAABB (line 525) | function aabbAABB(a, b) {
  function polygonPolygon (line 554) | function polygonPolygon(a, b, result = null) {
  function polygonCircle (line 602) | function polygonCircle(a, b, result = null, reverse = false) {
  function circleCircle (line 735) | function circleCircle(a, b, result = null) {
  function separatingAxis (line 769) | function separatingAxis(a_coords, b_coords, x, y, result = null) {
  class Polygon (line 870) | class Polygon extends __WEBPACK_IMPORTED_MODULE_0__Body_mjs__["a" /* def...
    method constructor (line 881) | constructor(x = 0, y = 0, points = [], angle = 0, scale_x = 1, scale_y...
    method draw (line 958) | draw(context) {
    method setPoints (line 993) | setPoints(new_points) {
    method _calculateCoords (line 1016) | _calculateCoords() {
    method _calculateNormals (line 1088) | _calculateNormals() {
  class Tank (line 1151) | class Tank {
    method constructor (line 1152) | constructor() {
    method update (line 1203) | update() {
    method handleInput (line 1210) | handleInput() {
    method processGameLogic (line 1217) | processGameLogic() {
    method handleCollisions (line 1246) | handleCollisions() {
    method render (line 1262) | render() {
    method createPlayer (line 1279) | createPlayer(x, y) {
    method createMap (line 1292) | createMap() {
  function random (line 1345) | function random(min, max) {
  class BVH (line 1363) | class BVH {
    method constructor (line 1367) | constructor() {
    method insert (line 1383) | insert(body, updating = false) {
    method remove (line 1506) | remove(body, updating = false) {
    method update (line 1576) | update() {
    method potentials (line 1629) | potentials(body) {
    method draw (line 1702) | draw(context) {
    method drawBVH (line 1715) | drawBVH(context) {
  class BVHBranch (line 1785) | class BVHBranch {
    method constructor (line 1789) | constructor() {
    method getBranch (line 1822) | static getBranch() {
    method releaseBranch (line 1834) | static releaseBranch(branch) {
    method sortBranches (line 1844) | static sortBranches(a, b) {
  class Circle (line 1864) | class Circle extends __WEBPACK_IMPORTED_MODULE_0__Body_mjs__["a" /* defa...
    method constructor (line 1873) | constructor(x = 0, y = 0, radius = 0, scale = 1, padding = 0) {
    method draw (line 1893) | draw(context) {
  class Point (line 1918) | class Point extends __WEBPACK_IMPORTED_MODULE_0__Polygon_mjs__["a" /* de...
    method constructor (line 1925) | constructor(x = 0, y = 0, padding = 0) {
  class Stress (line 1956) | class Stress {
    method constructor (line 1957) | constructor() {
    method update (line 2004) | update(fps) {
    method createShape (line 2066) | createShape(large) {
  function random (line 2100) | function random(min, max) {

FILE: docs/script/inherited-summary.js
  function toggle (line 2) | function toggle(ev) {

FILE: docs/script/inner-link.js
  function adjust (line 7) | function adjust() {

FILE: docs/script/prettify/prettify.js
  function T (line 18) | function T(a){function d(e){var b=e.charCodeAt(0);if(92!==b)return b;var...
  function U (line 22) | function U(a,d){function f(a){var c=a.nodeType;if(1==c){if(!b.test(a.cla...
  function J (line 23) | function J(a,d,f,b,v){f&&(a={h:a,l:1,j:null,m:null,a:f,c:null,i:d,g:null...
  function V (line 23) | function V(a){for(var d=void 0,f=a.firstChild;f;f=f.nextSibling)var b=f....
  function G (line 23) | function G(a,d){function f(a){for(var l=a.i,m=a.h,c=[l,"pln"],p=0,w=a.a....
  function y (line 25) | function y(a){var d=[],f=[];a.tripleQuotedStrings?d.push(["str",/^(?:\'\...
  function L (line 29) | function L(a,d,f){function b(a){var c=a.nodeType;if(1==c&&!A.test(a.clas...
  function t (line 31) | function t(a,d){for(var f=d.length;0<=--f;){var b=d[f];I.hasOwnProperty(...
  function K (line 31) | function K(a,d){a&&I.hasOwnProperty(a)||(a=/^\s*</.test(d)?
  function M (line 32) | function M(a){var d=a.j;try{var f=U(a.h,a.l),b=f.a;a.a=b;a.c=f.c;a.i=0;K...
  function f (line 43) | function f(){for(var b=E.PR_SHOULD_USE_CONTINUATION?c.now()+250:Infinity...

FILE: docs/script/test-summary.js
  function toggle (line 2) | function toggle(ev) {

FILE: src/Collisions.mjs
  class Collisions (line 12) | class Collisions {
    method constructor (line 16) | constructor() {
    method createCircle (line 30) | createCircle(x = 0, y = 0, radius = 0, scale = 1, padding = 0) {
    method createPolygon (line 49) | createPolygon(x = 0, y = 0, points = [[0, 0]], angle = 0, scale_x = 1,...
    method createPoint (line 64) | createPoint(x = 0, y = 0, padding = 0) {
    method createResult (line 75) | createResult() {
    method createResult (line 82) | static createResult() {
    method insert (line 90) | insert(...bodies) {
    method remove (line 102) | remove(...bodies) {
    method update (line 113) | update() {
    method draw (line 123) | draw(context) {
    method drawBVH (line 131) | drawBVH(context) {
    method potentials (line 140) | potentials(body) {
    method collides (line 151) | collides(source, target, result = null, aabb = true) {

FILE: src/modules/BVH.mjs
  class BVH (line 8) | class BVH {
    method constructor (line 12) | constructor() {
    method insert (line 28) | insert(body, updating = false) {
    method remove (line 151) | remove(body, updating = false) {
    method update (line 221) | update() {
    method potentials (line 274) | potentials(body) {
    method draw (line 347) | draw(context) {
    method drawBVH (line 360) | drawBVH(context) {

FILE: src/modules/BVHBranch.mjs
  class BVHBranch (line 11) | class BVHBranch {
    method constructor (line 15) | constructor() {
    method getBranch (line 48) | static getBranch() {
    method releaseBranch (line 60) | static releaseBranch(branch) {
    method sortBranches (line 70) | static sortBranches(a, b) {

FILE: src/modules/Body.mjs
  class Body (line 9) | class Body {
    method constructor (line 16) | constructor(x = 0, y = 0, padding = 0) {
    method collides (line 76) | collides(target, result = null, aabb = true) {
    method potentials (line 84) | potentials() {
    method remove (line 97) | remove() {
    method createResult (line 108) | createResult() {
    method createResult (line 115) | static createResult() {

FILE: src/modules/Circle.mjs
  class Circle (line 7) | class Circle extends Body {
    method constructor (line 16) | constructor(x = 0, y = 0, radius = 0, scale = 1, padding = 0) {
    method draw (line 36) | draw(context) {

FILE: src/modules/Point.mjs
  class Point (line 7) | class Point extends Polygon {
    method constructor (line 14) | constructor(x = 0, y = 0, padding = 0) {

FILE: src/modules/Polygon.mjs
  class Polygon (line 7) | class Polygon extends Body {
    method constructor (line 18) | constructor(x = 0, y = 0, points = [], angle = 0, scale_x = 1, scale_y...
    method draw (line 95) | draw(context) {
    method setPoints (line 130) | setPoints(new_points) {
    method _calculateCoords (line 153) | _calculateCoords() {
    method _calculateNormals (line 225) | _calculateNormals() {

FILE: src/modules/Result.mjs
  class Result (line 7) | class Result {
    method constructor (line 11) | constructor() {

FILE: src/modules/SAT.mjs
  function SAT (line 10) | function SAT(a, b, result = null, aabb = true) {
  function aabbAABB (line 81) | function aabbAABB(a, b) {
  function polygonPolygon (line 110) | function polygonPolygon(a, b, result = null) {
  function polygonCircle (line 158) | function polygonCircle(a, b, result = null, reverse = false) {
  function circleCircle (line 291) | function circleCircle(a, b, result = null) {
  function separatingAxis (line 325) | function separatingAxis(a_coords, b_coords, x, y, result = null) {
Condensed preview — 69 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (8,535K chars).
[
  {
    "path": ".esdoc.json",
    "chars": 346,
    "preview": "{\n\t\"source\"      : \"./src\",\n\t\"destination\" : \"./docs\",\n\t\"includes\"    : [\"\\\\.js$\", \"\\\\.mjs$\"],\n\n\t\"plugins\" : [\n\t\t{\n\t\t\t\"n"
  },
  {
    "path": ".gitignore",
    "chars": 13,
    "preview": "node_modules\n"
  },
  {
    "path": "LICENSE",
    "chars": 1063,
    "preview": "MIT License\n\nCopyright (c) 2017 Sinova\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof "
  },
  {
    "path": "README.md",
    "chars": 17629,
    "preview": "Collisions\n===============================================================================\n\n**Collisions** is a JavaScri"
  },
  {
    "path": "collisions.d.ts",
    "chars": 6917,
    "preview": "/**\r\n * The base class for bodies used to detect collisions\r\n * @export\r\n * @abstract\r\n * @class Body\r\n */\r\nexport abstr"
  },
  {
    "path": "demo/examples/Stress.mjs",
    "chars": 4218,
    "preview": "import Collisions from '../../src/Collisions.mjs';\n\nconst result = Collisions.createResult();\nconst width  = 800;\nconst "
  },
  {
    "path": "demo/examples/Tank.mjs",
    "chars": 5226,
    "preview": "import Collisions from '../../src/Collisions.mjs';\n\nconst width  = 800;\nconst height = 600;\nconst result = Collisions.cr"
  },
  {
    "path": "demo/index.mjs",
    "chars": 277,
    "preview": "import Tank   from './examples/Tank.mjs';\nimport Stress from './examples/Stress.mjs';\n\nlet example;\n\nswitch(window.locat"
  },
  {
    "path": "docs/ast/source/.external-ecmascript.js.json",
    "chars": 66686,
    "preview": "{\n  \"type\": \"File\",\n  \"start\": 0,\n  \"end\": 6058,\n  \"loc\": {\n    \"start\": {\n      \"line\": 1,\n      \"column\": 0\n    },\n   "
  },
  {
    "path": "docs/ast/source/Collisions.mjs.json",
    "chars": 588710,
    "preview": "{\n  \"type\": \"File\",\n  \"start\": 0,\n  \"end\": 4552,\n  \"loc\": {\n    \"start\": {\n      \"line\": 1,\n      \"column\": 0\n    },\n   "
  },
  {
    "path": "docs/ast/source/modules/BVH.mjs.json",
    "chars": 2347522,
    "preview": "{\n  \"type\": \"File\",\n  \"start\": 0,\n  \"end\": 11371,\n  \"loc\": {\n    \"start\": {\n      \"line\": 1,\n      \"column\": 0\n    },\n  "
  },
  {
    "path": "docs/ast/source/modules/BVHBranch.mjs.json",
    "chars": 165478,
    "preview": "{\n  \"type\": \"File\",\n  \"start\": 0,\n  \"end\": 1205,\n  \"loc\": {\n    \"start\": {\n      \"line\": 1,\n      \"column\": 0\n    },\n   "
  },
  {
    "path": "docs/ast/source/modules/Body.mjs.json",
    "chars": 272037,
    "preview": "{\n  \"type\": \"File\",\n  \"start\": 0,\n  \"end\": 2444,\n  \"loc\": {\n    \"start\": {\n      \"line\": 1,\n      \"column\": 0\n    },\n   "
  },
  {
    "path": "docs/ast/source/modules/Circle.mjs.json",
    "chars": 131302,
    "preview": "{\n  \"type\": \"File\",\n  \"start\": 0,\n  \"end\": 1036,\n  \"loc\": {\n    \"start\": {\n      \"line\": 1,\n      \"column\": 0\n    },\n   "
  },
  {
    "path": "docs/ast/source/modules/Point.mjs.json",
    "chars": 68741,
    "preview": "{\n  \"type\": \"File\",\n  \"start\": 0,\n  \"end\": 555,\n  \"loc\": {\n    \"start\": {\n      \"line\": 1,\n      \"column\": 0\n    },\n    "
  },
  {
    "path": "docs/ast/source/modules/Polygon.mjs.json",
    "chars": 1186767,
    "preview": "{\n  \"type\": \"File\",\n  \"start\": 0,\n  \"end\": 5619,\n  \"loc\": {\n    \"start\": {\n      \"line\": 1,\n      \"column\": 0\n    },\n   "
  },
  {
    "path": "docs/ast/source/modules/Result.mjs.json",
    "chars": 86837,
    "preview": "{\n  \"type\": \"File\",\n  \"start\": 0,\n  \"end\": 1158,\n  \"loc\": {\n    \"start\": {\n      \"line\": 1,\n      \"column\": 0\n    },\n   "
  },
  {
    "path": "docs/ast/source/modules/SAT.mjs.json",
    "chars": 2247132,
    "preview": "{\n  \"type\": \"File\",\n  \"start\": 0,\n  \"end\": 11274,\n  \"loc\": {\n    \"start\": {\n      \"line\": 1,\n      \"column\": 0\n    },\n  "
  },
  {
    "path": "docs/class/src/Collisions.mjs~Collisions.html",
    "chars": 44945,
    "preview": "<!DOCTYPE html>\n<html>\n<head>\n  <meta charset=\"utf-8\">\n  <base data-ice=\"baseUrl\" href=\"../../\">\n  <title data-ice=\"titl"
  },
  {
    "path": "docs/class/src/modules/Body.mjs~Body.html",
    "chars": 24491,
    "preview": "<!DOCTYPE html>\n<html>\n<head>\n  <meta charset=\"utf-8\">\n  <base data-ice=\"baseUrl\" href=\"../../../\">\n  <title data-ice=\"t"
  },
  {
    "path": "docs/class/src/modules/Circle.mjs~Circle.html",
    "chars": 21503,
    "preview": "<!DOCTYPE html>\n<html>\n<head>\n  <meta charset=\"utf-8\">\n  <base data-ice=\"baseUrl\" href=\"../../../\">\n  <title data-ice=\"t"
  },
  {
    "path": "docs/class/src/modules/Point.mjs~Point.html",
    "chars": 19194,
    "preview": "<!DOCTYPE html>\n<html>\n<head>\n  <meta charset=\"utf-8\">\n  <base data-ice=\"baseUrl\" href=\"../../../\">\n  <title data-ice=\"t"
  },
  {
    "path": "docs/class/src/modules/Polygon.mjs~Polygon.html",
    "chars": 28358,
    "preview": "<!DOCTYPE html>\n<html>\n<head>\n  <meta charset=\"utf-8\">\n  <base data-ice=\"baseUrl\" href=\"../../../\">\n  <title data-ice=\"t"
  },
  {
    "path": "docs/class/src/modules/Result.mjs~Result.html",
    "chars": 16875,
    "preview": "<!DOCTYPE html>\n<html>\n<head>\n  <meta charset=\"utf-8\">\n  <base data-ice=\"baseUrl\" href=\"../../../\">\n  <title data-ice=\"t"
  },
  {
    "path": "docs/coverage.json",
    "chars": 1121,
    "preview": "{\n  \"coverage\": \"100%\",\n  \"expectCount\": 110,\n  \"actualCount\": 110,\n  \"files\": {\n    \"src/Collisions.mjs\": {\n      \"expe"
  },
  {
    "path": "docs/css/github.css",
    "chars": 1327,
    "preview": "/* github markdown */\n.github-markdown {\n  font-size: 16px;\n}\n\n.github-markdown h1,\n.github-markdown h2,\n.github-markdow"
  },
  {
    "path": "docs/css/identifiers.css",
    "chars": 634,
    "preview": ".identifiers-wrap {\n  display: flex;\n  align-items: flex-start;\n}\n\n.identifier-dir-tree {\n  background: #fff;\n  border: "
  },
  {
    "path": "docs/css/manual.css",
    "chars": 2190,
    "preview": ".github-markdown .manual-toc {\n  padding-left: 0;\n}\n\n.manual-index .manual-cards {\n  display: flex;\n  flex-wrap: wrap;\n}"
  },
  {
    "path": "docs/css/prettify-tomorrow.css",
    "chars": 2026,
    "preview": "/* Tomorrow Theme */\n/* Original theme - https://github.com/chriskempson/tomorrow-theme */\n/* Pretty printing styles. Us"
  },
  {
    "path": "docs/css/search.css",
    "chars": 1328,
    "preview": "/* search box */\n.search-box {\n  position: absolute;\n  top: 10px;\n  right: 50px;\n  padding-right: 8px;\n  padding-bottom:"
  },
  {
    "path": "docs/css/source.css",
    "chars": 950,
    "preview": "table.files-summary {\n  width: 100%;\n  margin: 10px 0;\n  border-spacing: 0;\n  border: 0;\n  border-collapse: collapse;\n  "
  },
  {
    "path": "docs/css/style.css",
    "chars": 9220,
    "preview": "@import url(https://fonts.googleapis.com/css?family=Roboto:400,300,700);\n@import url(https://fonts.googleapis.com/css?fa"
  },
  {
    "path": "docs/css/test.css",
    "chars": 980,
    "preview": "table.test-summary thead {\n  background: #fafafa;\n}\n\ntable.test-summary thead .test-description {\n  width: 50%;\n}\n\ntable"
  },
  {
    "path": "docs/demo/index.html",
    "chars": 236,
    "preview": "<!DOCTYPE html>\n<html>\n  <head>\n    <meta charset=\"UTF-8\">\n    <title>Collisions - Collision detection for circles, poly"
  },
  {
    "path": "docs/demo/index.js",
    "chars": 55579,
    "preview": "/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/**"
  },
  {
    "path": "docs/file/src/Collisions.mjs.html",
    "chars": 7851,
    "preview": "<!DOCTYPE html>\n<html>\n<head>\n  <meta charset=\"utf-8\">\n  <base data-ice=\"baseUrl\" href=\"../../\">\n  <title data-ice=\"titl"
  },
  {
    "path": "docs/file/src/modules/BVH.mjs.html",
    "chars": 14861,
    "preview": "<!DOCTYPE html>\n<html>\n<head>\n  <meta charset=\"utf-8\">\n  <base data-ice=\"baseUrl\" href=\"../../../\">\n  <title data-ice=\"t"
  },
  {
    "path": "docs/file/src/modules/BVHBranch.mjs.html",
    "chars": 4437,
    "preview": "<!DOCTYPE html>\n<html>\n<head>\n  <meta charset=\"utf-8\">\n  <base data-ice=\"baseUrl\" href=\"../../../\">\n  <title data-ice=\"t"
  },
  {
    "path": "docs/file/src/modules/Body.mjs.html",
    "chars": 5699,
    "preview": "<!DOCTYPE html>\n<html>\n<head>\n  <meta charset=\"utf-8\">\n  <base data-ice=\"baseUrl\" href=\"../../../\">\n  <title data-ice=\"t"
  },
  {
    "path": "docs/file/src/modules/Circle.mjs.html",
    "chars": 4274,
    "preview": "<!DOCTYPE html>\n<html>\n<head>\n  <meta charset=\"utf-8\">\n  <base data-ice=\"baseUrl\" href=\"../../../\">\n  <title data-ice=\"t"
  },
  {
    "path": "docs/file/src/modules/Point.mjs.html",
    "chars": 3786,
    "preview": "<!DOCTYPE html>\n<html>\n<head>\n  <meta charset=\"utf-8\">\n  <base data-ice=\"baseUrl\" href=\"../../../\">\n  <title data-ice=\"t"
  },
  {
    "path": "docs/file/src/modules/Polygon.mjs.html",
    "chars": 8921,
    "preview": "<!DOCTYPE html>\n<html>\n<head>\n  <meta charset=\"utf-8\">\n  <base data-ice=\"baseUrl\" href=\"../../../\">\n  <title data-ice=\"t"
  },
  {
    "path": "docs/file/src/modules/Result.mjs.html",
    "chars": 4384,
    "preview": "<!DOCTYPE html>\n<html>\n<head>\n  <meta charset=\"utf-8\">\n  <base data-ice=\"baseUrl\" href=\"../../../\">\n  <title data-ice=\"t"
  },
  {
    "path": "docs/file/src/modules/SAT.mjs.html",
    "chars": 14763,
    "preview": "<!DOCTYPE html>\n<html>\n<head>\n  <meta charset=\"utf-8\">\n  <base data-ice=\"baseUrl\" href=\"../../../\">\n  <title data-ice=\"t"
  },
  {
    "path": "docs/identifiers.html",
    "chars": 7789,
    "preview": "<!DOCTYPE html>\n<html>\n<head>\n  <meta charset=\"utf-8\">\n  <base data-ice=\"baseUrl\">\n  <title data-ice=\"title\">Reference |"
  },
  {
    "path": "docs/index.html",
    "chars": 24089,
    "preview": "<!DOCTYPE html>\n<html>\n<head>\n  <meta charset=\"utf-8\">\n  <base data-ice=\"baseUrl\">\n  <title data-ice=\"title\">Home | coll"
  },
  {
    "path": "docs/index.json",
    "chars": 151581,
    "preview": "[\n  {\n    \"__docId__\": 1,\n    \"kind\": \"external\",\n    \"name\": \"Infinity\",\n    \"externalLink\": \"https://developer.mozilla"
  },
  {
    "path": "docs/script/inherited-summary.js",
    "chars": 815,
    "preview": "(function(){\n  function toggle(ev) {\n    var button = ev.target;\n    var parent = ev.target.parentElement;\n    while(par"
  },
  {
    "path": "docs/script/inner-link.js",
    "chars": 997,
    "preview": "// inner link(#foo) can not correctly scroll, because page has fixed header,\n// so, I manually scroll.\n(function(){\n  va"
  },
  {
    "path": "docs/script/manual.js",
    "chars": 470,
    "preview": "(function(){\n  var matched = location.pathname.match(/\\/(manual\\/.*\\.html)$/);\n  if (!matched) return;\n\n  var currentNam"
  },
  {
    "path": "docs/script/patch-for-local.js",
    "chars": 207,
    "preview": "(function(){\n  if (location.protocol === 'file:') {\n    var elms = document.querySelectorAll('a[href=\"./\"]');\n    for (v"
  },
  {
    "path": "docs/script/prettify/Apache-License-2.0.txt",
    "chars": 11358,
    "preview": "\n                                 Apache License\n                           Version 2.0, January 2004\n                  "
  },
  {
    "path": "docs/script/prettify/prettify.js",
    "chars": 15502,
    "preview": "!function(){/*\n\n Copyright (C) 2006 Google Inc.\n\n Licensed under the Apache License, Version 2.0 (the \"License\");\n you m"
  },
  {
    "path": "docs/script/pretty-print.js",
    "chars": 759,
    "preview": "(function(){\n  prettyPrint();\n  var lines = document.querySelectorAll('.prettyprint.linenums li[class^=\"L\"]');\n  for (va"
  },
  {
    "path": "docs/script/search.js",
    "chars": 3541,
    "preview": "(function(){\n  var searchIndex = window.esdocSearchIndex;\n  var searchBox = document.querySelector('.search-box');\n  var"
  },
  {
    "path": "docs/script/search_index.js",
    "chars": 19816,
    "preview": "window.esdocSearchIndex = [\n  [\n    \"collisions/src/modules/body.mjs~body\",\n    \"class/src/modules/Body.mjs~Body.html\",\n"
  },
  {
    "path": "docs/script/test-summary.js",
    "chars": 1761,
    "preview": "(function(){\n  function toggle(ev) {\n    var button = ev.target;\n    var parent = ev.target.parentElement;\n    while(par"
  },
  {
    "path": "docs/source.html",
    "chars": 8905,
    "preview": "<!DOCTYPE html>\n<html>\n<head>\n  <meta charset=\"utf-8\">\n  <base data-ice=\"baseUrl\" href=\"\">\n  <title data-ice=\"title\">Sou"
  },
  {
    "path": "package.json",
    "chars": 918,
    "preview": "{\n\t\"name\": \"collisions\",\n\t\"version\": \"2.0.14\",\n\t\"description\": \"Collision detection for circles, polygons, and points\",\n"
  },
  {
    "path": "src/Collisions.mjs",
    "chars": 4552,
    "preview": "import BVH     from './modules/BVH.mjs';\nimport Circle  from './modules/Circle.mjs';\nimport Polygon from './modules/Poly"
  },
  {
    "path": "src/modules/BVH.mjs",
    "chars": 11371,
    "preview": "import BVHBranch from './BVHBranch.mjs';\n\n/**\n * A Bounding Volume Hierarchy (BVH) used to find potential collisions qui"
  },
  {
    "path": "src/modules/BVHBranch.mjs",
    "chars": 1205,
    "preview": "/**\n * @private\n */\nconst branch_pool = [];\n\n/**\n * A branch within a BVH\n * @class\n * @private\n */\nexport default class"
  },
  {
    "path": "src/modules/Body.mjs",
    "chars": 2444,
    "preview": "import Result from './Result.mjs';\nimport SAT    from './SAT.mjs';\n\n/**\n * The base class for bodies used to detect coll"
  },
  {
    "path": "src/modules/Circle.mjs",
    "chars": 1036,
    "preview": "import Body from './Body.mjs';\n\n/**\n * A circle used to detect collisions\n * @class\n */\nexport default class Circle exte"
  },
  {
    "path": "src/modules/Point.mjs",
    "chars": 555,
    "preview": "import Polygon from './Polygon.mjs';\n\n/**\n * A point used to detect collisions\n * @class\n */\nexport default class Point "
  },
  {
    "path": "src/modules/Polygon.mjs",
    "chars": 5619,
    "preview": "import Body from './Body.mjs';\n\n/**\n * A polygon used to detect collisions\n * @class\n */\nexport default class Polygon ex"
  },
  {
    "path": "src/modules/Result.mjs",
    "chars": 1158,
    "preview": "/**\n * An object used to collect the detailed results of a collision test\n *\n * > **Note:** It is highly recommended you"
  },
  {
    "path": "src/modules/SAT.mjs",
    "chars": 11274,
    "preview": "/**\n * Determines if two bodies are colliding using the Separating Axis Theorem\n * @private\n * @param {Circle|Polygon|Po"
  },
  {
    "path": "webpack.config.js",
    "chars": 354,
    "preview": "const HtmlWebpackPlugin = require('html-webpack-plugin');\n\nmodule.exports = {\n\tentry : './demo/index.mjs',\n\n\tplugins : ["
  }
]

About this extraction

This page contains the full source code of the Sinova/Collisions GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 69 files (7.4 MB), approximately 1.9M tokens, and a symbol index with 156 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!