diff --git a/guides/deployment.mdx b/guides/deployment.mdx index 0a29fcb5..b23f2f48 100644 --- a/guides/deployment.mdx +++ b/guides/deployment.mdx @@ -438,15 +438,30 @@ assets/ ### CORS Configuration for Assets -The assets CDN is configured with CORS headers to allow cross-origin loading from game clients: +The assets CDN is configured with CORS headers to allow cross-origin loading from game clients. This is essential for loading 3D models, textures, audio, and manifests from the CDN. +**Cloudflare R2 Configuration:** ``` Access-Control-Allow-Origin: * Access-Control-Allow-Methods: GET, HEAD, OPTIONS Access-Control-Max-Age: 86400 ``` -This enables the game client to load 3D models, textures, and manifests from the CDN regardless of the client's origin. The CORS configuration is automatically applied to all assets served from Cloudflare R2. +**Local Development (Caddyfile):** +``` +:8080 { + root * /assets + file_server browse + + header { + Access-Control-Allow-Origin * + Access-Control-Allow-Methods "GET, HEAD, OPTIONS" + Access-Control-Max-Age 86400 + } +} +``` + +This enables the game client to load assets from the CDN regardless of the client's origin. The CORS configuration is automatically applied to all assets served from both Cloudflare R2 (production) and the local Caddy server (development). ### Development CDN Fallback diff --git a/wiki/data/overview.mdx b/wiki/data/overview.mdx index f948e4ff..5b3f68db 100644 --- a/wiki/data/overview.mdx +++ b/wiki/data/overview.mdx @@ -779,7 +779,7 @@ The `biomes.json` manifest defines terrain biomes with vegetation, mobs, and env - **Desert** - Arid wasteland with sand dunes (difficulty 2) - **Lakes** - Water bodies and fishing spots (difficulty 0) - **Swamp** - Murky wetlands with twisted vegetation (difficulty 1) -- **Canyon** - Red-rock canyon lands with terraced mesas (difficulty 2, NEW) +- **Canyon** - Red-rock canyon lands with terraced mesas and steep slopes (difficulty 2, maxSlope: 2.5) ### Biome Vegetation Layers @@ -801,7 +801,10 @@ interface VegetationLayer { } ``` -**Recent Updates**: +**Recent Updates** (March 2026): +- **Canyon biome added**: New red-rock canyon biome with terraced mesas, steep slopes (maxSlope: 2.5), and sparse desert vegetation +- **Model bounds manifest**: Pre-calculated bounding boxes and footprints for all 3D models in `model-bounds.json` for efficient collision detection +- **CORS headers**: Cross-origin asset loading support added to CDN (Caddyfile configuration) - **165 tree model variants** added across 12 tree types (bamboo, birch, cactus, chinaPine, coconut, dead, fir, knotwood, maple, oak, palm, pine) with 3 LOD levels each - **Tree model depth normalization**: All fir variants aligned to fir_03's minY (-59.46), all maple variants aligned to maple_01's minY (-114.76) to prevent floating - **Maple tree recoloring**: Leaves changed to warm vermillion red-orange (#D04838) @@ -814,10 +817,7 @@ interface VegetationLayer { - Tree density reduced in plains biome (8 → 5) - Mushroom clustering varies by biome (cluster size 3-8) - Firemaking fire 3D model added (`models/firemaking-fire/firemaking-fire.glb`) -- Tree model scales adjusted for better visual proportions (March 2026) -- Fir and maple model root depths normalized to prevent floating (March 2026) - - All fir variants aligned to fir_03's minY (-59.46) - - All maple variants aligned to maple_01's minY (-114.76) +- Tree model scales adjusted for better visual proportions ---