# Weapon model attribution

The four 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) |

- 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.js`](../../../scripts/build-weapon-models.js)
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.
  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 and 1216 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.
- 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 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.js
```

The script also writes `src/weapons/model-rig.js`, the measured muzzle
positions and bounds the game reads.
