Browse Source

Remove experimental cruft

offline
decentral1se 4 years ago
parent
commit
1dd4c6ba9d
No known key found for this signature in database GPG Key ID: 92DAD76BD9567B8A
  1. 22
      voicegardens/static/voicegardens.js

22
voicegardens/static/voicegardens.js

@ -15,7 +15,7 @@ var _canvas;
var offlineRecordingDuration = 2000; var offlineRecordingDuration = 2000;
// Offline limits for hardware considerations // Offline limits for hardware considerations
var offlineLimits = 4; var offlineLimits = 5;
// URL which exposes the archive saving API end-point // URL which exposes the archive saving API end-point
var archiveUrl = window.location + "add-to-archive"; var archiveUrl = window.location + "add-to-archive";
@ -92,7 +92,6 @@ function gardenOfflineLimits() {
for (let i = 0; i < shapes.length; i++) { for (let i = 0; i < shapes.length; i++) {
let shape = shapes[i]; let shape = shapes[i];
shape.hide();
delete shape; delete shape;
} }
@ -307,9 +306,6 @@ class GeneratedShape {
this.nextTick = random(1000, 9000); this.nextTick = random(1000, 9000);
this.tickTimer = 0; this.tickTimer = 0;
// Should remain hidden
this.hidden = false;
this.initialise(); 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() { docolour() {
/** /**
* Draw colour and fade-in shape. * Draw colour and fade-in shape.
**/ **/
if (this.hidden === true) return;
if (this.opacity != 256) { if (this.opacity != 256) {
if (this.opacity < 256) { if (this.opacity < 256) {
// shape should fade in, so increment alpha value // shape should fade in, so increment alpha value

Loading…
Cancel
Save