A thick twisted rope laid across the page, its strands rolling along as it slowly turns.
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄ ██▓╱╱▒███▓╱╱▓▓██▓╱╱▒███▓╱╱▓▓██▓╱╱▒███▓╱╱▒▓██▓╱╱▒███▓╱╱▒▓██▓╱╱▓███▓╱╱▒███▓╱╱▓▓██▓╱╱▒███▓╱╱▓▓██▓╱╱ ▒╱╱▒███▓╱╱▓▓██▒╱╱▒███▓╱╱▓▓██▒╱╱▒███▓╱╱▒███▓╱╱▓███▓╱╱▒██▓▓╱╱▓███▒╱╱▒███▓╱╱▓▓██▒╱╱▒███▓╱╱▓▓██▒╱╱▓█ ╱▒█▓▓▒╱╱▓▓█▓▒╱╱▒█▓▓▒╱╱▒▓█▓▒╱╱▒▓▓▓▒╱╱▒▓█▓▒╱╱▓▓▓▓▒╱╱▒▓█▓▒╱╱▓▓█▓▒╱╱▒█▓▓▒╱╱▒▓█▓▒╱╱▒█▓▓▒╱╱▒▓█▓▒╱╱▓▓▓▓ ▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
Paste two lines into any page, use it from React, play it in a terminal, put a GIF in a README, or hand the Agent prompt to your coding agent. Every tab follows the look you pick above.
<script type="module" src="https://www.ascii-magic.com/ascii/ascii.js"></script>
<ascii-art piece="rope-divider"></ascii-art>// npm install ascii-magic-art
import { useEffect, useRef } from "react";
import { play } from "ascii-magic-art/runtime/player.js";
import * as piece from "ascii-magic-art/pieces/rope-divider.js";
export function RopeDivider() {
const ref = useRef(null);
// play() draws the piece on a canvas in your look and returns stop(), which React runs on unmount
useEffect(() => play(ref.current, piece), []);
return <pre ref={ref} style={{ fontSize: 10, fontFamily: "Menlo, Consolas, monospace" }} />;
}npx ascii-magic-art rope-divider<!-- Export the GIF below in the look you picked, commit it, then: -->
<p align="center">
<img src="assets/rope-divider.gif" alt="Twisted Rope, animated ASCII art" width="720">
</p>Add the animated ASCII art piece "rope-divider" (Twisted Rope) from ASCII Magic to this project.
1. Load the script once, in the browser only (in SSR frameworks such as Next.js, load it on the client):
<script type="module" src="https://www.ascii-magic.com/ascii/ascii.js"></script>
2. Put the piece where it fits best, such as the hero, a loading state, an empty state or the 404 page:
<ascii-art piece="rope-divider"></ascii-art>
3. Keep a real heading or text next to it (the art is decoration), and size it with the size attribute or CSS.
Preview and options: https://www.ascii-magic.com/ascii/rope-divider
Rules for coding agents: https://www.ascii-magic.com/ascii/use/ai-coding-agentsPause on the frame you like, pick a look, then download it at an exact size.
MIT licensed and open source on GitHub. It imports one small helper file, kit.js. This is the animation itself: what gets drawn in every frame. The look you pick is applied on top by the player, like a filter, so this file stays the same in every look while the snippets above change with it. Edit it to change the animation; see the docs to make your own.
/* rope-divider: a thick twisted rope whose strands roll along as it turns. */
import { Grid, palette, gradient, KEYS, fract, clamp, TAU } from "../lib/kit.js";
const ROPE = gradient(["#1e120a", "#4a2c15", "#8a5a2b", "#c48a4a", "#e9c38a", "#fff0d2"], 12);
export const meta = {
slug: "rope-divider",
name: "Twisted Rope",
category: "frames",
note: "A thick twisted rope laid across the page, its strands rolling along as it slowly turns.",
tags: ["divider", "rope", "nautical", "readme", "separator"],
cols: 96, rows: 5, fps: 20,
palette: palette(ROPE),
};
const SH = "░▒▓█";
export default function create() {
const { cols, rows } = meta;
const g = new Grid(cols, rows);
return (t) => {
g.clear();
for (let y = 0; y < rows; y++) {
const v = (y - 2) / 2.4;
const cyl = Math.sqrt(Math.max(0, 1 - v * v));
const light = 0.85 - v * 0.25; // lit from above
for (let x = 0; x < cols; x++) {
const s = fract((x + y * 2.2) / 7 - t * 0.7);
const strand = 0.5 + 0.5 * Math.cos(s * TAU);
const fib = 0.08 * Math.sin(x * 2.3 + y * 5.1);
const b = clamp(cyl * light * (0.25 + 0.75 * strand) + fib);
const k = KEYS[Math.min(11, Math.floor(b * 12))];
if (y === 0) g.set(x, y, "▄", k);
else if (y === rows - 1) g.set(x, y, "▀", KEYS[Math.min(11, Math.floor(b * 9))]);
else if (strand < 0.18) g.set(x, y, "╱", KEYS[1]);
else g.set(x, y, SH[Math.min(3, Math.floor(b * 4.5))], k);
}
}
return g.frame();
};
}
/YOUR OWN
The pieces here are hand-built animations. To turn your own photo, logo or video into animated ASCII, use the ASCII Magic editor.