Fade live ink marks

Work out how visible each ink mark drawn live on a canvas or screen is at a given instant, so live marks fade instead of piling up, and when each is gone

Give now (the instant to look at, an ISO time or milliseconds since the epoch), fade ({ hold_ms, fade_ms }: how long a mark is fully seen, then how long it takes to go) and marks ([{ ref, created_at? }]). Answers marks, one per mark in the order given, each with opacity (1 until hold_ms has passed since created_at, falling in a straight line to 0 over fade_ms, 0 after), shown and gone_at (the ISO instant it goes, or null for a mark with no usable time, which never fades), and the counts shown and gone. It reads only what it is given: no clock is read, nothing is drawn, no mark is changed or deleted. Refuses an empty list, a mark without a ref, a now that is not a time and a hold_ms or fade_ms that is not a number of zero or more. The screen (show/GraphCanvas.tsx, show/AddressedMarkLayer.tsx and the mark toolbar) also lays a list out as linked cards, takes the pen and keeps each stroke; this run does none of that. Folding, shaping and erasing marks are the tool:see-the-ink-marks-on-a-space, tool:turn-a-drawn-stroke-into-a-mark-shape and tool:find-the-ink-mark-to-erase rows in tools/draw-ink-marks; exporting marks as a picture file is the ink block of tool:export-a-document-to-a-file.

What it asks for

Nothing: your AI starts it with your words.

Use it from your AI

Connect the AI you already use to Trillion once. Then ask in your own words; your AI finds this tool by what it does and runs it.

Say to your AI: “Use Trillion to work out how visible each ink mark drawn live on a canvas or screen is at a given instant, so live marks fade instead of piling up, and when each is gone”