Gallery: link
Example (html5 browser applet on itch.io): link
GMGrass is a powerful yet simple-to-use library for creating and rendering awesome dynamic 2D foliage.
Example:
// Create
container = new foliage_container(x, y, x + 400, y);
container.verbuffer_begin(); // begin writing to vertex buffer
for(var i = 0; i < 1000; i++) { // add thousand blades of grass
container.verbuffer_add(sprGrassBlade, 0, random(1), 1, random(4), 16, random_range(0.04, 0.08) * choose(1, -1));
}
// Draw
container.render();
End User Licence Agreement (EULA).