Skip to content

Open-source platform for 3D AI agents. Turn text or a photo into a rigged, animated GLB avatar, give it an LLM brain, memory and a wallet, and embed it anywhere with one web component. Remote MCP server, x402 payments, Three.js, browser-native.

3.5 KB
Raw Blame
/* GameFeel — full-screen feedback overlays + floating chips. Non-interactive. */

.wh-feel {
	position: fixed;
	inset: 0;
	z-index: 55;
	pointer-events: none;
	overflow: hidden;
}

/* Damage vignette: red edges that flare then fade. --feel-vig scales intensity. */
.wh-feel-vignette {
	--feel-vig: 0.6;
	position: absolute;
	inset: 0;
	opacity: 0;
	box-shadow: inset 0 0 140px 30px rgba(190, 20, 20, 0.85);
	background: radial-gradient(ellipse at center, transparent 56%, rgba(150, 10, 10, 0.35) 100%);
}
.wh-feel-vignette.is-hit { animation: wh-feel-hit 0.5s ease-out; }
@keyframes wh-feel-hit {
	0% { opacity: 0; }
	18% { opacity: var(--feel-vig); }
	100% { opacity: 0; }
}

/* Screen flash. */
.wh-feel-flash {
	position: absolute;
	inset: 0;
	opacity: 0;
	background: rgba(255, 255, 255, 0.5);
}
.wh-feel-flash.is-on { animation: wh-feel-flash 0.32s ease-out; }
@keyframes wh-feel-flash { 0% { opacity: 0.7; } 100% { opacity: 0; } }

/* Floating money chip. */
.wh-feel-money {
	position: fixed;
	z-index: 56;
	transform: translate(-50%, 0);
	font: 800 16px/1 ui-sans-serif, system-ui, sans-serif;
	font-variant-numeric: tabular-nums;
	text-shadow: 0 2px 6px rgba(0, 0, 0, 0.8);
	pointer-events: none;
	opacity: 0;
	transition: transform var(--duration-slow) var(--ease-standard), opacity var(--duration-slow) var(--ease-standard);
}
.wh-feel-money.is-up { color: #8effa6; }
.wh-feel-money.is-down { color: #ff9b9b; }
.wh-feel-money.is-go { opacity: 1; transform: translate(-50%, -34px); }

/* Level-up / achievement flourish. */
.wh-feel-flourish {
	position: fixed;
	left: 50%;
	top: 38%;
	z-index: 57;
	transform: translate(-50%, -50%) scale(0.86);
	text-align: center;
	padding: 14px 30px;
	border-radius: var(--cc-radius, 4px);
	background: var(--cc-panel, rgba(12, 12, 14, 0.82));
	border: 1px solid var(--cc-edge-hi, rgba(255, 255, 255, 0.5));
	box-shadow: var(--cc-glow, 0 0 14px rgba(255, 255, 255, 0.35)), var(--cc-shadow, 0 16px 50px rgba(0, 0, 0, 0.7));
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	opacity: 0;
	pointer-events: none;
}
.wh-feel-flourish.is-show { animation: wh-feel-flourish 0.42s cubic-bezier(0.2, 0.9, 0.25, 1) forwards; }
@keyframes wh-feel-flourish {
	from { opacity: 0; transform: translate(-50%, -50%) scale(0.86); }
	to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
.wh-feel-flourish:not(.is-show) { transition: opacity var(--duration-slow) var(--ease-standard), transform var(--duration-slow) var(--ease-standard); }
.wh-feel-flourish-title {
	font: 800 22px/1.1 ui-sans-serif, system-ui, sans-serif;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--cc-text, #fff);
}
.wh-feel-flourish-sub { margin-top: 4px; font-size: 14px; color: var(--cc-dim, #9a9aa2); }

@media (prefers-reduced-motion: reduce) {
	/* Collapsing these to 0.01s (what this block used to do) turned the
	   full-screen white flash into a single-frame strobe, strictly worse for a
	   photosensitive player than the original fade. So the flash is removed
	   outright, the damage vignette keeps a single soft fade at half intensity
	   (it is the only feedback that you were hit), and the flourish just
	   appears instead of popping. */
	.wh-feel-flash.is-on { animation: none; opacity: 0; }
	.wh-feel-vignette { --feel-vig: 0.3; }
	.wh-feel-flourish.is-show {
		animation: none;
		opacity: 1;
		transform: translate(-50%, -50%) scale(1);
	}
	.wh-feel-money { transition: opacity var(--duration-base) var(--ease-standard); }
	.wh-feel-money.is-go { transform: translate(-50%, 0); }
}