const { useState, useEffect, useRef } = React;
/* ---------- Tweaks ---------- */
const TWEAK_DEFAULTS = /*EDITMODE-BEGIN*/{
"username": "dxead",
"domain": ".xyz",
"status": "Online",
"rippleRows": 8,
"rippleCols": 27,
"cellSize": 56,
"showProjects": true
}/*EDITMODE-END*/;
/* ---------- Icons ---------- */
const Icons = {
Discord: () => (),
Github: () => (),
Telegram: () => (),
Mail: () => (),
Globe: () => (),
Chat: () => (),
X: () => (),
Spotify: () => (),
};
const SOCIALS = [
{ id: "discord", label: "Discord", meta: ".dxead", href: "https://discord.gg/fWEVDZ6C2t", icon: "Discord" },
{ id: "contact", label: "Contact", meta: "DM on Discord", action: "copy-discord", icon: "Chat" },
{ id: "site", label: "Website", meta: "frostix.win", href: "https://frostix.win", icon: "Globe" },
{ id: "github", label: "GitHub", meta: "soon", action: "soon", icon: "Github" },
];
const PROJECTS = [
{ id: "P/01", name: "Project Vector", desc: "Anti-cheat bypass framework. Kernel-mode driver, undetected memory access primitives.", tag: "C++ / KMDF" },
{ id: "P/02", name: "GhostESP", desc: "External overlay engine. DXGI shared-surface compositor.", tag: "Rust / DX11" },
{ id: "P/03", name: "PayloadOS", desc: "Modular runtime for game-specific exploit chains.", tag: "C / Lua" },
{ id: "P/04", name: "Reflex Engine", desc: "Aim assist research — kalman-filtered prediction, screen-space target solver.", tag: "CUDA / C++" },
];
/* ---------- Encrypted text (cycles a list of phrases) ---------- */
const CHARSET = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*()_+-={}[];:,.<>/?";
function randChar() { return CHARSET[Math.floor(Math.random() * CHARSET.length)]; }
function EncryptedCycle({ phrases, revealMs = 50, holdMs = 1800, flipMs = 50 }) {
const [phraseIdx, setPhraseIdx] = useState(0);
const [revealCount, setRevealCount] = useState(0);
const [, force] = useState(0);
const scrambleRef = useRef([]);
const text = phrases[phraseIdx];
// initialize scramble buffer when phrase changes
useEffect(() => {
scrambleRef.current = text.split("").map((c) => (c === " " ? " " : randChar()));
setRevealCount(0);
}, [text]);
// reveal loop
useEffect(() => {
let cancelled = false;
let raf;
const start = performance.now();
let lastFlip = start;
const tick = (now) => {
if (cancelled) return;
const elapsed = now - start;
const total = text.length;
const rc = Math.min(total, Math.floor(elapsed / Math.max(1, revealMs)));
setRevealCount(rc);
if (rc >= total) {
// hold, then advance to next phrase
setTimeout(() => {
if (!cancelled) setPhraseIdx((i) => (i + 1) % phrases.length);
}, holdMs);
return;
}
if (now - lastFlip >= flipMs) {
for (let i = rc; i < total; i++) {
scrambleRef.current[i] = text[i] === " " ? " " : randChar();
}
lastFlip = now;
force((x) => x + 1);
}
raf = requestAnimationFrame(tick);
};
raf = requestAnimationFrame(tick);
return () => { cancelled = true; cancelAnimationFrame(raf); };
}, [text, revealMs, holdMs, flipMs, phrases.length]);
return (
{text.split("").map((ch, i) => {
const revealed = i < revealCount;
const display = revealed ? ch : (ch === " " ? " " : (scrambleRef.current[i] || randChar()));
return {display === " " ? "\u00A0" : display};
})}
);
}
/* ---------- Text Generate (blur in by word) ---------- */
function TextGenerate({ words, className, duration = 0.6 }) {
const arr = words.split(" ");
const [shown, setShown] = useState(0);
useEffect(() => {
const timers = arr.map((_, i) => setTimeout(() => setShown((n) => Math.max(n, i + 1)), 200 * i));
return () => timers.forEach(clearTimeout);
}, []);
return (
{arr.map((w, i) => (
{w}
))}
);
}
/* ---------- Hero ---------- */
function Hero({ t }) {
const phrases = [
"Game Hacking",
`${t.username}${t.domain}`,
"Reverse Engineering",
`${t.username}${t.domain}`,
];
return (
);
}
/* ---------- Toast (one-shot status message) ---------- */
const ToastCtx = React.createContext(() => {});
function ToastProvider({ children }) {
const [toast, setToast] = useState(null);
const show = (msg) => {
setToast({ msg, key: Date.now() });
};
useEffect(() => {
if (!toast) return;
const t = setTimeout(() => setToast(null), 2200);
return () => clearTimeout(t);
}, [toast]);
return (
{children}
);
}
function useToast() { return React.useContext(ToastCtx); }
/* ---------- Socials with 3D tilt + focus-blur (matches Projects) ---------- */
function SocialCard({ s, username }) {
const ref = useRef(null);
const innerRef = useRef(null);
const Icon = Icons[s.icon];
const toast = useToast();
const onMove = (e) => {
const el = ref.current; if (!el) return;
const r = el.getBoundingClientRect();
const x = (e.clientX - r.left - r.width / 2) / 14;
const y = (e.clientY - r.top - r.height / 2) / 14;
if (innerRef.current) innerRef.current.style.transform = `rotateY(${x}deg) rotateX(${-y}deg) translateZ(0)`;
};
const onLeave = () => {
if (innerRef.current) innerRef.current.style.transform = `rotateY(0) rotateX(0) translateZ(0)`;
};
const onClick = (e) => {
if (s.action === "copy-discord") {
e.preventDefault();
const handle = `.${username || "dxead"}`;
const done = () => toast("Discord username copied!");
if (navigator.clipboard && navigator.clipboard.writeText) {
navigator.clipboard.writeText(handle).then(done, () => {
// fallback
const ta = document.createElement("textarea");
ta.value = handle; document.body.appendChild(ta);
ta.select(); try { document.execCommand("copy"); } catch (_) {}
ta.remove(); done();
});
} else {
done();
}
} else if (s.action === "soon") {
e.preventDefault();
toast("Coming soon");
}
};
const isAction = !!s.action;
return (
);
}
function SocialsGrid({ username }) {
const [hovering, setHovering] = useState(false);
return (
setHovering(true)}
onMouseLeave={() => setHovering(false)}
>
{SOCIALS.map((s) => )}
);
}
/* ---------- Projects ---------- */
function useTilt(divisor = 22) {
const ref = useRef(null);
const innerRef = useRef(null);
const onMove = (e) => {
const el = ref.current; if (!el) return;
const r = el.getBoundingClientRect();
const x = (e.clientX - r.left - r.width / 2) / divisor;
const y = (e.clientY - r.top - r.height / 2) / divisor;
if (innerRef.current) innerRef.current.style.transform = `rotateY(${x}deg) rotateX(${-y}deg)`;
};
const onLeave = () => {
if (innerRef.current) innerRef.current.style.transform = `rotateY(0) rotateX(0)`;
};
return { ref, innerRef, onMove, onLeave };
}
function FeaturedCard() {
const { ref, innerRef, onMove, onLeave } = useTilt(28);
return (
// Dev Work
madcausebad.cc
If you would like any dev work please add me on discord and give me a dm!
);
}
function ProjectCard({ p }) {
const { ref, innerRef, onMove, onLeave } = useTilt(22);
return (
);
}
function Projects() {
const [hovering, setHovering] = useState(false);
return (
<>
// 01
Projects
04 / 04
setHovering(true)}
onMouseLeave={() => setHovering(false)}
>
{PROJECTS.slice(1).map((p) =>
)}
>
);
}
/* ---------- Music Player ---------- */
function fmtTime(s) {
if (!isFinite(s) || s < 0) s = 0;
const m = Math.floor(s / 60);
const r = Math.floor(s % 60);
return `${m}:${r.toString().padStart(2, "0")}`;
}
const DEFAULT_AUDIO_SRC = "assets/Memories (feat. Kid Cudi).mp3";
const DEFAULT_AUDIO_TITLE = "Memories (feat. Kid Cudi)";
function MusicPlayer() {
const audioRef = useRef(null);
const [playing, setPlaying] = useState(false);
const [t, setT] = useState(0);
const [dur, setDur] = useState(0);
const [vol, setVol] = useState(0.3);
const [collapsed, setCollapsed] = useState(false);
// set src and start playing immediately — no async delay
useEffect(() => {
const a = audioRef.current;
if (!a) return;
a.volume = 0.3;
a.src = DEFAULT_AUDIO_SRC;
a.play().catch(() => {
const start = () => {
a.play().catch(() => {});
window.removeEventListener("pointerdown", start, true);
window.removeEventListener("keydown", start, true);
};
window.addEventListener("pointerdown", start, true);
window.addEventListener("keydown", start, true);
});
}, []);
// tweaks reset — restart from beginning
useEffect(() => {
const onReset = () => {
const a = audioRef.current;
if (!a) return;
a.currentTime = 0;
a.play().catch(() => {});
};
window.addEventListener("dxead:reset-song", onReset);
return () => window.removeEventListener("dxead:reset-song", onReset);
}, []);
const togglePlay = () => {
const a = audioRef.current; if (!a) return;
if (a.paused) a.play().catch(() => {}); else a.pause();
};
const seek = (e) => {
const a = audioRef.current; if (!a || !dur) return;
const r = e.currentTarget.getBoundingClientRect();
const p = Math.min(1, Math.max(0, (e.clientX - r.left) / r.width));
a.currentTime = p * dur;
};
// wire audio events
useEffect(() => {
const a = audioRef.current; if (!a) return;
const onTime = () => setT(a.currentTime);
const onLoaded = () => setDur(a.duration || 0);
const onPlay = () => setPlaying(true);
const onPause = () => setPlaying(false);
const onEnd = () => { a.currentTime = 0; a.play().catch(() => {}); }; // loop
a.addEventListener("timeupdate", onTime);
a.addEventListener("loadedmetadata", onLoaded);
a.addEventListener("play", onPlay);
a.addEventListener("pause", onPause);
a.addEventListener("ended", onEnd);
a.volume = vol;
return () => {
a.removeEventListener("timeupdate", onTime);
a.removeEventListener("loadedmetadata", onLoaded);
a.removeEventListener("play", onPlay);
a.removeEventListener("pause", onPause);
a.removeEventListener("ended", onEnd);
};
}, []);
useEffect(() => { if (audioRef.current) audioRef.current.volume = vol; }, [vol]);
const pct = dur ? (t / dur) * 100 : 0;
return (
{collapsed ? (
) : (
<>
{DEFAULT_AUDIO_TITLE}
{playing ? "Playing · loops" : "Paused"}
{fmtTime(t)}
{fmtTime(dur)}
>
)}
);
}
/* ---------- App ---------- */
function App() {
const [t, setTweak] = useTweaks(TWEAK_DEFAULTS);
// Scramble/reveal animation on the browser tab title
useEffect(() => {
const CHARS = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*()_+-={}[]";
const phrases = ["dxead.xyz", "Game Hacking", "dxead.xyz", "Reverse Engineering"];
let idx = 0, cancelled = false;
const rand = () => CHARS[Math.floor(Math.random() * CHARS.length)];
const run = () => {
if (cancelled) return;
const text = phrases[idx];
const len = text.length;
let buf = text.split("").map(c => c === " " ? " " : rand());
const t0 = performance.now();
const tick = (now) => {
if (cancelled) return;
const revealed = Math.min(len, Math.floor((now - t0) / 50));
buf = buf.map((_, i) => i < revealed ? text[i] : text[i] === " " ? " " : rand());
document.title = buf.join("");
if (revealed < len) { requestAnimationFrame(tick); }
else { document.title = text; setTimeout(() => { idx = (idx + 1) % phrases.length; run(); }, 1800); }
};
requestAnimationFrame(tick);
};
run();
return () => { cancelled = true; document.title = "dxead.xyz"; };
}, []);
return (
{t.showProjects &&
}
© 2026 {t.username}{t.domain}
CONTACT .{t.username} on discord for enquiries
setTweak("username", v)} />
setTweak("domain", v)} />
setTweak("status", v)} />
setTweak("rippleRows", v)} />
setTweak("rippleCols", v)} />
setTweak("cellSize", v)} />
setTweak("showProjects", v)} />
{
const slot = document.getElementById("avatar");
const btn = slot && slot.shadowRoot && slot.shadowRoot.querySelector('[data-act="clear"]');
if (btn) btn.click();
}} />
window.dispatchEvent(new CustomEvent("dxead:reset-song"))} />
);
}
ReactDOM.createRoot(document.getElementById("root")).render();