Files
HaBit/components/pet/parallax-room-background.tsx
Harkamal Randhawa 19b0ece147 Improve pet habitat UX with ground-aligned walk, floating rename, and demo points.
Anchor room floors on resize, constrain wandering to a ground zone, add an editable floating name badge on the avatar screen, and let profile demo tools grant 100 test points.
2026-05-24 09:47:48 -06:00

34 lines
736 B
TypeScript

"use client";
import {
getRoomBackground,
type RoomBackgroundId,
} from "@/lib/room-backgrounds";
import { cn } from "@/lib/utils";
type ParallaxRoomBackgroundProps = {
roomId: RoomBackgroundId;
className?: string;
};
export function ParallaxRoomBackground({
roomId,
className,
}: ParallaxRoomBackgroundProps) {
const room = getRoomBackground(roomId);
return (
<div
className={cn("absolute inset-0 z-0 overflow-hidden bg-lcd-bg", className)}
>
{/* eslint-disable-next-line @next/next/no-img-element */}
<img
src={room.sceneImage}
alt=""
aria-hidden
className="absolute inset-0 size-full object-cover object-bottom image-pixelated"
/>
</div>
);
}