Fixed-length decryption animation — text is shown at its final length from frame 1,
scrambled with random characters, then progressively resolves left-to-right.
Useful for password reveals, terminal boot sequences, and code decryption effects.
Provided by src/core/decrypt-reveal.js.
Distinct from TypingAnimation — TypingAnimation grows the string over time (streaming/typed reveal with phrase-buffer flicker). DecryptReveal keeps the string at final length from the start and scrambles unrevealed positions.
Default charset — standard katakana + block chars
Intense charset — kanji + block characters
Deep-corruption kanji charset, extended duration
import { DecryptReveal, decodeText } from 'src/core/decrypt-reveal.js';
// Class API — manage multiple concurrent animations
const dr = new DecryptReveal({ charset: CorruptionCharsets.standard });
// Fixed-length decrypt: text shown scrambled at full length, resolves left-to-right
const id = dr.decode(element, 'NEURAL CORE ONLINE', { duration: 2000 });
// Override charset per-call
dr.decode(element, 'アクセス許可', {
duration: 3000,
charset: CorruptionCharsets.kanji,
});
dr.cleanup(id); // cancel one animation early
dr.stop(); // cancel all animations
dr.destroy(); // full teardown (visibilitychange listener removed)
// One-shot helper — no instance needed
const cancel = decodeText(element, 'SYSTEM READY', { duration: 1500 });
// cancel() to stop early