MORE PROCESSING.JS!!
As you may or may not know I am currently enrolled in DPS909 course at Seneca College. For this course I am working on the open source project Processing.js. My job is to help make it better by fixing bugs and finishing tickets. Since my last update I fixed update my old patches and worked on the following bugs:
Bug 833: Fix ellipse 3D to take noStroke and noFill values
This bug describes how ellipses created in 3D sketches do not handle noStroke and noFill values. The noFill value was fixed in bug 1075 which I fixed last release. I checked to see whether or not the noStroke check needed to be added and due to the nature of ellipse. Stroke is not being draw in the beginshape/endshape partition of ellipse if it is not set and if the check is added fill breaks.
Bug 1007: Improve the performance of the arc
The arc function in processing.js is slow and need to be optimized. In the past processing.js used the canvas tags arc function but changed to utilize its own begin shape/end shape functions. This made the arc behave like P5 but caused a serious decrease in speed. I used the sin and cos look up tables so calculations do not have to be made every time an arc is created.
Bug 1199: Remove usages of parseFloat and parseInt as cast operators.
This bug show how in the processing.js library parseInt function is used to change float numbers into integers and parseFloat function is used to change integer numbers into floats. This may cause performance a hit. For this patch I did not have to worry about parseFloat because it is changed in bug 1007. So to check the performance of float to integer. The results and test is located here.
Bug 1144: Arc 3d fill is done improperly
This bug occurs when an Arc is created in a 3D sketch it always have a stroke even if noStroke() is used. To fix this issue I had to change the shape type the Triangle Fan which prevents this issue from occurring. I also created a ref test to ensure this problem does not arise in the future.