Throughout the sketches both @haschdl and @regisfrias make extensive use of the save() and/or saveFrame() functions.
In HTML5, one can simply right-click on a canvas and choose "Save image".
|
if (saveFile) { |
|
const fileName = |
|
'saved-png/' + |
|
year() + |
|
'-' + |
|
month() + |
|
'-' + |
|
day() + |
|
'-' + |
|
hour() + |
|
'-' + |
|
minute() + |
|
'-' + |
|
second() + |
|
'-telhado.png'; |
|
save(fileName); |
|
saveFile = false; |
|
} |
I suggest we remove the "save" operations from sketches, unless it has a aesthetic reason. This would improve legibility of the code and reduce lines of code considerably.
Throughout the sketches both @haschdl and @regisfrias make extensive use of the
save()and/orsaveFrame()functions.In HTML5, one can simply right-click on a canvas and choose "Save image".
dear-gen-code/helsinki/Week-07/sketch/sketch.js
Lines 105 to 122 in 0ef3a46
I suggest we remove the "save" operations from sketches, unless it has a aesthetic reason. This would improve legibility of the code and reduce lines of code considerably.