decentral1se
4 years ago
No known key found for this signature in database
GPG Key ID: 92DAD76BD9567B8A
1 changed files with
1 additions and
21 deletions
-
voicegardens/static/voicegardens.js
|
|
@ -15,7 +15,7 @@ var _canvas; |
|
|
|
var offlineRecordingDuration = 2000; |
|
|
|
|
|
|
|
// Offline limits for hardware considerations
|
|
|
|
var offlineLimits = 4; |
|
|
|
var offlineLimits = 5; |
|
|
|
|
|
|
|
// URL which exposes the archive saving API end-point
|
|
|
|
var archiveUrl = window.location + "add-to-archive"; |
|
|
@ -92,7 +92,6 @@ function gardenOfflineLimits() { |
|
|
|
|
|
|
|
for (let i = 0; i < shapes.length; i++) { |
|
|
|
let shape = shapes[i]; |
|
|
|
shape.hide(); |
|
|
|
delete shape; |
|
|
|
} |
|
|
|
|
|
|
@ -307,9 +306,6 @@ class GeneratedShape { |
|
|
|
this.nextTick = random(1000, 9000); |
|
|
|
this.tickTimer = 0; |
|
|
|
|
|
|
|
// Should remain hidden
|
|
|
|
this.hidden = false; |
|
|
|
|
|
|
|
this.initialise(); |
|
|
|
} |
|
|
|
|
|
|
@ -379,26 +375,10 @@ class GeneratedShape { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
hide() { |
|
|
|
/** |
|
|
|
* Hide the shape |
|
|
|
**/ |
|
|
|
if (!this.hidden) { |
|
|
|
this.hidden = true; |
|
|
|
} |
|
|
|
|
|
|
|
while (this.colour._getAlpha() > 0) { |
|
|
|
let currentAlpha = this.colour._getAlpha(); |
|
|
|
this.colour.setAlpha(currentAlpha - random(0, 3)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
docolour() { |
|
|
|
/** |
|
|
|
* Draw colour and fade-in shape. |
|
|
|
**/ |
|
|
|
if (this.hidden === true) return; |
|
|
|
|
|
|
|
if (this.opacity != 256) { |
|
|
|
if (this.opacity < 256) { |
|
|
|
// shape should fade in, so increment alpha value
|
|
|
|