React 19 component library built with Vite, TypeScript, and Tailwind CSS.
- Raw/source assets:
apps/dawnlight/asset-origin(gitignored) - Optimized output:
apps/dawnlight/asset-optimized(commit-safe by default)
pnpm --dir apps/dawnlight run assets:optimizeOptional flags:
node apps/dawnlight/scripts/optimize-gltf-assets.mjs --dry-run
node apps/dawnlight/scripts/optimize-gltf-assets.mjs --texture-size 1024 --animation-texture-size 16 --texture-compress webp
node apps/dawnlight/scripts/optimize-gltf-assets.mjs --extract-textures truePipeline behavior:
- Recursively scans
asset-origin/**/*.glb - Writes optimized files to mirrored folders in
asset-optimizedusing lowercase kebab-case names:<character>.glband<character>-anim.glb - For non-animation files, also writes a texture bundle (
.gltf + textures) under:asset-optimized/<character>/textures/ - Uses
meshoptcompression - Treats files containing
animationin their filename as animation packs and aggressively downsizes textures - Writes
asset-optimized/optimization-report.jsonfor manual review before R2 upload
Meshy API keys must stay outside the repo. Put local development secrets in an ignored env file:
apps/dawnlight/.env.local
Generate the apple basket source GLB:
pnpm --dir apps/dawnlight run assets:meshy -- \
--name apple-basket \
--prompt "low poly hand basket with four red apples inside, small curved handle, cozy voxel survival game prop, warm woven wood, game ready glb"<
347B
/span>Optimize only Meshy source assets, then publish the optimized GLB to Vite public assets:
pnpm --dir apps/dawnlight run assets:optimize -- \
--source asset-origin/meshy \
--output asset-optimized/meshy
pnpm --dir apps/dawnlight run assets:meshy:publishOpen the game with ?meshyPreview=apple-basket, ?meshyPreview=apple, or ?meshyPreview=apple-round to render a generated model as an in-world development preview.
Avatar smile expression uses this CDN texture directly:
https://static.dawn.lt/glb/leafy-explorer/smile.webp