Skip to content

Commit 7f4a991

Browse files
committed
Fix p5.Vector not stored as n-d vector in local storage
1 parent f8e1c32 commit 7f4a991

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/data/local_storage.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ function storage(p5, fn){
147147
value = value.toString();
148148
} else if (value instanceof p5.Vector) {
149149
type = 'p5.Vector';
150-
const coord = [value.x, value.y, value.z];
150+
const coord = value.values;
151151
value = coord;
152152
}
153153
value = JSON.stringify(value);

0 commit comments

Comments
 (0)