20 Commits
Author SHA1 Message Date
kamilkrzywda 0f360d76cd fix: runtime Box3 scaling + Alpine null-safety
- Replaced hardcoded SPECIES_LENGTH with runtime Box3 measurement
  (model added to parent group BEFORE measuring, so full GLB
  hierarchy transforms are included in world matrices)
- All 9 species now render at correct target size (0.13-0.32u)
- Added optional chaining (?.) to all Alpine template expressions
  referencing store.selectedFish to prevent null-reference errors
- Guarded getFishValue/canBreed calls with null checks
2026-10-08 17:03:37 +00:00
kamilkrzywda 20ab0e91e4 fix: null-guard info panel (x-if) + add runtime scale debug logging 2026-10-08 05:36:44 +00:00
kamilkrzywda 88fb870dbb fix: remove clownfish (broken untextured scene model)
The clownfish GLB is a full aquarium scene (water plane, light, bubbles,
mirrored body) with no textures. It renders as a giant gray/white object
that obscures the tank. Replaced with a second blue_tang in the starter
lineup. 9 species remain.
2026-10-07 22:50:08 +00:00
kamilkrzywda df4fb24822 fix: replace Box3 auto-scale with measured modelLength per species
- Remove unreliable Box3.setFromObject scaling (broke for skinned meshes,
  control rigs, and scene-containing GLBs)
- Use measured vertex extents (scripts/measure-models.mjs) as modelLength
- Clownfish: hide Surface/TopLight/Bubbles/Mirrored nodes (GLB is a full
  scene, not just a fish) — eliminates the white box + giant fish bug
- All 10 species now have accurate scale factors
2026-10-07 18:17:43 +00:00
kamilkrzywda a1fd66d039 fix: per-species scale correction for skinned mesh fish
Box3.setFromObject measures skinned geometry in skeleton space (and may
use a stale cached bounding box), which does not match the GPU's actual
rendered extent (mesh.matrixWorld * skinning * position). Add a
per-species baseScale correction factor (rendered / box3) to FishSpec and
fold it into buildFish's scale calc so each GLB normalizes to its true
size.

Measured per GLB with three.js's exact skinning formula: most models
are 1.0. The skinned blendswap oscar (1.35) and knifefish (2.58) deviate
and are corrected. The clownfish GLB is a full scene (water 'Surface'
45.3, 'TopLight' 15, 'Bubbles' 3.4) plus a small skinned body (~8.3);
box3 is dominated by the water plane, so a baseScale can't fix it without
blowing up the scene geometry - left at 1.0 pending a clean re-export.
2026-10-07 15:19:16 +00:00
kamilkrzywda 8c4a7d45a5 fix: normalize GLB model scales to prevent oversized fish
The three Poly Pizza models (betta, blue_tang, flower_horn) rendered
giant (filling the tank) because each GLB had two 100x-scaled nodes
(Fish_Armature bone-parent + the skinned mesh node). three.js binds
skinned meshes with an identity bindMatrix and uses the GLB's
inverseBindMatrices verbatim, so the 100x node scales inflated the
rendered skinned extent ~100x relative to what Box3.setFromObject
reports. GLTFish's 'scale = targetLength / longest' therefore scaled
~100x too big.

Fix: pure GLB JSON-chunk edit (BIN chunk + all 6 animations preserved)
setting the bone-parent node scale to S=1/base and the mesh node scale
to 1, so Box3 == rendered extent == 1.0 and targetLength directly
controls fish size, matching the working models.
2026-10-07 14:49:55 +00:00
kamilkrzywda c5c18bdf5a feat: replace generic Quaternius fish with specific species (Betta, Blue Tang, Flower Horn) 2026-10-07 13:26:50 +00:00
kamilkrzywda fe024a9874 feat: integrate BlendSwap fish models (neon tetra, oscar, knifefish, clownfish, blueface angelfish)
- Added 4 new species to shop and genetics system
- Replaced maya's angelfish with higher-quality BlendSwap blueface angelfish
- New starter lineup: 12 fish (angelfish x2, goldfish, guppy x2, neon tetra x2, oscar, knifefish, clownfish, quaternius x2)
- Models: CC0 (angelfish, clownfish), CC-BY (neon tetra, oscar, knifefish by aeroplankton)
2026-10-07 13:18:13 +00:00
kamilkrzywda 6a4614e276 feat: dynamic fish add/remove, genetics visualization, full game loop (#13-#19)
- GLTFish: dynamic addFish/removeFish with fade, model caching, genetics applied
  (color hue/saturation shift, rarity emissive glow on fish meshes)
- Buy: spawns fish in 3D scene with random genetics + rarity roll
- Sell: fades out fish, removes from scene, credits money
- Breed: 1-3 babies with blended genetics + mutation, 60s cooldown
- Tank upgrade: resizes bounds, moves camera, updates capacity
- Fish growth: age-based value multiplier (baby/juvenile/adult)
- Full game loop: earn → breed for rarity → sell for profit → upgrade tank
2026-10-07 12:41:05 +00:00
kamilkrzywda eb50f3b56b feat: game state, persistence, UI framework (Alpine+Tailwind), economy system (#10, #11, #12)
- Game state with localStorage save/load + reset (type DELETE to confirm)
- Alpine.js + Tailwind CSS + Lucide UI overlay (HUD bar, shop modal, settings, toasts)
- Economy: fish prices, tank tier costs/capacities, rarity multipliers, sell value formula
- Genetic system: hue/saturation/size/speed/pattern/rarity/gender + breeding inheritance
- Fish selection via raycaster (click fish = select, click empty = drop food)
- Buy/Sell/Breed/Upgrade actions wired to game state
2026-10-07 12:38:18 +00:00
kamilkrzywda 6ef28b6dbd fix: flip camera parallax rotation to match mouse direction (#9) 2026-10-07 11:57:20 +00:00
kamilkrzywda c7427f9c61 feat: bubbles, food pellets & fish feeding behavior
- Bubbles.ts: rising bubble particles from 2 air stones (near plants),
  wobble + growth + fade near surface, 50-mesh pool
- Food.ts: auto-dropping food pellets (every 6-14s, 3-6 pieces) that
  float down and settle on the floor; manual drop via click
- GLTFish.ts: fish now notice food within 1.2 units, seek at 1.4x speed
  with faster turn rate, eat pellets within 0.15 units; faster tail beat
  while chasing
- main.ts: wires food + bubbles into render loop; click drops 4 pellets
2026-10-07 11:49:10 +00:00
kamilkrzywda 4893ee2f8c feat: replace procedural fish with GLB 3D models + tank decor
- 6 tropical fish (angelfish x2, goldfish x2, guppy x2) from maya's-aquarium-3d
- 4 Quaternius cute fish (Fish1 x2, Fish2, Fish3) with swim animations
- 2 plants + 3 rocks on the gravel floor
- Wandering AI with frame-rate-independent smoothing
- Quaternius fish rotated to match local +X forward axis
- .gitignore: add .env
2026-10-07 11:45:39 +00:00
kamilkrzywda 3bfef18767 chore: docker-compose + traefik deployment for aqua.dev.kkhost.pl (#8) 2026-10-07 09:22:39 +00:00
kamilkrzywda 770cc7115c feat: integration & visual polish - lighting, water tuning (#6) 2026-10-06 19:36:28 +00:00
kamilkrzywda c803ca97d3 feat: procedural fish with wandering AI & parallax camera (#7, #5) 2026-10-06 19:34:56 +00:00
kamilkrzywda b7489af394 feat: water shader with Fresnel, caustics & light shafts (#3) 2026-10-06 19:10:31 +00:00
kamilkrzywda 4492b7ace8 feat: tank geometry, glass, gravel & lighting (#1, #2) 2026-10-06 19:08:38 +00:00
kamilkrzywda c145869f20 feat: project scaffolding - Vite + TypeScript + Three.js (#4) 2026-10-06 19:06:14 +00:00
kamilkrzywda 425fb055a7 Initial commit 2026-10-06 18:58:06 +00:00