Closed LaughingSun closed 9 years ago
Yuck, good catch! Feel free to submit a PR, otherwise I'll fix soon :)
yeah did a request, it is on line 109, not 112 on the current repo.
On Mon, Jan 12, 2015 at 10:06 AM, jdan notifications@github.com wrote:
Yuck, good catch! Feel free to submit a PR, otherwise I'll fix soon :)
— Reply to this email directly or view it on GitHub https://github.com/jdan/isomer/issues/56#issuecomment-69523395.
Erich Horn Denpasar, Bali, Indonesia (62) 82140467070
In the file js/isomer.js on line 112, you are using a global/window/self scope for color. I pretty sure you meant local. Because of that it fails in strict mode, throwing that color is not defined.
Current code:
var brightness = Vector.dotProduct(normal, this.lightAngle); color = baseColor.lighten(brightness * this.colorDifference, this.lightColor);
Proposed fixes:
1) precede with 'var ', fe: var brightness = Vector.dotProduct(normal, this.lightAngle); var color = baseColor.lighten(brightness * this.colorDifference, this.lightColor);
OR
2) precede with comma, fe: var brightness = Vector.dotProduct(normal, this.lightAngle), color = baseColor.lighten(brightness * this.colorDifference, this.lightColor);