Comparing version 1.1.0 to 1.2.0
@@ -86,5 +86,9 @@ const Random = require('./random.js'); | ||
this.clear(); | ||
this.updateBubbles(); | ||
this.updateHotspots(); | ||
this.drawBubbles(); | ||
this.beforeDraw && this.beforeDraw(this.ctx); | ||
this.draw(); | ||
this.afterDraw && this.afterDraw(this.ctx); | ||
}.bind(this)); | ||
@@ -97,3 +101,3 @@ }; | ||
Carbonator.prototype.drawBubbles = function () { | ||
Carbonator.prototype.draw = function () { | ||
this.ctx.fillStyle = this.bubbleColor; | ||
@@ -100,0 +104,0 @@ this.ctx.globalAlpha = this.bubbleOpacity; |
{ | ||
"name": "carbonator", | ||
"version": "1.1.0", | ||
"version": "1.2.0", | ||
"description": "Carbonate your web pages.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -49,2 +49,4 @@ # Carbonator | ||
| `hotspotRespawnRate` | chance per frame that hotspot will be deleted and regenerated at a different location | `1 / (24 * 10)` (about every 10 seconds) | | ||
| `beforeDraw` | `function` to call before drawing each frame (passed `CanvasRenderingContext2D`) | `undefined` | | ||
| `afterDraw` | `function` to call after drawing each frame (passed `CanvasRenderingContext2D`) | `undefined` | | ||
@@ -51,0 +53,0 @@ ### You Might Not Need JQuery |
10686
205
63