Skip to content

Commit 0f25960

Browse files
author
Robert Pataki
committed
"Fizzy" bugfix
The shapes had a bit of a "fizziness" around the edges caused by improper translation. The bug is now fixed.
1 parent ebbc4be commit 0f25960

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

js/heartcode-canvasloader-min.js

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/heartcode-canvasloader.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -431,7 +431,7 @@
431431
setAttr(this.cCan, {width: di, height: di});
432432
while (i < de) {
433433
bitMod = i <= animBits ? 1 - ((1 - minBitMod) / animBits * i) : bitMod = minBitMod;
434-
ang = 360 - 360 / de * i;
434+
ang = 270 - 360 / de * i;
435435
rads = ang / 180 * Math.PI;
436436
c.fillStyle = "rgba(" + this.cRGB.r + "," + this.cRGB.g + "," + this.cRGB.b + "," + bitMod.toString() + ")";
437437
switch (this.shape) {
@@ -538,7 +538,7 @@
538538
++i;
539539
}
540540
}
541-
this.tick();
541+
this.tick(true);
542542
};
543543
/**
544544
* Cleans the canvas
@@ -582,9 +582,9 @@
582582
* @method tick
583583
* @protected
584584
*/
585-
p.tick = function () {
585+
p.tick = function (init) {
586586
var c = this.con, di = this.diameter;
587-
if (typeof(timer) !== "number") { this.activeId += 360 / this.density * this.speed; }
587+
if (!init) { this.activeId += 360 / this.density * this.speed; }
588588
if (engine === engines[0]) {
589589
c.clearRect(0, 0, di, di);
590590
transCon(c, di * 0.5, di * 0.5, this.activeId / 180 * Math.PI);

0 commit comments

Comments
 (0)