Skip to content

Commit 9e54be0

Browse files
committed
tweaking saveData, p5.Table and p5.Image saving examples
1 parent c3a95db commit 9e54be0

File tree

5 files changed

+5
-5
lines changed

5 files changed

+5
-5
lines changed

examples/p5.Image/saving-images.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ function setup() {
88

99
setTimeout(function(){
1010
console.log("Save image")
11-
img.save("png");
11+
save(img, "unicorn.png");
1212
}, 1000);
1313

1414
});

examples/p5.Table/saveTable/sketch.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ function setup() {
1919
newRow.setString('name', 'Mosquito');
2020
newRow.setString('type', 'Insect');
2121

22-
saveTable(table, 'animals.bin', 'bin');
22+
save(table, 'animals.csv');
2323
}
2424

2525
// Sketch saves the following to a file called 'animals.csv':

examples/saveData/saveJSONArray/sketch.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ function setup() {
1919
values.push(animal); // add an animal object to the array
2020
}
2121

22-
saveJSONArray(values, 'animals.json');
22+
save(values, 'animals.json');
2323
}
2424

2525
// Sketch saves the following to a file called "animals.json":

examples/saveData/saveJSONObject/sketch.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ function setup() {
88
json.species = 'Panthera leo';
99
json.name = 'Lion';
1010

11-
saveJSONObject(json, 'lion.json');
11+
save(json, 'lion.json');
1212
}
1313

1414
// Sketch saves the following to a file called "lion.json":

examples/saveData/saveStrings/sketch.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ function setup() {
66
var list = split(words, ' ');
77

88
// Writes the strings to a file, each on a separate line
9-
saveStrings(list, 'nouns.txt');
9+
save(list, 'nouns.txt');
1010
}

0 commit comments

Comments
 (0)