DEMO A 7kb SVG loading icon that plays Conway's Game of Life on a 10x10 grid
I realized I hadn't ever made Conway's Game of Life so I built it in an SVG that can be used as a loading icon. The code was built with performance in mind for the most part. It was also a very rush job so there is a lot more that could be done to clean it up and make it more efficient.
You can either put the code inline, or reference from an external file using the tag:
<object data="/cgl.min.svg" type="image/svg+xml">
<div>Couldn't get loading icon</div>
</object>
- Reset when cells exists but reach equilibrium
- Replace setTimeout with request animation frame.
- Scope JS