|
This program draws a triangle that shows the blending of three colors. These three colors can be specified by the user and are drawn at the vertices of the triangle.
I originally implemented this in C++ for the Macintosh, then ported it to run in PHP on the web. I wrote this final implementation in Javscript to allow the program to be run standalone (without need for a web server).
New features in this JavaScript implementation:
This was one of the very first programs I wrote in JavaScript, and it shows. At the time, I didn't use much CSS and I wrote the styles directly into the HTML. Also, I used old HTML4 constructs like cellspcing and cellpadding. And I used tables a lot to lay things out, which in this particular case, is not really so bad. But my coding style has changed a lot since these days.