Comparing version 0.1.1 to 0.1.2
var Vec2d, _exports; | ||
_exports = typeof exports != 'undefined' && exports !== null | ||
? exports | ||
: window.Chem || (window.Chem = {}); | ||
: window.Chem || (window.Chem = []); | ||
_exports.Vec2d = Vec2d = (function(){ | ||
@@ -9,18 +9,20 @@ Vec2d.displayName = 'Vec2d'; | ||
function Vec2d(x_or_pair, y){ | ||
var __this = this instanceof __ctor ? this : new __ctor; | ||
if (y != null) { | ||
this.x = x_or_pair; | ||
this.y = y; | ||
__this.x = x_or_pair; | ||
__this.y = y; | ||
} else if (x_or_pair != null) { | ||
if (x_or_pair instanceof Array) { | ||
this.x = x_or_pair[0]; | ||
this.y = x_or_pair[1]; | ||
__this.x = x_or_pair[0]; | ||
__this.y = x_or_pair[1]; | ||
} else { | ||
this.x = x_or_pair.x; | ||
this.y = x_or_pair.y; | ||
__this.x = x_or_pair.x; | ||
__this.y = x_or_pair.y; | ||
} | ||
} else { | ||
this.x = 0; | ||
this.y = 0; | ||
__this.x = 0; | ||
__this.y = 0; | ||
} | ||
} | ||
return __this; | ||
} function __ctor(){} __ctor.prototype = prototype; | ||
prototype.offset = function(dx, dy){ | ||
@@ -27,0 +29,0 @@ return new Vec2d(this.x + dx, this.y + dy); |
@@ -5,3 +5,3 @@ { | ||
"author": "Andrew Kelley <superjoe30@gmail.com>", | ||
"version": "0.1.1", | ||
"version": "0.1.2", | ||
"licenses": [{ | ||
@@ -8,0 +8,0 @@ "type": "MIT", |
@@ -10,2 +10,3 @@ var Vec2d = require("chem").Vec2d; | ||
function v (x, y) { return {x: x, y: y}; } | ||
exports.spritesheet = { | ||
@@ -12,0 +13,0 @@ defaults: { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
93331
683