1
edit
Changes
no edit summary
== code blocks ==
Here is a list of code blocks I have written for the processing.js project
0.1 - Full Details shorten(), expand(), nfs(), unhex(), bug fixes on nf() and fill()
0.2 - Full Details nfc(), exp(), log(), map(), asin(), acos(), atan(), tan()
0.3 - wip: blendColor(), blend(), copy(), filter()
=== log() ===
p.log = function( num ) {
return Math.log(num > 0 ? num : 0);
}
=== exp() ===
p.exp = function( num ){
return Math.exp(num > 0 ? num : 0);
}
=== asin() ===
p.asin = function( num ){
return Math.asin(num);
}
=== acos() ===
p.acos = function( num ){
return Math.acos(num);
}
=== atan() ===
p.atan = function( num ){
return Math.atan(num);
}
=== tan() ===
p.tan = function( num ){
return Math.tan(num);
}
=== map() ===
p.map = function( value, low1, high1, low2, high2 ){
return (((value-low1)/(high1-low1))*(high2-low2))+low2;
}
=== screen ===
p.screen = {
width:screen.width,
height:screen.height
}
=== nfc() ===
Specification for nfc() in processing [http://processing.org/reference/nfc_.html here].<br />