I'll create a 3D RNG aura game for mobile with third-person camera controls, a map, and spin mechanics. Let me start by exploring the project and installing the necessary 3D libraries.
Packages installed. Let me check the main entry and CSS setup.
Now I understand the structure. Let me build this RNG aura game. I'll start with the core data layer (aura definitions and rarity system) and the game state store.
Now the game state store using Zustand:
Now the 3D character. I'll build a stylized humanoid whose accents glow in the equipped aura's color, with an idle animation.
Now the centerpiece — the dynamic aura effect system (particles, rings, beams, orbs, shell) driven by each aura's config:
Let me fix the unused parameter in the Orbs component:
Now the map/world environment — a fantasy landscape with a central platform, trees, rocks, ruins, and distant mountains:
Let me remove the unused import in World.tsx:
Now the main 3D scene with the canvas, lighting, sky, fog, and the orbit camera controls (zoom + full rotation around the character):
Now the spin controller hook that orchestrates the roll timing, auto-spin, and fast-spin logic:
Let me set up global styles and animations for the game UI:
Now the roll result card with the spinning reel and reveal:
The import paths need adjusting since this is in a nested folder. Let me fix them:
Now the cinematic cutscene overlay for rare aura reveals:
Now the inventory/collection modal:
Now the main HUD overlay with the roll button, auto/fast toggles, and top bar:
Same nested-folder import fix needed for HUD:
Now the main App component that ties the 3D scene, HUD, and cutscene together, plus update the HTML title and mobile viewport:
Let me clean up the store's toggle logic, then build to check everything compiles:
The build succeeded. Now let me fix an important runtime bug: the auto-roll loop needs to subscribe to isRolling so it schedules the next roll when the current one completes. Let me also start the camera behind the character for proper third-person view.
The build works. Now let me add a few game-feel enhancements: progress persistence (so the collection saves), a recent-rolls history feed, and a cinematic vignette. Let me update the store with persistence and roll history:
Now a recent-rolls feed component to show rolling history:
Let me integrate the recent rolls feed and fix the hardcoded aura count by rewriting the HUD cleanly:
Let me add a cinematic vignette overlay to the App for depth and visual polish:
Let me rebuild to confirm everything compiles after these enhancements:
The game is functional. Let me make one optimization for mobile performance and reliability — the volumetric clouds can be heavy on phones. Let me replace them with lightweight high-altitude cloud puffs and keep the atmosphere. First let me view the current Scene:
I'll rewrite the Scene to use lightweight, performant billboard clouds instead of the heavy volumetric ones:
Let me lower the clouds a bit so they're visible in the sky at the default view, then rebuild:
The game builds successfully. Let me verify there are no leftover references to removed exports or imports that could cause runtime issues:
Đã xong! Mình đã tạo hoàn chỉnh game Aura Spin 3D — game RNG aura 3D tối ưu cho điện thoại. Build thành công, không lỗi.
🎮 Tính năng đã làm
Thế giới 3D & Camera (góc nhìn thứ 3)
- Nhân vật phù thủy mặc áo choàng có ánh mắt phát sáng theo màu aura đang mặc, có animation thở/nổi nhẹ.
- Camera xoay 360° toàn bộ quanh nhân vật (không chỉ phía sau lưng) + thu phóng (pinch) + nghiêng lên/xuống — dùng
OrbitControls, hỗ trợ cảm ứng điện thoại (1 ngón xoay, 2 ngón zoom).
- Bản đồ: bệ nghi thức trung tâm, cây cối, đá, cột trụ cổ, dãy núi xa, tinh thể lơ lửng phát sáng, mây trôi và bầu trời gradient + sương mờ tạo chiều sâu.
Lối chơi đơn giản — quay miễn phí 100%
- Nút ROLL lớn để quay aura, ghi rõ "Free • Unlimited".
- 🔁 AUTO: tự quay liên tục. ⚡ FAST: quay nhanh bỏ qua animation.
- 16 aura chia 9 bậc hiếm (Common → Cosmic) từ
1/2 đến 1/77.777, mỗi aura có hiệu ứng 3D riêng: đám hạt bay lên, vòng tròn xoay, tia sáng cột, quả cầu năng lượng quỹ đạo, vỏ sáng, đĩa phát sáng dưới chân.
- Aura hiếm (Mythical trở lên) kích hoạt cutscene điện ảnh toàn màn hình.
- Bộ sưu tập xem/tùy chỉnh aura, thanh tiến trình, lưu tiến trình tự động (localStorage), và dải lịch sử quay gần đây.
- Tự động mặc aura mới khi quay được đồ hiếm hơn; badge NEW / NEW BEST.
Giao diện di động: bố cục glassmorphism, an toàn vùng tai thỏ (safe-area), bảng hướng dẫn khi vào game, tối ưu hiệu năng (đám mây dạng sprite nhẹ, giới hạn particle hợp lý cho điện thoại).
Cấu trúc mã tách rõ: game/ (dữ liệu aura + RNG + store + logic quay), components/three/ (Scene, Player, AuraEffect, World), components/ui/ (HUD, RollResultCard, Inventory, Cutscene, RecentRolls). Bạn chỉ cần chạy build là có file dist/index.html phục vụ trên điện thoại.
Files built: src/game/auras.ts, src/game/store.ts, src/components/three/Player.tsx, src/components/three/AuraEffect.tsx, src/components/three/World.tsx, src/components/three/Scene.tsx, src/game/useRoller.ts, src/index.css, src/components/ui/RollResultCard.tsx, src/components/ui/Cutscene.tsx, src/components/ui/Inventory.tsx, src/components/ui/HUD.tsx, src/App.tsx, index.html, src/components/ui/RecentRolls.tsx