A fun, animated React website that displays Minecraft players walking around in 3D space using the skinview3d library. Watch characters move independently, interact with each other, and respond to your clicks!
๐ Live Preview: https://skins.playcdu.co/
Note: This is just for fun! A playful way to visualize online players in 3D.
- ๐ฎ Real-Time Player Sync - Automatically fetches and displays players from your configured source
- ๐ถ Smooth Animations - Walking, running, idle, wave, and hit animations
- ๐ Wave Animation - Characters wave when spawning or when hit by you
- ๐ Intelligent Pathfinding - Characters path to less crowded areas with obstacle avoidance
- ๐ Player Interactions - Characters occasionally hit each other, causing knockback and run-away behavior
- ๐ฑ๏ธ Click Interactions - Click to hit characters, drag to move them around
- ๐ฏ Physics-Based Throwing - Throw characters with inertia - they'll fly and hit others!
- ๐ Death System - Characters turn red, fall over, fade out, and respawn when hit by flying characters
- ๐ท๏ธ Nametags - Player usernames displayed above each character
- ๐ฌ Live Chatbox - Shows login/logout messages in real-time
- ๐ Player Count - Displays total number of online players
- ๐จ Starfield Background - Animated starfield for depth perception
- ๐ต Background Music - Optional YouTube audio with play/pause controls
The app supports multiple ways to get player data:
Uses the Craft Down Under query API to fetch real-time online players.
Simple text file with one username per line.
Implement your own data fetching logic (API, database, etc.)
- Node.js (v16 or higher)
- npm or yarn
-
Clone or download this repository
-
Install dependencies:
npm install-
Configure your player data source (see Configuration below)
-
Start the development server:
npm run dev- Open your browser to the URL shown in the terminal (usually
http://localhost:5173)
npm run buildThe built files will be in the dist/ directory, ready to deploy to any static hosting (Cloudflare Pages, Netlify, Vercel, etc.).
Edit src/config/playerSource.js to configure how players are loaded:
export const PLAYER_SOURCE_TYPE = 'cdu_api'
export const CDU_API_URL = 'https://api.playcdu.co/query'The API should return an array of server objects, each with:
clusterId: Server cluster identifieronlinePlayerList: Array of player objects withnameproperty
- Create a file
public/players.txtwith one username per line:
Player1
Player2
Player3
- Configure:
export const PLAYER_SOURCE_TYPE = 'text_file'
export const TEXT_FILE_PATH = '/players.txt'Implement your own fetch function:
export const PLAYER_SOURCE_TYPE = 'custom'
export const fetchCustomPlayers = async () => {
// Example: Fetch from your own API
const response = await fetch('https://your-api.com/players')
const data = await response.json()
return data.map(p => ({
username: p.name,
clusterId: p.cluster || 'DEFAULT'
}))
// Example: Return static list
// return [
// { username: 'Player1', clusterId: 'cluster1' },
// { username: 'Player2', clusterId: 'cluster2' }
// ]
}Return Format: Your function should return an array of objects with:
username(required): The Minecraft usernameclusterId(optional): Cluster/server identifier for grouping
Skins are loaded from https://heads.playcdu.co/skin/{username} by default. To use a different skin source, edit the loadSkinImage function in src/components/SkinViewer.jsx.
Players are synced every 5 seconds by default. To change this, edit src/components/SkinViewer.jsx:
syncIntervalRef.current = setInterval(() => {
syncCharacters()
}, 5000) // Change 5000 to your desired interval in milliseconds- Initial Load: Fetches players from your configured source and spawns them in the 3D scene
- Real-Time Sync: Periodically checks for new players and removes offline players
- Seamless Updates: Characters are added/removed without resetting animations or positions
- Automatic Behavior: Characters walk around, avoid each other, occasionally hit each other, and wave
skinview/
โโโ src/
โ โโโ components/
โ โ โโโ SkinViewer.jsx # Main component with player sync
โ โ โโโ SkinViewer.css # Component styles
โ โ โโโ NameTagObject.js # Custom nametag implementation
โ โ โโโ Starfield.jsx # Starfield background
โ โ โโโ BackgroundAudio.jsx # Background music player
โ โ โโโ ...
โ โโโ config/
โ โ โโโ playerSource.js # Player data source configuration
โ โโโ App.jsx
โ โโโ main.jsx
โโโ public/
โ โโโ players.txt # Text file source (if using)
โ โโโ oof.ogg # Death sound effect
โโโ index.html
โโโ package.json
โโโ README.md
- React - UI library
- Vite - Build tool and dev server
- skinview3d - 3D Minecraft skin viewer
- Three.js - 3D graphics (via skinview3d)
Edit baseMoveSpeed in src/components/SkinViewer.jsx (currently 2.0).
Edit animSpeed values in src/components/SkinViewer.jsx (currently 0.87285).
Edit camera settings in src/components/SkinViewer.jsx:
cameraDistance: Currently500skinViewer.zoom: Currently0.0000002
Replace public/oof.ogg with your own sound file (OGG format recommended).
This is a static site that can be deployed to:
- Cloudflare Pages (recommended)
- Netlify
- Vercel
- GitHub Pages
- Any static hosting service
Just run npm run build and upload the dist/ folder.
- Skins are loaded using usernames (case-sensitive)
- Characters sync automatically based on your configured interval
- Characters use intelligent pathfinding to avoid crowding
- Player-to-player hits occur randomly (configurable)
- Click interactions: Quick clicks hit, longer drags move characters
- Built with React hooks for easy extensibility
- This is just for fun! ๐ฎ
Feel free to use this for your own projects!
- Uses skinview3d for 3D skin rendering
- Default skin source: heads.playcdu.co
- Default player source: api.playcdu.co (Craft Down Under)
Have fun! ๐