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.
This commit is contained in:
20
components/pet/pet-ground-zone.tsx
Normal file
20
components/pet/pet-ground-zone.tsx
Normal file
@@ -0,0 +1,20 @@
|
||||
"use client";
|
||||
|
||||
import { PET_GROUND_ZONE_HEIGHT_RATIO } from "@/lib/pet-wander-bounds";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
type PetGroundZoneProps = {
|
||||
children: React.ReactNode;
|
||||
className?: string;
|
||||
};
|
||||
|
||||
export function PetGroundZone({ children, className }: PetGroundZoneProps) {
|
||||
return (
|
||||
<div
|
||||
className={cn("absolute inset-x-0 bottom-0 z-10", className)}
|
||||
style={{ height: `${PET_GROUND_ZONE_HEIGHT_RATIO * 100}%` }}
|
||||
>
|
||||
{children}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user