Updated to latest Node
This commit is contained in:
parent
a903bd6aa3
commit
38744c399c
21
package.json
21
package.json
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "momentumengine",
|
"name": "momentumengine",
|
||||||
"version": "0.7.0",
|
"version": "0.8.0",
|
||||||
"description": "An ES6 game and animation engine.",
|
"description": "An ES6 game and animation engine.",
|
||||||
"main": "src/es6.js",
|
"main": "src/es6.js",
|
||||||
"repository": {
|
"repository": {
|
||||||
@ -15,18 +15,17 @@
|
|||||||
"author": "Nathan Kunicki <me@nathankunicki.com>",
|
"author": "Nathan Kunicki <me@nathankunicki.com>",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": "^4.2.3"
|
"node": "^7.6.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"babel-core": "6.7.4",
|
"babel-core": "6.23.1",
|
||||||
"babel-loader": "6.2.4",
|
"babel-loader": "6.3.2",
|
||||||
"babel-plugin-transform-runtime": "6.6.0",
|
"babel-plugin-transform-runtime": "6.23.0",
|
||||||
"babel-preset-es2015": "6.6.0",
|
"babel-preset-es2015": "6.22.0",
|
||||||
"babel-preset-stage-0": "6.5.0",
|
"babel-preset-stage-0": "6.22.0",
|
||||||
"babel-runtime": "6.6.1",
|
|
||||||
"gulp": "3.9.1",
|
"gulp": "3.9.1",
|
||||||
"gulp-jsdoc3": "0.2.1",
|
"gulp-jsdoc3": "1.0.1",
|
||||||
"gulp-util": "3.0.7",
|
"gulp-util": "3.0.8",
|
||||||
"webpack": "1.12.14"
|
"webpack": "2.2.1"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -47,7 +47,13 @@ class Entity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
set left (val) {
|
set left (val) {
|
||||||
return this.pos.x = val;
|
let res = (this.pos.x = val);
|
||||||
|
if (this._parent) {
|
||||||
|
this._relativePos.x = this.pos.x + this._parent.relativeLeft;
|
||||||
|
} else {
|
||||||
|
this._relativePos.x = this.pos.x;
|
||||||
|
}
|
||||||
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -59,7 +65,13 @@ class Entity {
|
|||||||
}
|
}
|
||||||
|
|
||||||
set top (val) {
|
set top (val) {
|
||||||
return this.pos.y = val;
|
let res = (this.pos.y = val);
|
||||||
|
if (this._parent) {
|
||||||
|
this._relativePos.y = this.pos.y + this._parent.relativeTop;
|
||||||
|
} else {
|
||||||
|
this._relativePos.y = this.pos.y;
|
||||||
|
}
|
||||||
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -33,10 +33,10 @@ class Path extends Entity {
|
|||||||
ctx.strokeStyle = this.color.toString();
|
ctx.strokeStyle = this.color.toString();
|
||||||
|
|
||||||
ctx.beginPath();
|
ctx.beginPath();
|
||||||
ctx.moveTo(this.relativeLeft, this.relativeTop);
|
ctx.moveTo(this._scaleForLeft(this.relativeLeft), this._scaleForTop(this.relativeTop));
|
||||||
|
|
||||||
for (let coord in this.coords) {
|
for (let coord in this.coords) {
|
||||||
ctx.lineTo(this.relativeLeft + this.coords[coord].x, this.relativeTop + this.coords[coord].y);
|
ctx.lineTo(this._scaleForWidth(this.relativeLeft + this.coords[coord].x), this._scaleForHeight(this.relativeTop + this.coords[coord].y));
|
||||||
}
|
}
|
||||||
|
|
||||||
//ctx.closePath();
|
//ctx.closePath();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user