| name | viverse-r3f-profile-ui |
| description | Show VIVERSE user profile in React Three Fiber scenes using @react-three/viverse hooks. Use for player tag UI, avatar icon rendering, and profile-safe fallbacks. |
VIVERSE R3F Profile UI
Profile and player-tag UX patterns for @react-three/viverse scenes.
When To Use This Skill
Use when you need:
- in-world player name tags
- avatar thumbnail UI above character
- safe fallback behavior when profile fields are missing
Read Order
- This file
- Access avatar/profile tutorial
../viverse-auth/SKILL.md
Preflight Checklist
Implementation Workflow
- Read profile with
useViverseProfile().
- Render fallback profile if hook returns null.
- Attach player tag to character node/group.
- Billboard the tag to camera each frame.
- Avoid exposing full raw account IDs in visible UI labels.
Example profile pattern:
const profile = useViverseProfile() ?? {
name: "Anonymous",
activeAvatar: { headIconUrl: "https://picsum.photos/200" },
};
Verification Checklist
Critical Gotchas
checkAuth() token data is not equal to profile data; use profile hook/API.
- Keep fallback names generic; avoid printing full UUID/account identifiers.
- If UI flickers, ensure camera-facing quaternion update is in frame loop.
References