Commit Graph
421 Commits
Author SHA1 Message Date
tresabhi 6ebb2810ad Merge branch 'main' into data-driven 2026-10-04 16:33:53 -05:00
TrèsAbhi c310e8475e Merge branch 'main' into reload-visualiser 2026-10-04 14:04:17 -05:00
TrèsAbhi 0539d69c7f Merge pull request #276 from Hitjack007/tank-title-and-loading-bars-difference 2026-10-04 13:57:50 -05:00
TrèsAbhi 89b8f25918 Merge branch 'main' into gun-depression-visualiser 2026-10-04 13:52:37 -05:00
tresabhi 9a659845f5 make spall icon not a button 2026-10-04 13:51:53 -05:00
Mark Greene 2e46ba79cf Fix: reload times show one decimal from a shared constant
The reload visualizer and the Firepower reload rows showed two decimals.

Add an exported `RELOAD_PRECISION` (1) in the reload visualizer and use it for the visualizer's times and placeholders and for the Firepower reload rows (per-shell reloads, reload and intra-clip).
2026-10-04 14:33:24 +13:00
Mark Greene 90006dfd2a Fix: loading bar too close to tank title
The hero loading bar was offset below the title by half the font size plus a fixed 16px. The title is centered as a line box, so its descenders and heavy caps reach lower than half the font size, and the fixed gap didn't grow with the title.

Offset the bar by 0.75 of the font size instead, so the gap scales with the title.
2026-10-04 14:14:57 +13:00
Mark Greene 98b555fa7e Fix: gun depression visualizer ignoring turret mount tilt
The gun flexibility visualizer at the bottom of the Tankopedia Firepower section computed depression/elevation purely from the raw gun `pitch.min`/`pitch.max` values, ignoring `initial_turret_rotation.pitch` (the tank's baked-in turret mount tilt). Every other place that reports gun depression/elevation already accounts for this offset; the visualizer was the outlier.

On tanks with a level turret mount the offset is zero, so it was invisible almost everywhere. Minotauro's turret sits pitched 3° forward, which made the visualizer's min/max/pitch stats and wedge shape disagree with the Firepower stats directly above it (e.g. 7°/-18° instead of 10°/15°).

**Changes:**
- `GunFlexibilityVisualizer/index.tsx`: fold the turret's initial pitch offset into `minPitch`, `maxPitch` and the displayed `pitch` stat, and into the drawn limit shape, the pitch dot and the pointer mapping, so the dashed neutrality circle sits at the displayed 0°.
- `GunFlexibilityVisualizer/components/CanvasContent.tsx`: nest the gun mesh inside a turret group carrying the same static tilt as its base rotation, so the mini 3D preview's live drag-pitch composes on top of it, mirroring `useTankTransform.ts`.
2026-10-04 13:38:20 +13:00
Mark Greene 0bdb66742b Feature: Add Spall Liner toggle to Tankopedia model viewer
## Summary
- Add a Spall Liner toggle button to the Tankopedia model viewer, placed alongside the existing Calibrated Shells / Enhanced Armor buttons. It's only shown for tanks that can actually equip Spall Liner.
- The toggle reads/writes the same `Duel.protagonist.provisions` array as the Provisions tab, so both stay in sync automatically.
- If a provision slot is free, clicking equips Spall Liner immediately. If all slots are full, a popover shows icons with a shuffle arrow so you can pick which active provision to swap out in one step.
- Buttons use the same medium rounding as the consumable buttons on the tank page.
- When Spall Liner is equipped, the Dynamic Armor 3D viewer's click-damage tooltip now applies the same 20% HE damage reduction Spall Liner grants in-game.
- Refactored the hardcoded `-0.2` HE damage coefficient in `tankCharacteristics.ts` into a shared constant so the Compare tool and the 3D viewer use a single source of truth.

## Scope
This only affects the single-tank Tankopedia page. The Firepower stats table (the viewed tank's own outgoing gun damage) is intentionally untouched, since a defensive damage reduction would be semantically backwards there. The Dynamic Armor viewer's click tooltip is the only place a "damage taken by this tank" number exists, so that's where the reduction is wired in.
2026-10-04 13:27:34 +13:00
TrèsAbhi 3b0af110d2 Merge branch 'main' into peekabo-dpm 2026-10-02 15:22:06 -07:00
tresabhi a5321ebde3 game mode banner with string ids 2026-10-02 17:05:25 -05:00
Mark Greene 7f9ee1f907 Remove equalizer beta badge 2026-10-02 18:27:10 +13:00
tresabhi 1f767af0b5 angles 2026-09-30 20:59:18 -05:00
tresabhi 593ae760e7 proto imports 2026-09-27 17:19:39 -05:00
tresabhi e5b44d4eb8 flatten armor dir 2026-09-27 16:46:22 -05:00
tresabhi e18d6f58f9 somewhat through PrimaryArmorSceneComponent 2026-09-27 16:26:28 -05:00
Mark Greene 281e4abec7 Add peekaboo DPM stat to Tankopedia firepower
Adds a **Peekaboo DPM** entry nested under DPM for single-shot guns, estimating damage per minute when only firing after resetting camouflage (or waiting out the reload, whichever is slower), assuming at least 10 seconds between shots.

- Shots per minute are capped at `60/10` for reloads faster than 10s, and fall back to `60/reload` otherwise
- The result is multiplied by the currently selected shell's damage and rounded
- An (i) icon next to the label opens a popover explaining the calculation
- The row is hidden for auto-loader/auto-reloader guns
- No percentile ranking bar is shown, since no dataset exists yet for this new stat
2026-09-25 09:22:08 +12:00
tresabhi 4247004b13 canvas 2026-09-23 17:25:51 -05:00
tresabhi 4fc57d7fc1 Merge branch 'main' into data-driven 2026-09-23 16:37:39 -05:00
tresabhi 347efa75fe add compatibility for string game mode ids 2026-09-23 16:31:35 -05:00
tresabhi 33bb8ead3c reorganize 2026-09-23 10:25:47 -05:00
tresabhi b6f9ae9187 some more updates to imports 2026-08-30 15:02:01 -05:00
tresabhi 5f737d940d rename methods 2026-08-30 14:26:08 -05:00
tresabhi a0111d8b69 intense contact shadows 2026-08-19 13:57:36 -05:00
tresabhi 5092d43e8e fix has pbr 2026-08-12 13:41:59 -05:00
tresabhi a44e2e9866 fix tank modes not switching 2026-08-11 19:45:09 -05:00
tresabhi bae2f253bc screenshot friendly contact shadows 2026-08-11 19:37:57 -05:00
tresabhi d485a463dd orange ground 2026-08-11 14:07:57 -05:00
tresabhi 3da1ed4d6c ground and sky color 2026-08-11 11:30:36 -05:00
tresabhi 051e9ec74a ground with shadows 2026-08-11 10:58:35 -05:00
tresabhi 486171f4db shadow focus and res 2026-08-11 10:52:33 -05:00
tresabhi 72de42a9ab performant ground 2026-08-11 10:38:36 -05:00
tresabhi 404e6625c0 remmove lghts 2026-08-11 10:35:41 -05:00
tresabhi 32e4bf3fd2 fading out fragment 2026-08-11 10:16:14 -05:00
tresabhi 0d1088fefb non pbr lihging 2026-08-11 10:01:34 -05:00
tresabhi 1a17d607fb move light target up 2026-08-11 09:56:58 -05:00
tresabhi c130da7f0e heheheha 2026-08-10 17:50:48 -05:00
tresabhi e2df4d35b8 flip lighitng and add metalness 2026-08-10 16:58:40 -05:00
tresabhi 7739dbd0a3 faster lighting 2026-08-10 16:42:35 -05:00
tresabhi 5bda754b6e branch names 2026-08-08 20:56:45 -05:00
tresabhi b26c5137f3 aliases 2026-08-06 20:01:50 -05:00
tresabhi b8742bae66 fix linting errors 2026-08-05 14:17:33 -05:00
tresabhi 9e4d9c7968 tank model and collision 2026-08-04 20:18:05 -05:00
tresabhi 996c9c05df game mode banners 2026-08-04 19:45:20 -05:00
tresabhi 33ebbbeb65 imports 2026-08-04 14:02:52 -05:00
tresabhi 1413475679 bigger floor and more aggressive light decay 2026-07-11 17:38:11 -05:00
tresabhi 86504e685e softer shadows 2026-07-11 17:33:37 -05:00
tresabhi 9df81044d1 increasing lighting angle to cover larger tanks 2026-07-11 17:29:44 -05:00
tresabhi c5fd7591ea complete lighting animation even if canvas is unfocused 2026-07-11 17:29:15 -05:00
tresabhi 5d2c63fed9 clean up some renderer stuff 2026-06-26 14:05:26 -05:00