Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
63 changes: 33 additions & 30 deletions src/components/game/IslandExplorer.client.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// Uses vanilla Three.js engine for better performance

import { useState } from 'react'
import './IslandExplorer.css'

import { VanillaGameScene } from './scene/VanillaGameScene'
import { IntroOverlay } from './ui/IntroOverlay'
Expand Down Expand Up @@ -64,39 +65,41 @@ export default function IslandExplorer() {
return (
<GameMachineProvider>
<ProgressionSync />
<div className="relative w-full h-[calc(100dvh-var(--navbar-height))] bg-sky-500">
{/* Loading overlay */}
{isLoading && <LoadingOverlay />}
<div className="island-explorer">
<div className="relative w-full h-[calc(100dvh-var(--navbar-height))] bg-sky-500">
{/* Loading overlay */}
{isLoading && <LoadingOverlay />}

{/* 3D Scene */}
<div className="absolute inset-0">
<VanillaGameScene onLoadingChange={setIsLoading} />
</div>
{/* 3D Scene */}
<div className="absolute inset-0">
<VanillaGameScene onLoadingChange={setIsLoading} />
</div>

{/* Vignette overlay for depth */}
<div
className="absolute inset-0 pointer-events-none"
style={{
background:
'radial-gradient(ellipse at center, transparent 40%, rgba(0,20,40,0.3) 100%)',
}}
/>
{/* Vignette overlay for depth */}
<div
className="absolute inset-0 pointer-events-none"
style={{
background:
'radial-gradient(ellipse at center, transparent 40%, rgba(0,20,40,0.3) 100%)',
}}
/>

{/* UI Overlays */}
<IntroOverlay />
<UpgradeOverlay />
<CompleteOverlay />
<GameOverOverlay />
<WinOverlay />
<BadgeOverlay />
<GameHUD />
<StatsHUD />
<Minimap />
<IslandIndicator />
<CompassIndicator />
<TouchControls />
<Shop />
<DebugPanel />
{/* UI Overlays */}
<IntroOverlay />
<UpgradeOverlay />
<CompleteOverlay />
<GameOverOverlay />
<WinOverlay />
<BadgeOverlay />
<GameHUD />
<StatsHUD />
<Minimap />
<IslandIndicator />
<CompassIndicator />
<TouchControls />
<Shop />
<DebugPanel />
</div>
</div>
</GameMachineProvider>
)
Expand Down
8 changes: 8 additions & 0 deletions src/components/game/IslandExplorer.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@reference '../../styles/app.css';
@source './';

@layer utilities {
:where(.island-explorer) {
@tailwind utilities source(none);
}
}
2 changes: 1 addition & 1 deletion src/routes/__root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { QueryClientProvider, type QueryClient } from '@tanstack/react-query'
import { createThemeCss, type HighlightTheme } from '@tanstack/highlight/theme'
import { auroraXTheme } from '@tanstack/highlight/themes/aurora-x'
import { githubLightTheme } from '@tanstack/highlight/themes/github-light'
import '~/styles/app.css'
import '~/styles/site.css'
import {
canonicalUrl,
getCanonicalPath,
Expand Down
12 changes: 0 additions & 12 deletions src/styles/app.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
@import 'tailwindcss';
@source not '../components/visitor-chat';
@import 'tw-fade';

@plugin "@tailwindcss/typography";
Expand Down Expand Up @@ -1092,17 +1091,6 @@ html.dark {
--color-surface-state-pressed: #ffffff29;
}

/* Safelist for dynamic colors */
@source inline('{bg-blue-{4,5,6}00,bg-emerald-500,bg-purple-500,bg-pink-500,bg-cyan-500,bg-slate-{4,5}00,bg-twine-700,bg-orange-{5,6,7}00,bg-yellow-500,bg-lime-700,bg-red-500,bg-green-500}/{20,30,40,80}');
@source inline('{hover:{bg-blue-{4,5,6}00,bg-emerald-500,bg-purple-500,bg-pink-500,bg-cyan-500,bg-slate-{4,5}00,bg-twine-700,bg-orange-{5,6,7}00,bg-yellow-500,bg-lime-700,bg-red-500,bg-green-500}/40}');
/* Library `bgStyle` values, tinted via template strings in library chips */
@source inline('{bg-category-{framework,data,ui,performance,tooling},bg-fuchsia-500,bg-amber-500}/{30,40}');
@source inline('{hover:{bg-category-{framework,data,ui,performance,tooling},bg-fuchsia-500,bg-amber-500}/40}');
/* Black/gray-100 theme colors for ranger, config, devtools, mcp */
@source inline('dark:text-gray-100 dark:bg-gray-100 dark:border-gray-100/50 dark:from-gray-100 dark:via-gray-400/50 text-black bg-black border-black/50 from-black via-gray-600/50 to-gray-600 to-gray-400 dark:text-gray-900');
/* Accent colors for docs UI (sidebar, TOC, prev/next) */
@source inline('from-gray-700 to-gray-900 text-gray-700 dark:text-gray-300');

/*
* Semantic heading classes — a convenience alias layer over the DS heading
* scale. `class="h1"` renders a complete heading (display font + size +
Expand Down
15 changes: 15 additions & 0 deletions src/styles/site.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
@import './app.css';

@source not '../components/game';
@source not '../components/visitor-chat';

/* Safelist for dynamic colors */
@source inline('{bg-blue-{4,5,6}00,bg-emerald-500,bg-purple-500,bg-pink-500,bg-cyan-500,bg-slate-{4,5}00,bg-twine-700,bg-orange-{5,6,7}00,bg-yellow-500,bg-lime-700,bg-red-500,bg-green-500}/{20,30,40,80}');
@source inline('{hover:{bg-blue-{4,5,6}00,bg-emerald-500,bg-purple-500,bg-pink-500,bg-cyan-500,bg-slate-{4,5}00,bg-twine-700,bg-orange-{5,6,7}00,bg-yellow-500,bg-lime-700,bg-red-500,bg-green-500}/40}');
/* Library `bgStyle` values, tinted via template strings in library chips */
@source inline('{bg-category-{framework,data,ui,performance,tooling},bg-fuchsia-500,bg-amber-500}/{30,40}');
@source inline('{hover:{bg-category-{framework,data,ui,performance,tooling},bg-fuchsia-500,bg-amber-500}/40}');
/* Black/gray-100 theme colors for ranger, config, devtools, mcp */
@source inline('dark:text-gray-100 dark:bg-gray-100 dark:border-gray-100/50 dark:from-gray-100 dark:via-gray-400/50 text-black bg-black border-black/50 from-black via-gray-600/50 to-gray-600 to-gray-400 dark:text-gray-900');
/* Accent colors for docs UI (sidebar, TOC, prev/next) */
@source inline('from-gray-700 to-gray-900 text-gray-700 dark:text-gray-300');
Loading