[−][src]Static p5_sys::global::loadBytes
pub static loadBytes: LoadBytesInternalType
This method is suitable for fetching files up to size of 64MB.
Examples
let data;
function preload() {
data = loadBytes('assets/mammals.xml');
}
function setup() {
for (let i = 0; i < 5; i++) {
console.log(data.bytes[i].toString(16));
}
}
Parameters
file
name of the file or URL to load
callback?
function to be executed after loadBytes()
completes
errorCallback?
function to be executed if there
is an error