I’ve hit the point that it’s time to release some of my work. So here is a detailed run down of what I’ve been working on and where my progress is at.
- shorten( array ) – receives an array and shortens it by one element and then returns a copy of the array. shorten test
- expand( array, newSize ) – receives an array and optionally a newSize to make the array. expands the array to double its original length by default or expands the array to the newSize if specified. expand test
- unhex( str ) – receives a 8 character hex string that represents a color. unhex returns an int that represents that hex value as a signed int value. unhex text
- nfs( num, left, right ) – number format string accepts either an int, float, int, or float and a number of digits to show on the left of the decimal and optionally a number of digits to show on the right of the decimal place. nfs test
- fill( num ) – fill is designed to take 1 number argument in the range of 0 to 255 for shades of grey. However the java processing native client allows you to pass in an int value representing a color and it will fill with that color. fill( num ) for pjs did not currently support a single number argument for values outside the 0 – 255 range. I added this because the native java client for processing does support it even though the reference for processing in java doesn’t specify it should work this way. example test
- nf( num, pad ) – This function was causing an infinite loop script crash in Firefox when called with certain numbers. I’ve added a fix for the crash but this function still needs to have code written to support 3 arguments. example test
I had planned to implement nfc() as well for this release but I ran out of time so it will make it into 0.2 in November. The bug fixes for fill() and nf() were unplanned though so I don’t feel as though I didn’t achieve my goal for this release.