First stab at webGL, in 1k between two nappy changes. It's glitchy and tiny but I quite like this puppy. It ranked #3 at DemoJS.
This entry is a bit of a proof of concept: I was sure it was possible to make something decent in 1k with webGL but wondered how much effort this could take and how small the setup code would be.
It turns out it's not that complex and the setup code ( including vertex shader and a minimal fragment shader ) is under 500 bytes uncompressed which leaves a lot of space for a shiny fragment shader.
Initially this little intro was made for DemoJS and took 1024 bytes of JS. If you add the HTML/CSS/JS shim, it weighed around 2.5Kb. Soon after I wrote a standalone version in 961 bytes. Today, the standalone version clocks at 842 bytes with the following breakdown:
- 87 bytes of HTML + CSS
- 441 bytes of GLSL ( 44 and 397 for the vertex and fragment shader respectively )
Comments and other karma retribution
Make sure to leave comments, piggies and thumbs up or down for GL1K Cotton Candy on Pouet.net.
To be continued...
Expect more gl1k productions in the future. Making this intro was fun and there is no doubt this intro can be optimized further and the setup code improved.
Other recent experiments
There are many experiments and projects like COTTON CANDY to discover other here.
- FRONTFEST MOSCOW It was an honour to be invited to Fronfest Moscow 2017 with the little family to give my first workshop; implementing a Twin-stick shooter using ES6 and Canvas, and to continue my CODE🎙ART series of talks + live coding aiming to inspire new web developer artists. on November 18th, 2017
- BREATHING EARTH Another take on Nadieh Bremer mesmerizing Breathing Earth visualisation, running at 60fps on a 2D Canvas without libraries or frameworks. on June 26th, 2017
- THREAD The "10 print" maze generator in 15 bytes of x86 assembler. on December 19th, 2013
- SUDOKU SOLVER Solves a Sudoku grid using magic, recursion, and 140bytes of brute force. on September 21st, 2011
- WOLF1K The idea of this entry for the JS1K contest was to do the impossible: a 1K remake of the famous WOLF5K that rocked the final edition of the5K. It does not feature guns, evil grins and violence for in WOLF1K there is no room for guns or any form of violence. on September 10th, 2010
Don't be shy; get in touch by mail, twitter, github, linkedin or pouet if you have any questions, feedback, speaking, workshop or performance opportunity.