Examples showing how to do 'non trivial' things with HTML5, Javascript, CSS, ...
Download this project with:
git clone https://github.com/optimisme/html-examples.git
cd html-examples
...
Example showing how to draw one canvas pixel by pixel using a fast ArrayBuffer.
Example showing how to draw one canvas pixel by pixel using a fast ArrayBuffer from several workers (not OffscrenCanvas).
Example showing how to draw one 3 gradient triangle using the 'canvas' object and javascript. It is done creating a triangle texture with 3 colors, and projecting this texture to its final position. The resolution of the texture can be configured to improve performance/quality, it also allows the use of RGBA colors.
Example showing how to sort strings with a natural algorithm that looks for numbers inside strings
This example shows how to animate one or various HTML div objects, depending on the scroll position.
Inspired by simplify.js this example shows how to 'Simplify' a polyline defining the final number of points instead of the tolerance. The algorithm is a modification of Douglas-Peucker algorithm.