changeset 52:4f998eb1700a

Add some comments.
author Matti Hamalainen <ccr@tnsp.org>
date Wed, 04 Jul 2018 19:53:04 +0300
parents f9da5fe9a891
children c551029a7086
files multipaint.pde
diffstat 1 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/multipaint.pde	Wed Jul 04 18:55:47 2018 +0300
+++ b/multipaint.pde	Wed Jul 04 19:53:04 2018 +0300
@@ -258,6 +258,12 @@
 }
 
 
+//
+// Basically the same as Processing loadBytes(), but it seems
+// that Processing.JS's loadBytes() is broken at least in v1.4.8
+// and does not return byte-clean data. So roll a replacement of
+// our own design. --ccr
+//
 byte[] mpLoadBinaryFile(String url)
 {
     var xhr = new XMLHttpRequest();
@@ -281,6 +287,10 @@
 }
 
 
+//
+// "Save" a byte array to file. Basically creates a blob URI
+// and dumps it in the DOM, giving user a download.
+//
 void mpSaveBinaryFile(String name, byte[] data)
 {
     var blob = new Blob([new Uint8Array(data)], {type: "application/octet-stream"}),