Merge pull request #157 from LLK/greenkeeper/eslint-config-scratch-4.0.0
Update eslint-config-scratch to the latest version 🚀
This commit is contained in:
@@ -32,7 +32,7 @@
|
||||
"copy-webpack-plugin": "^4.0.1",
|
||||
"docdash": "^0.4.0",
|
||||
"eslint": "^4.6.1",
|
||||
"eslint-config-scratch": "^3.1.0",
|
||||
"eslint-config-scratch": "^4.0.0",
|
||||
"gh-pages": "^0.12.0",
|
||||
"hull.js": "0.2.10",
|
||||
"jsdoc": "^3.5.3",
|
||||
|
||||
@@ -201,7 +201,7 @@ class Drawable {
|
||||
twgl.m4.rotateZ(modelMatrix, rotation, modelMatrix);
|
||||
|
||||
// Adjust rotation center relative to the skin.
|
||||
var rotationAdjusted = twgl.v3.subtract(this.skin.rotationCenter, twgl.v3.divScalar(this.skin.size, 2));
|
||||
let rotationAdjusted = twgl.v3.subtract(this.skin.rotationCenter, twgl.v3.divScalar(this.skin.size, 2));
|
||||
rotationAdjusted = twgl.v3.multiply(rotationAdjusted, this.scale);
|
||||
rotationAdjusted = twgl.v3.divScalar(rotationAdjusted, 100);
|
||||
rotationAdjusted[1] *= -1; // Y flipped to Scratch coordinate.
|
||||
|
||||
@@ -750,11 +750,12 @@ class RenderWebGL extends EventEmitter {
|
||||
const data = new Uint8Array(Math.floor(bounds.width * bounds.height * 4));
|
||||
gl.readPixels(0, 0, bounds.width, bounds.height, gl.RGBA, gl.UNSIGNED_BYTE, data);
|
||||
|
||||
const pixelBase = Math.floor(4 * ((pickY * bounds.width) + pickX));
|
||||
const color = {
|
||||
r: data[Math.floor(4 * (pickY * bounds.width + pickX))],
|
||||
g: data[Math.floor(4 * (pickY * bounds.width + pickX)) + 1],
|
||||
b: data[Math.floor(4 * (pickY * bounds.width + pickX)) + 2],
|
||||
a: data[Math.floor(4 * (pickY * bounds.width + pickX)) + 3]
|
||||
r: data[pixelBase],
|
||||
g: data[pixelBase + 1],
|
||||
b: data[pixelBase + 2],
|
||||
a: data[pixelBase + 3]
|
||||
};
|
||||
|
||||
if (this._debugCanvas) {
|
||||
|
||||
Reference in New Issue
Block a user