diff options
| author | Ben Beltran <ben@nsovocal.com> | 2017-03-30 00:57:53 -0600 |
|---|---|---|
| committer | Ben Beltran <ben@nsovocal.com> | 2017-03-30 00:57:53 -0600 |
| commit | 0bfb401c1ad74d22ede11c1dbdaf4df6edaee73f (patch) | |
| tree | ff0bff99a5ea3b6e0a9b670ff0dd74e5c30258b9 /js/lib | |
| parent | 6acd3480b9ece43ea50142abe0a0ca410e32bd5e (diff) | |
| parent | 31d618746e16df973fc6f752b1a92707bd617f84 (diff) | |
Merge branch 'hotfix/1.1.2'
Diffstat (limited to 'js/lib')
| -rw-r--r-- | js/lib/heart_renderer.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/js/lib/heart_renderer.js b/js/lib/heart_renderer.js index 19ff137..4680fb9 100644 --- a/js/lib/heart_renderer.js +++ b/js/lib/heart_renderer.js @@ -77,7 +77,6 @@ this._following = null; // The status of mouse follow. this._center = null; // The actual center this._targetHeartSize = this.heartSize; - this._ this._targetCenter = { x: 0, y: 0 @@ -247,8 +246,6 @@ const green = this._updateColorComponent('green', delta); const blue = this._updateColorComponent('blue', delta); - console.log(red, green, blue); - this._currentColor.red = red; this._currentColor.green = green; this._currentColor.blue = blue; @@ -256,6 +253,7 @@ // Updates a single color component. _updateColorComponent(component, delta) { + let color = Math.round(this._currentColor[component] + (delta * this._colorSpeed[component] * this._colorDirection[component])); if (color >= kColorIteratorLimit) { this._colorDirection[component] = -1; @@ -369,11 +367,13 @@ // Apply a class to show the cursor. _showCursor() { + this.canvas.classList.add('mouse-moving'); } // Remove class to hide the cursor. _hideCursor() { + this.canvas.classList.remove('mouse-moving'); } }; |