2016-08-12 06:11:31 +02:00
|
|
|
var canvasLocation ='';
|
|
|
|
|
2016-08-16 00:06:09 +02:00
|
|
|
funcNames = allData["classitems"].map(function(x){
|
|
|
|
if(x["overloads"]) {
|
|
|
|
tempParam = x["overloads"][0]["params"];
|
|
|
|
} else {
|
|
|
|
tempParam = x["params"];
|
|
|
|
}
|
2016-11-09 19:16:14 +01:00
|
|
|
return {
|
2016-08-12 06:11:31 +02:00
|
|
|
name: x["name"],
|
2016-08-16 00:06:09 +02:00
|
|
|
params: tempParam,
|
2016-08-12 06:11:31 +02:00
|
|
|
class: x["class"],
|
|
|
|
module: x["module"],
|
|
|
|
submodule: x["submodule"]
|
|
|
|
};
|
|
|
|
});
|
2016-11-09 19:16:14 +01:00
|
|
|
|
2016-08-12 06:11:31 +02:00
|
|
|
funcNames = funcNames.filter(function(x) {
|
2016-08-12 20:19:23 +02:00
|
|
|
var className = x["class"];
|
2016-08-12 06:11:31 +02:00
|
|
|
return (x["name"] && x["params"] && (className==='p5'));
|
|
|
|
})
|
|
|
|
|
2016-11-09 19:16:14 +01:00
|
|
|
|
2016-08-12 06:11:31 +02:00
|
|
|
funcNames.forEach(function(x){
|
2016-08-16 00:06:09 +02:00
|
|
|
var document = parent.document;
|
2016-08-12 06:11:31 +02:00
|
|
|
var originalFunc = p5.prototype[x.name];
|
|
|
|
p5.prototype[x.name] = function(){
|
|
|
|
orgArg = arguments;
|
|
|
|
if(frameCount == 0) { //for setup
|
2016-11-12 17:53:02 +01:00
|
|
|
document.getElementById('textOutput-content-table').innerHTML = '';
|
|
|
|
document.getElementById('textOutput-content-details').innerHTML = '';
|
|
|
|
document.getElementById('textOutput-content-summary').innerHTML = '';
|
|
|
|
Interceptor.setupObject = Interceptor.populateObject(x,arguments, Interceptor.setupObject, document.getElementById('textOutput-content-table'),false);
|
2016-08-15 18:12:25 +02:00
|
|
|
Interceptor.getSummary(Interceptor.setupObject,Interceptor.drawObject,document.getElementById('textOutput-content-summary'));
|
2016-11-12 17:53:02 +01:00
|
|
|
var table = document.getElementById('textOutput-content-table');
|
2016-08-16 02:28:18 +02:00
|
|
|
Interceptor.populateTable(table,Interceptor.setupObject.objectArray);
|
2016-08-12 06:11:31 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
else if(frameCount%100 == 0 ) {
|
2016-08-15 18:12:25 +02:00
|
|
|
Interceptor.drawObject = Interceptor.populateObject(x,arguments, Interceptor.drawObject, document.getElementById('textOutput-content-details'),true);
|
2016-08-12 06:11:31 +02:00
|
|
|
Interceptor.isCleared = false;
|
|
|
|
}
|
|
|
|
//reset some of the variables
|
|
|
|
else if(frameCount%100 == 1 ) {
|
|
|
|
if(!Interceptor.isCleared){
|
2016-11-12 17:53:02 +01:00
|
|
|
var table = document.getElementById('textOutput-content-table');
|
2016-08-16 02:28:18 +02:00
|
|
|
Interceptor.getSummary(Interceptor.setupObject,Interceptor.drawObject,document.getElementById('textOutput-content-summary'));
|
|
|
|
Interceptor.populateTable(table,Interceptor.setupObject.objectArray.concat(Interceptor.drawObject.objectArray));
|
2016-08-12 06:11:31 +02:00
|
|
|
}
|
|
|
|
Interceptor.drawObject = Interceptor.clearVariables(Interceptor.drawObject);
|
|
|
|
}
|
|
|
|
return originalFunc.apply(this,arguments);
|
|
|
|
}
|
|
|
|
});
|