0xa85e2099…e34asent to0xd28694b1…4215·#25,412,199·view on Etherscan
+ 3));
const sortB = Math.round((field.cellular - 0.5) * field.packet * 2.15 + (field.fine - 0.5) * field.packet * 1.2);
const tearSlip = Math.round(Math.sin(field.blockY * 2.31 + field.hold * 6.1 + field.coarseSeed * 4) * (field.packet * 1.32 + 2)) * field.tearGate;
const verticalDrop = Math.round(Math.sin(colBand * 1.63 - field.hold * 3.4 + seed * 0.00019) * 4.8);
const microGate = grSmoothstep(0.45, 1, field.micro);
const microXSlip = Math.round((grProceduralFractalNoise(field.microX * 1.9, field.microY * 1.4, field.fastHold, seed + 1201) - 0.5) * 11) * microGate;
const microYSlip = Math.round((grProceduralFractalNoise(field.microX * 1.2 + 5, field.microY * 1.6 - 3, field.fastHold, seed + 1601) - 0.5) * 10) * microGate;
const scatterAngle = grProceduralFractalNoise(field.blockX * 1.8 + 13, field.blockY * 1.3 - 7, field.hold, seed + 2003) * Math.PI * 2;
const scatter = Math.max(field.burst * field.coverageGate, field.windFalloff * 0.42) * (0.7 + profile.rebuild);
const strength = Math.max(0, profile.strength) * field.toneMask;
const quantum = cell * 0.25;
const windPush = field.windFalloff * field.packet * strength * cell * 1.35;
return [
grProceduralQuantize(((sortA + sortB + tearSlip + microXSlip) * cell * strength * field.gate * 1.18) + Math.cos(scatterAngle) * cell * field.packet * strength * scatter * 0.9 + Math.cos(field.windAngle) * windPush, quantum),
grProceduralQuantize(((verticalDrop + microYSlip) * cell * strength * field.gate * 0.72) + Math.sin(scatterAngle) * cell * field.packet * strength * scatter * 0.62 + Math.sin(field.windAngle) * windPush * 0.95, quantum),
];
}
function grWarezProceduralGlyph(glyph, chars, column, row, frame, tone) {
const settings = grProceduralMotionSettings();
if (!settings?.enabled || (settings.type || settings.style) !== "warez") return glyph;
if (glyph === " " && tone < 0.08) return glyph;
const seed = Number(SIGNAL_RITUAL_ENGINE.seed || 1);
const profile = grProceduralWarezProfile(settings);
const field = grWarezMotionField(profile, column, row, frame, tone, seed, columns, rows);
const charIndex = chars.indexOf(glyph);
if (charIndex < 0) return glyph;
const chance = Math.min(0.97, (0.22 + profile.strength * 0.31 + field.burst * 0.38 + field.windFalloff * 0.36) * Math.max(field.gate, field.windFalloff * 0.82, field.feather * 0.62));
const roll = grProceduralFractalNoise(column * 0.79 + field.blockX, row * 0.83 - field.blockY, field.fastHold, seed + 2401);
if (roll > chance) return glyph;
const radius = Math.max(2, Math.round(2 + profile.strength * 4 + field.micro * 5.2 + field.windFalloff * 5.5));
const denseBias = field.burst > 0.24 || field.tearGate > 0.6 || field.windFalloff > 0.5 ? 3 : 0;
const drift = Math.round((grProceduralFractalNoise(field.warpedColumn * 0.2, field.warpedRow * 0.17, field.hold, seed + 3307) - 0.5) * radius * 1.2);
const farShuffle = grProceduralFractalNoise(column * 0.39 + field.fine * 2.7, row * 0.35 - field.micro * 2.1, field.fastHold, seed + 3607) < field.windFalloff * 0.32;
const start = farShuffle ? 1 : Math.max(1, charIndex - Math.max(1, radius - denseBias) + Math.min(0, drift));
const end = farShuffle ? chars.length - 1 : Math.min(chars.length - 1, charIndex + radius + denseBias + Math.max(0, drift));
const pick = Math.floor(start + grProceduralFractalNoise(field.blockX * 1.17 + column * 0.21, field.blockY * 1.31 + row * 0.17, field.hold, seed + 2909) * (end - start + 1));
return chars[pick] || glyph;
}
function grProceduralGlyphOffset(column, row, frame, tone) {
const settings = grProceduralMotionSettings();
if (!settings?.enabled) return [0, 0];
const type = settings.type || settings.style || "drift";
const seed = Number(SIGNAL_RITUAL_ENGINE.seed || 1);
const safeTone = grClampUnit(tone, 0);
const baseStrength = 0.22 + safeTone * 0.78;
if (type === "rain") {
const profile = grProceduralProfile(settings, "rain", 1.2, 0.48);
const strength = cell * profile.strength * baseStrength;
const time = frame * 0.15 * Math.max(0.02, profile.speed);
const phase = grSeeded(column * 911 + seed * 13) * Math.PI * 2;
const fall = Math.sin(time * 2.15 + row * 0.18 + phase);
const sway = Math.sin(time * 0.72 + column * 0.29 + row * 0.04 + seed * 0.00031);
return [sway * strength * 0.24, fall * strength * 1.18];
}
if (type === "fractal") {
const profile = grProceduralProfile(settings, "fractal", 0.9, 0.62);
const strength = cell * profile.strength * baseStrength;
const time = frame * 0.075 * Math.max(0.02, profile.speed);
const field = grProceduralFractalNoise(column * 0.09, row * 0.09, time, seed);
const coverage = Math.max(0.05, Math.min(1, profile.coverage));
const mask = grSmoothstep(1 - coverage, 1, field) * (0.28 + grSmoothstep(0.04, 0.92, safeTone) * 0.72);
const angle = grProceduralFractalNoise(column * 0.14 + 19, row * 0.14 - 11, time * 0.9 + 4.7, seed + 101) * Math.PI * 2;
return [Math.cos(angle) * strength * mask, Math.sin(angle) * strength * mask];
}
if (type === "warez") {
return grWarezProceduralOffset(settings, column, row, frame, tone, seed);
}
const profile = grProceduralProfile(settings, "drift", 1, 0.42);
const strength = cell * profile.strength * baseStrength;
const time = frame * 0.11 * Math.max(0.02, profile.speed);
const phase = column * 0.37 + row * 0.29 + seed * 0.000001;
const driftX = Math.sin(time + phase) * strength;
const driftY = Math.cos(time * 0.73 + column * 0.17 - row * 0.31 + seed * 0.0000007) * strength * 0.62;
return [driftX, driftY];
}
function grPlaybackFrame(timelineFrame) {
const base = grBaseFrameCount();
const tick = Math.max(0, Math.floor(timelineFrame || 0));
if (grPlaybackMode() !== "pingpong" || base <= 1) return tick % base;
const period = base * 2 - 2;
const wrapped = tick % period;
return wrapped < base ? wrapped : period - wrapped;
}
function grActiveGlitchStrength(frame) {
const effects = grEffectSettings();
if (!effects.glitchEnabled || !effects.glitchPasses) return 0;
let strength = 0;
for (let i = 0; i < effects.glitchPasses.length; i += 1) {
const pass = effects.glitchPasses[i];
const frames = (pass[0] || 0) / 100;
const passStrength = (pass[1] || 0) / 100;
const speed = (pass[2] || 0) / 100;
const time = frame * (0.012 + speed * 0.2);
if (grSmoothRandom(frame * 977 + i * 1009 + 19, time) < frames) {
strength = Math.max(strength, passStrength);
}
}
return strength;
}
function grActiveGlitchPasses(frame) {
const effects = grEffectSettings();
if (!effects.glitchEnabled || !effects.glitchPasses) return [];
const passes = [];
for (let i = 0; i < effects.glitchPasses.length; i += 1) {
const pass = effects.glitchPasses[i];
const frames = (pass[0] || 0) / 100;
const strength = (pass[1] || 0) / 100;
const speed = (pass[2] || 0) / 100;
if (frames <= 0 || strength <= 0) continue;
const time = frame * (0.012 + speed * 0.2);
if (grSmoothRandom(frame * 977 + i * 1009 + 19, time) < frames) {
passes.push({ index: i, strength, speed });
}
}
return passes;
}
function grMotionGlyph(glyph, column, row, frame, tone) {
if (glyph === " " && tone < 0.08) return glyph;
const effects = grEffectSettings();
const chars = SIGNAL_RITUAL_ENGINE.glyphs;
let charIndex = Math.max(0, chars.indexOf(glyph));
if (effects.asciiAnimate) {
const style = effects.motionStyle || "rain";
const fallSpeed = (effects.fallSpeed || 0) / 100;
const symbolDrift = (effects.symbolDrift || 0) / 100;
const rainAccent = (effects.rainAccent || 0) / 100;
const phase = Math.floor(grSeeded(column + 401) * 80);
const speed = 0.25 + fallSpeed * 1.8;
let streamSeed = column * 4099 + Math.floor(row - frame * speed - phase) * 131 + 1701;
if (style === "signalTear") {
const tearTime = Math.floor(frame * (0.12 + fallSpeed * 0.55));
const tearBand = Math.floor(row / Math.max(1, Math.round(2 + grSeeded(row + tearTime) * 9)));
streamSeed = column * 467 + tearBand * 3511 + tearTime * 977 + 211;
} else if (style === "staticCrawl") {
const crawlTime = Math.floor(frame * (0.2 + fallSpeed * 1.3));
streamSeed = column * 997 + row * 443 + crawlTime * 1889 + Math.floor(grSeeded(row + crawlTime) * 17);
} else if (style === "pulseDrift") {
const pulse = Math.sin(frame * (0.045 + fallSpeed * 0.08) + column * 0.42 + row * 0.23);
streamSeed = column * 4099 + row * 131 + Math.floor((pulse + 1) * 900) + 1701;
}
const accent = grSeeded(streamSeed + 811);
if (rainAccent > 0 && accent < rainAccent * 0.42) {
const radius = 1 + Math.ceil(rainAccent * 3);
const start = Math.max(1, charIndex - radius);
const end = Math.min(chars.length - 1, charIndex + radius);
glyph = chars[Math.floor(start + grSeeded(streamSeed + 1307) * (end - start + 1))] || glyph;
charIndex = Math.max(0, chars.indexOf(glyph));
} else if (grSeeded(streamSeed) < 0.18 + symbolDrift * 0.62) {
const start = Math.max(1, charIndex - 1);
const end = Math.min(chars.length - 1, charIndex + 1);
glyph = chars[Math.floor(start + grSeeded(streamSeed) * (end - start + 1))] || glyph;
charIndex = Math.max(0, chars.indexOf(glyph));
}
}
const glitchStrength = grActiveGlitchStrength(frame);
if (glitchStrength > 0) {
const seed = column * 733 + row * 379 + frame * 47;
if (grSeeded(seed) <= glitchStrength / 1.25) {
const radius = chars.length >= 8 ? 2 : 1;
const start = Math.max(1, charIndex - radius);
const end = Math.min(chars.length - 1, charIndex + radius);
glyph = chars[Math.floor(start + grSeeded(seed + 911) * (end - start + 1))] || glyph;
charIndex = Math.max(0, chars.indexOf(glyph));
}
}
if (effects.asciiStatic) {
const amount = (effects.asciiStaticAmount || 0) / 100;
const speed = (effects.asciiStaticSpeed || 0) / 100;
const style = effects.motionStyle || "rain";
const styleSpeed = style === "staticCrawl" ? 1.35 : style === "signalTear" ? 0.75 : style === "pulseDrift" ? 0.42 : 1;
const time = frame * (0.016 + speed * 0.28) * styleSpeed;
const glyphFrame = Math.floor(frame * (0.04 + speed * 0.52) * styleSpeed);
const horizontalTear = grSmoothRandom(row * 997 + 61, time);
const noise = grSmoothRandom(column * 571 + row * 823 + 127, time * 1.15);
const pulseBoost = style === "pulseDrift" ? Math.max(0, Math.sin(frame * (0.035 + speed * 0.1) + row * 0.17)) * amount * 0.28 : 0;
const tearBoost = style === "signalTear" && horizontalTear < amount * 0.2 ? amount * 0.55 : 0;
const chance = amount * 0.18 + tearBoost + pulseBoost + (horizontalTear < amount * 0.12 ? amount * 0.48 : 0);
if (noise <= chance) {
if (horizontalTear < amount * 0.16 && grSeeded(column * 67 + row * 31 + glyphFrame) < 0.38) {
const smearGlyphs = " -=_";
glyph = smearGlyphs[Math.floor(grSeeded(row * 43 + glyphFrame * 17) * smearGlyphs.length)] || glyph;
} else {
const radius = Math.max(1, Math.round(1 + amount * 5));
const start = Math.max(1, charIndex - radius);
const end = Math.min(chars.length - 1, charIndex + radius);
glyph = chars[Math.floor(start + grSeeded(column * 953 + row * 227 + glyphFrame * 29) * (end - start + 1))] || glyph;
}
}
}
glyph = grWarezProceduralGlyph(glyph, chars, column, row, frame, tone);
return glyph;
}
function grSizeGlitchScale(column, row, frame) {
const effects = grEffectSettings();
const probability = (effects.asciiSizeGlitchProbability || 0) / 100;
const range = (effects.asciiSizeGlitchRange || 0) / 100;
if (probability <= 0 || range <= 0) return 1;
const time = frame * (0.045 + range * 0.46);
const cluster = Math.floor(row / Math.max(1, Math.round(1 + grSeeded(column * 617 + row * 31) * 4)));
const chance = probability * (0.45 + grSmoothRandom(column * 409 +