Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

collider2d

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

collider2d - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0

14

build/geometry/polygon.d.ts

@@ -28,2 +28,10 @@ import Vector from './vector';

/**
* An Array of the points of this polygon as numbers instead of Vectors.
*
* @private
*
* @property {Array<number>}
*/
private _pointsGeneric;
/**
* The angle of this polygon.

@@ -96,2 +104,8 @@ *

/**
* Returns the points of this polygon as numbers instead of Vectors.
*
* @returns {Array<number>}
*/
get pointsGeneric(): Array<number>;
/**
* Returns the calculated points of this polygon.

@@ -98,0 +112,0 @@ *

27

build/geometry/polygon.js

@@ -46,2 +46,10 @@ 'use strict';

/**
* An Array of the points of this polygon as numbers instead of Vectors.
*
* @private
*
* @property {Array<number>}
*/
/**
* The angle of this polygon.

@@ -103,2 +111,4 @@ *

_defineProperty(this, "_pointsGeneric", []);
_defineProperty(this, "_angle", 0);

@@ -151,4 +161,6 @@

var p1 = points[i];
var p2 = i < points.length - 1 ? points[i + 1] : points[0];
var p2 = i < points.length - 1 ? points[i + 1] : points[0]; // Push the points to the generic points Array.
this._pointsGeneric.push(points[i].x, points[i].y);
if (p1 !== p2 && p1.x === p2.x && p1.y === p2.y) {

@@ -408,2 +420,13 @@ points.splice(i, 1);

/**
* Returns the points of this polygon as numbers instead of Vectors.
*
* @returns {Array<number>}
*/
}, {
key: "pointsGeneric",
get: function get() {
return this._pointsGeneric;
}
/**
* Returns the calculated points of this polygon.

@@ -469,2 +492,2 @@ *

exports["default"] = Polygon;
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9nZW9tZXRyeS9wb2x5Z29uLnRzIl0sIm5hbWVzIjpbIlBvbHlnb24iLCJwb3NpdGlvbiIsIlZlY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QuXHJcbiAgICovXHJcbiAgZ2V0Q2VudHJvaWQoKTogVmVjdG9yIHtcclxuICAgIGNvbnN0IHBvaW50czogQXJyYXk8VmVjdG9yPiA9IHRoaXMuY2FsY1BvaW50cztcclxuICAgIGNvbnN0IGxlbjogbnVtYmVyID0gcG9pbnRzLmxlbmd0aDtcclxuXHJcbiAgICBsZXQgY3g6IG51bWJlciA9IDA7XHJcbiAgICBsZXQgY3k6IG51bWJlciA9IDA7XHJcbiAgICBsZXQgYXI6IG51bWJlciA9IDA7XHJcblxyXG4gICAgZm9yICh2YXIgaTogbnVtYmVyID0gMDsgaSA8IGxlbjsgaSsrKSB7XHJcbiAgICAgIGNvbnN0IHAxOiBWZWN0b3IgPSBwb2ludHNbaV07XHJcbiAgICAgIGNvbnN0IHAyOiBWZWN0b3IgPSBpID09PSBsZW4gLSAxID8gcG9pbnRzWzBdIDogcG9pbnRzW2kgKyAxXTsgLy8gTG9vcCBhcm91bmQgaWYgbGFzdCBwb2ludFxyXG5cclxuICAgICAgY29uc3QgYTogbnVtYmVyID0gcDFbXCJ4XCJdICogcDJbXCJ5XCJdIC0gcDJbXCJ4XCJdICogcDFbXCJ5XCJdO1xyXG5cclxuICAgICAgY3ggKz0gKHAxW1wieFwiXSArIHAyW1wieFwiXSkgKiBhO1xyXG4gICAgICBjeSArPSAocDFbXCJ5XCJdICsgcDJbXCJ5XCJdKSAqIGE7XHJcbiAgICAgIGFyICs9IGE7XHJcbiAgICB9XHJcblxyXG4gICAgYXIgPSBhciAqIDM7IC8vIHdlIHdhbnQgMSAvIDYgdGhlIGFyZWEgYW5kIHdlIGN1cnJlbnRseSBoYXZlIDIqYXJlYVxyXG4gICAgY3ggPSBjeCAvIGFyO1xyXG4gICAgY3kgPSBjeSAvIGFyO1xyXG5cclxuICAgIHJldHVybiBuZXcgVmVjdG9yKGN4LCBjeSk7XHJcbiAgfVxyXG59Il19
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJz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yA9IFtdO1xyXG5cclxuICAgICAgLy8gQWxsb2NhdGUgdGhlIHZlY3RvciBhcnJheXMgZm9yIHRoZSBjYWxjdWxhdGVkIHByb3BlcnRpZXNcclxuICAgICAgZm9yIChpID0gMDsgaSA8IHBvaW50cy5sZW5ndGg7IGkrKykge1xyXG4gICAgICAgIC8vIFJlbW92ZSBjb25zZWN1dGl2ZSBkdXBsaWNhdGUgcG9pbnRzXHJcbiAgICAgICAgY29uc3QgcDE6IFZlY3RvciA9IHBvaW50c1tpXTtcclxuICAgICAgICBjb25zdCBwMjogVmVjdG9yID0gaSA8IHBvaW50cy5sZW5ndGggLSAxID8gcG9pbnRzW2kgKyAxXSA6IHBvaW50c1swXTtcclxuXHJcbiAgICAgICAgLy8gUHVzaCB0aGUgcG9pbnRzIHRvIHRoZSBnZW5lcmljIHBvaW50cyBBcnJheS5cclxuICAgICAgICB0aGlzLl9wb2ludHNHZW5lcmljLnB1c2gocG9pbnRzW2ldLngsIHBvaW50c1tpXS55KTtcclxuXHJcbiAgICAgICAgaWYgKHAxICE9PSBwMiAmJiBwMS54ID09PSBwMi54ICYmIHAxLnkgPT09IHAyLnkpIHtcclxuICAgICAgICAgIHBvaW50cy5zcGxpY2UoaSwgMSk7XHJcbiAgICAgICAgICBpIC09IDE7XHJcbiAgICAgICAgICBjb250aW51ZTtcclxuICAgICAgICB9XHJcblxyXG4gICAgICAgIGNhbGNQb2ludHMucHVzaChuZXcgVmVjdG9yKCkpO1xyXG4gICAgICAgIGVkZ2VzLnB1c2gobmV3IFZlY3RvcigpKTtcclxuICAgICAgICBub3JtYWxzLnB1c2gobmV3IFZlY3RvcigpKTtcclxuICAgICAgfVxyXG4gICAgfVxyXG5cclxuICAgIHRoaXMuX3BvaW50cyA9IHBvaW50cztcclxuXHJcbiAgICB0aGlzLl9yZWNhbGMoKTtcclxuXHJcbiAgICByZXR1cm4gdGhpcztcclxuICB9XHJcblxyXG4gIC8qKlxyXG4gICAqIFNldCB0aGUgY3VycmVudC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E] Added `genericPoints` Array to Polygon which is an Array of all of the points in the Polygon as just numbers instead of Vectors. This is useful for creating triangles from Polygons.
## 1.0.1 / 2020-09-29
- [HOTFIX] Fixed the location of the typings.
## 1.0.0 / 2020-09-28

@@ -2,0 +8,0 @@ - [FEATURE] Made the Vector, Box, Circle, and Polygon classes into their own individual exports instead of having to be created through the Collider2d class.

@@ -390,2 +390,10 @@ function _classCallCheck(instance, Constructor) {

/**
* An Array of the points of this polygon as numbers instead of Vectors.
*
* @private
*
* @property {Array<number>}
*/
/**
* The angle of this polygon.

@@ -447,2 +455,4 @@ *

_defineProperty(this, "_pointsGeneric", []);
_defineProperty(this, "_angle", 0);

@@ -495,4 +505,6 @@

var p1 = points[i];
var p2 = i < points.length - 1 ? points[i + 1] : points[0];
var p2 = i < points.length - 1 ? points[i + 1] : points[0]; // Push the points to the generic points Array.
this._pointsGeneric.push(points[i].x, points[i].y);
if (p1 !== p2 && p1.x === p2.x && p1.y === p2.y) {

@@ -752,2 +764,13 @@ points.splice(i, 1);

/**
* Returns the points of this polygon as numbers instead of Vectors.
*
* @returns {Array<number>}
*/
}, {
key: "pointsGeneric",
get: function get() {
return this._pointsGeneric;
}
/**
* Returns the calculated points of this polygon.

@@ -754,0 +777,0 @@ *

9

package.json
{
"name": "collider2d",
"version": "1.0.0",
"version": "1.1.0",
"description": "A 2D collision checker for modern JavaScript games.",
"main": "index.js",
"main": "build/index.js",
"module": "collider2d.js",

@@ -18,4 +18,3 @@ "scripts": {

"bundle:watch": "rollup -c --watch",
"test": "mocha",
"prepare": "npm run build && npm run bundle"
"test": "mocha"
},

@@ -37,3 +36,3 @@ "repository": {

],
"typings": "lib/index.d.ts",
"typings": "build/index.d.ts",
"author": "Robert Corponoi",

@@ -40,0 +39,0 @@ "license": "MIT",

@@ -19,5 +19,2 @@ 'use strict'

output: [{
file: pkg.main,
format: 'cjs',
}, {
file: pkg.module,

@@ -24,0 +21,0 @@ format: 'esm',

@@ -33,2 +33,11 @@ 'use strict'

/**
* An Array of the points of this polygon as numbers instead of Vectors.
*
* @private
*
* @property {Array<number>}
*/
private _pointsGeneric: Array<number> = []
/**
* The angle of this polygon.

@@ -134,2 +143,9 @@ *

/**
* Returns the points of this polygon as numbers instead of Vectors.
*
* @returns {Array<number>}
*/
get pointsGeneric(): Array<number> { return this._pointsGeneric; }
/**
* Returns the calculated points of this polygon.

@@ -197,2 +213,5 @@ *

// Push the points to the generic points Array.
this._pointsGeneric.push(points[i].x, points[i].y);
if (p1 !== p2 && p1.x === p2.x && p1.y === p2.y) {

@@ -199,0 +218,0 @@ points.splice(i, 1);

'use strict'
const chai = require('chai');
const { Vector, Box, Circle, Polygon, Collider2d } = require('../index');
const { Vector, Box, Circle, Polygon, Collider2d } = require('../build/index.js');

@@ -27,29 +27,44 @@ const collider2d = new Collider2d();

describe("Polygon Centroids", () => {
it("should calculate the correct value for a square", () => {
const polygon = new Polygon(
new Vector(0, 0), [
new Vector(0, 0),
new Vector(40, 0),
new Vector(40, 40),
new Vector(0, 40)
]);
describe("Generic Points", () => {
it("should return the generic points of the Polygon", () => {
const polygon = new Polygon(new Vector(100, 100), [
new Vector(0, 0),
new Vector(200, 0),
new Vector(100, 200),
new Vector(0, 200),
]);
const c = polygon.getCentroid();
chai.expect(c.x).to.equal(20);
chai.expect(c.y).to.equal(20);
chai.expect(polygon.pointsGeneric).to.deep.equal([0, 0, 200, 0, 100, 200, 0, 200]);
});
});
it("should calculate the correct value for a triangle", () => {
const polygon = new Polygon(
new Vector(0, 0), [
new Vector(0, 0),
new Vector(100, 0),
new Vector(50, 99)
]);
describe("Centroids", () => {
it("should calculate the correct value for a square", () => {
const polygon = new Polygon(
new Vector(0, 0), [
new Vector(0, 0),
new Vector(40, 0),
new Vector(40, 40),
new Vector(0, 40)
]);
const c = polygon.getCentroid();
const c = polygon.getCentroid();
chai.expect(c.x).to.equal(50);
chai.expect(c.y).to.equal(33);
chai.expect(c.x).to.equal(20);
chai.expect(c.y).to.equal(20);
});
it("should calculate the correct value for a triangle", () => {
const polygon = new Polygon(
new Vector(0, 0), [
new Vector(0, 0),
new Vector(100, 0),
new Vector(50, 99)
]);
const c = polygon.getCentroid();
chai.expect(c.x).to.equal(50);
chai.expect(c.y).to.equal(33);
});
});

@@ -56,0 +71,0 @@ });

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc