# Weapon model attribution

The weapons are authored Sketchfab models licensed under **Creative
Commons Attribution 4.0 International (CC BY 4.0)**. Each downloaded GLB's
embedded `asset.extras` names the author, the licence and the source page.

| File | Model | Author | Source |
| --- | --- | --- | --- |
| `makarov.glb` | Makarov PM / Пистолет Макарова (Free) | chyzhykov.roman ([chijikoff.roma](https://sketchfab.com/chijikoff.roma)) | [Sketchfab](https://sketchfab.com/3d-models/makarov-pm-free-d1fbaeb058334b8697810ac7a7ddcdd5) |
| `aks.glb` | AKS | Mateusz Woliński ([jeandiz](https://sketchfab.com/jeandiz)) | [Sketchfab](https://sketchfab.com/3d-models/aks-67eaf310bffa46698ac8e71d3a76e773) |
| `mosin.glb` | Mosin Nagant M91 30 PU sniper | Kaz Chesna ([Kazches](https://sketchfab.com/Kazches)) | [Sketchfab](https://sketchfab.com/3d-models/mosin-nagant-m91-30-pu-sniper-47e79809ba174f1c8d15954b38102309) |
| `mp133.glb` | Shotgun MR-133 (animated) | Vitaliy Marusev ([gluma](https://sketchfab.com/gluma)) | [Sketchfab](https://sketchfab.com/3d-models/shotgun-mr-133-animated-567b79c2367e4b0d8090a1bafd7cafcc) |
| `deagle.glb` | Desert Eagle | [ELIZION](https://sketchfab.com/ELIZION) | [Sketchfab](https://sketchfab.com/3d-models/desert-eagle-cabde59f5cf24effaf80536e35d04e95) |
| `ko38.glb` | Mosin`s carbine 1938 | e.belous ([egorbelous](https://sketchfab.com/egorbelous)) | [Sketchfab](https://sketchfab.com/3d-models/mosins-carbine-1938-99cbe39fccfd45cab54675b2fdf157c3) |
| `crossbow.glb` | Crossbow MK-150-A1 | Ghost_turtle ([asmohatta](https://sketchfab.com/asmohatta)) | [Sketchfab](https://sketchfab.com/3d-models/crossbow-mk-150-a1-a94d81208a5442b4ae9a32ae480f07d1) |

- License: [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/)
- Full license text: [Creative Commons legal code](https://creativecommons.org/licenses/by/4.0/legalcode)

## Project adaptation

[`scripts/build-weapon-models.ts`](../../../scripts/build-weapon-models.ts)
fetches the original downloads from the public
[Objaverse distribution](https://huggingface.co/datasets/allenai/objaverse) and
changes them for the game's viewmodel:

- The Makarov's spare empty magazine and the AKS's fixed bayonet are removed.
  The MP-133's loose shell and its loading animation are removed, as is the
  cartridge laid beside the Desert Eagle.
  The Makarov's spare full magazine stays in the file but is hidden in game.
- Each model is turned to point down -Z, scaled to the real weapon's overall
  length (161 mm, 880 mm, 1232 mm, 1216 mm, 273 mm, 1016 mm and 875 mm) and
  centred on its trigger.
  The MP-133's length comes from the artist's own 12-gauge shell. The AKS is
  also turned 2.4° so its barrel runs straight down the receiver's axis.
- The crossbow's orange-painted wood is darkened and dulled toward walnut in
  its base colour texture.
- Textures are re-encoded as WebP, at most 2048 px.

In game the slide, bolt carrier, pump, trigger and magazines move on their own, and
the Mosin's bolt plays the bolt-cycle part of Kaz Chesna's own animation. The
carbine's bolt is turned and drawn in game, and the crossbow's string, limbs and
bolt are posed in game; its own strings are hidden.
The meshes and texture artwork are otherwise the artists'. These are project
changes and do not imply endorsement by the authors.

Keep this attribution with redistributed copies of the models and their textures.

## Rebuilding

```bash
node scripts/build-weapon-models.ts
```

The script also writes `src/weapons/model-rig.ts`, the measured muzzle
positions and bounds the game reads.
