# ASCII Sharks

Source: https://github.com/stackedlol/ascii-sharks
Commit: a0074c16a106f0abc665fe9712ca445f8f98ad8e
Licence: MIT, copyright 2026 drewdi. See LICENSE.txt.

`math.js`, `species.js` and `world.js` are upstream's TypeScript emitted to browser JavaScript, with explicit `.js` imports. Simulation and shark shapes are unchanged.

`renderer.js` starts from the renderer adapted for this site's earlier Below the surface experiment, which had already added the night background, the finer 4-7 px glyph grid and the dimmed grid lines. Changed for Open water:

- Shark letters are fixed to the cell instead of following a hash of the skin position. Skin letters still follow brightness, with a margin so they change only when it clearly moves.
- Random accent and white letters and the per-cell shade jitter are removed, and a letter holds for at least 0.18 s before it can change.
- Shark cells ease their brightness in and out, and edge cells get a dim fill, so silhouettes move in less than a whole cell.
- Fish keep their dash shape but are drawn as small rectangles on device pixels, with their brightness eased, instead of `-` characters hopping between cells.
- The wake starts fainter, with more brightness steps and a calmer colour. Splash and bite marks are softer and use the site's saffron.
- Wake deposits and blur scale with frame time, so a wake keeps its strength on faster displays.
- Ridge brightness is lower, and fish use the site's ivory.
- Working out shark coverage skips cells a shark cannot reach and the extra samples deep inside its body. Letters are skipped on very faint cells, and colour strings are reused. These only reduce the cost of a frame.

`../boat.js` and `../ocean.js` are page code, not upstream code. They began as the page code of this site's earlier Over the side experiment.
