# Battle Axe

> A chunky stylized battle axe standing upright on its pommel (about 0.9 m): wooden haft with leather grip wraps and metal langets, a forged iron head with bright sharpened edges and a top spike. Choose a double-bitted head or a single bearded blade with a back spike. Fits viking, dwarf and barbarian loadouts in fantasy RPGs.

![Battle Axe preview](https://codels.download/m/battle-axe.png)

Multi-view sheet (3/4, front, side, top): https://codels.download/m/battle-axe.sheet.png

## Facts

- Category: Items & Weapons › Weapons
- Size (W × H × D): 0.52 × 0.99 × 0.07 m — units are meters, +Y up, front faces +Z
- Origin: center of the base (y = 0)
- Triangles: 888 · Meshes: 20 · Materials: 4
- License: CC0-1.0 (Codels built-in)
- Tags: axe, battle-axe, low-poly, stylized, fantasy, medieval, viking, adventure, roguelike, rpg, hero-asset, weapon, metal, wood, game-ready, mobile-friendly, parametric, color-brown, color-gray, size-small, poly-low
- Page: https://codels.download/models/battle-axe

## Files

| Format | URL |
|---|---|
| three.js ES module (`createBattleAxe()`) | https://codels.download/m/battle-axe.js |
| React Three Fiber component (`<BattleAxe />`) | https://codels.download/m/battle-axe.jsx |
| Instancing module (`createBattleAxeInstances(count, place)`, one draw call per material) | https://codels.download/m/battle-axe.instanced.js |
| Standalone HTML demo | https://codels.download/m/battle-axe.html |
| glTF binary | https://codels.download/m/battle-axe.glb |
| glTF binary, Meshopt-compressed (2–3× smaller; GLTFLoader needs `setMeshoptDecoder(MeshoptDecoder)`) | https://codels.download/m/battle-axe.glb?compress=meshopt |
| glTF JSON | https://codels.download/m/battle-axe.gltf |
| OBJ (vertex colors) + MTL | https://codels.download/m/battle-axe.obj · https://codels.download/m/battle-axe.mtl |
| STL | https://codels.download/m/battle-axe.stl |
| CodelSpec JSON | https://codels.download/m/battle-axe.json |

## Parameters

Append them as query parameters to any URL above to get a customized variant (e.g. `?head=...`).

| Param | Type | Range / options | Default | Current |
|---|---|---|---|---|
| `head` | select | double \| single | double | double |
| `length` | number | 0.6 – 1.3 | 0.9 | 0.9 |
| `metal` | color | #rrggbb | #717a85 | #717a85 |
| `wood` | color | #rrggbb | #7a4e2c | #7a4e2c |

## Parts

- pommel (cylinder · iron)
- pommelKnob (sphere · iron)
- haft (cylinder · wood)
- wrap1 (cylinder · leather)
- wrap2 (cylinder · leather)
- wrap3 (cylinder · leather)
- wrap4 (cylinder · leather)
- wrap5 (cylinder · leather)
- wrap6 (cylinder · leather)
- socket (box · iron)
- collar (cylinder · iron)
- spike (cone · iron)
- langetF (box · iron)
- langetB (box · iron)
- bladeR (extrude · iron)
- edgeR (extrude · edge)
- bladeL (extrude · iron)
- edgeL (extrude · edge)
- rivetF (sphere · edge)
- rivetB (sphere · edge)

## How to use

Save the code below as `battle-axe.js`, then:

```js
import { createBattleAxe } from './battle-axe.js';
const model = createBattleAxe();
scene.add(model);
```

## Code

```js
/**
 * Battle Axe — Codels 3D model library (https://codels.download/models/battle-axe)
 * License: CC0-1.0 · Units: meters · Y-up · Front: +Z · Origin: center of the base (y = 0)
 * Triangles: 888 · Size (W × H × D): 0.52 × 0.99 × 0.07 m
 *
 * Usage:
 *   import { createBattleAxe } from './battle-axe.js';
 *   
 *   const model = createBattleAxe();
 *   model.position.set(0, 0, 0);
 *   scene.add(model);
 */
import * as THREE from 'three';

const deg = THREE.MathUtils.degToRad;

// Extrude a 2D outline along Z (centered). bevel = [thickness, size, segments].
function extrude(outline, depth, holes = [], bevel = null) {
  const shape = new THREE.Shape(outline.map(([x, y]) => new THREE.Vector2(x, y)));
  for (const hole of holes) shape.holes.push(new THREE.Path(hole.map(([x, y]) => new THREE.Vector2(x, y))));
  const options = bevel
    ? { depth, bevelEnabled: true, bevelThickness: bevel[0], bevelSize: bevel[1], bevelSegments: bevel[2] }
    : { depth, bevelEnabled: false };
  return new THREE.ExtrudeGeometry(shape, options).translate(0, 0, -depth / 2);
}

export function createBattleAxe() {
  const root = new THREE.Group();
  root.name = 'BattleAxe';

  // Materials
  const ironMat = new THREE.MeshStandardMaterial({ name: 'iron', color: 0x717a85, roughness: 0.45, metalness: 0.7, flatShading: true });
  const edgeMat = new THREE.MeshStandardMaterial({ name: 'edge', color: 0xdfe5ec, roughness: 0.3, metalness: 0.75, flatShading: true });
  const woodMat = new THREE.MeshStandardMaterial({ name: 'wood', color: 0x7a4e2c, roughness: 0.85, flatShading: true });
  const leatherMat = new THREE.MeshStandardMaterial({ name: 'leather', color: 0x3d2617, roughness: 0.9, flatShading: true });

  // Shared geometries
  const cylinderGeo = new THREE.CylinderGeometry(0.0245, 0.0245, 0.016, 8);
  const boxGeo = new THREE.BoxGeometry(0.014, 0.1, 0.006);
  const sphereGeo = new THREE.SphereGeometry(0.01, 5, 3);

  // Parts
  const pommel = new THREE.Mesh(new THREE.CylinderGeometry(0.026, 0.03, 0.04, 8), ironMat);
  pommel.name = 'pommel';
  pommel.position.set(0, 0.02, 0);
  root.add(pommel);
  const pommelKnob = new THREE.Mesh(new THREE.SphereGeometry(0.02, 6, 4), ironMat);
  pommelKnob.name = 'pommelKnob';
  pommelKnob.position.set(0, 0.018, 0);
  pommelKnob.scale.set(1, 0.8, 1);
  root.add(pommelKnob);
  const haft = new THREE.Mesh(new THREE.CylinderGeometry(0.019, 0.022, 0.87, 8), woodMat);
  haft.name = 'haft';
  haft.position.set(0, 0.465, 0);
  root.add(haft);
  const wrap1 = new THREE.Mesh(cylinderGeo, leatherMat);
  wrap1.name = 'wrap1';
  wrap1.position.set(0, 0.06, 0);
  wrap1.rotation.set(0, 0, deg(14));
  root.add(wrap1);
  const wrap2 = new THREE.Mesh(cylinderGeo, leatherMat);
  wrap2.name = 'wrap2';
  wrap2.position.set(0, 0.086, 0);
  wrap2.rotation.set(0, 0, deg(14));
  root.add(wrap2);
  const wrap3 = new THREE.Mesh(cylinderGeo, leatherMat);
  wrap3.name = 'wrap3';
  wrap3.position.set(0, 0.112, 0);
  wrap3.rotation.set(0, 0, deg(14));
  root.add(wrap3);
  const wrap4 = new THREE.Mesh(cylinderGeo, leatherMat);
  wrap4.name = 'wrap4';
  wrap4.position.set(0, 0.138, 0);
  wrap4.rotation.set(0, 0, deg(14));
  root.add(wrap4);
  const wrap5 = new THREE.Mesh(cylinderGeo, leatherMat);
  wrap5.name = 'wrap5';
  wrap5.position.set(0, 0.164, 0);
  wrap5.rotation.set(0, 0, deg(14));
  root.add(wrap5);
  const wrap6 = new THREE.Mesh(cylinderGeo, leatherMat);
  wrap6.name = 'wrap6';
  wrap6.position.set(0, 0.19, 0);
  wrap6.rotation.set(0, 0, deg(14));
  root.add(wrap6);
  const socket = new THREE.Mesh(new THREE.BoxGeometry(0.066, 0.17, 0.05), ironMat);
  socket.name = 'socket';
  socket.position.set(0, 0.8, 0);
  root.add(socket);
  const collar = new THREE.Mesh(new THREE.CylinderGeometry(0.032, 0.032, 0.02, 8), ironMat);
  collar.name = 'collar';
  collar.position.set(0, 0.705, 0);
  root.add(collar);
  const spike = new THREE.Mesh(new THREE.ConeGeometry(0.024, 0.11, 4), ironMat);
  spike.name = 'spike';
  spike.position.set(0, 0.94, 0);
  spike.rotation.set(0, deg(45), 0);
  root.add(spike);
  const langetF = new THREE.Mesh(boxGeo, ironMat);
  langetF.name = 'langetF';
  langetF.position.set(0, 0.67, 0.0205);
  root.add(langetF);
  const langetB = new THREE.Mesh(boxGeo, ironMat);
  langetB.name = 'langetB';
  langetB.position.set(0, 0.67, -0.0205);
  root.add(langetB);
  const bladeR = new THREE.Mesh(extrude([[0.03, -0.05], [0.075, -0.038], [0.105, -0.065], [0.135, -0.1], [0.1638, -0.1263], [0.1942, -0.0901], [0.2134, -0.0469], [0.22, 0], [0.2134, 0.0469], [0.1942, 0.0901], [0.1638, 0.1263], [0.135, 0.1], [0.105, 0.065], [0.075, 0.038], [0.03, 0.05]], 0.014, [], [0.008, 0.006, 1]), ironMat);
  bladeR.name = 'bladeR';
  bladeR.position.set(0, 0.8, 0);
  root.add(bladeR);
  const edgeR = new THREE.Mesh(extrude([[0.1778, -0.1603], [0.2103, -0.1278], [0.2347, -0.089], [0.2499, -0.0456], [0.255, 0], [0.2499, 0.0456], [0.2347, 0.089], [0.2103, 0.1278], [0.1778, 0.1603], [0.1638, 0.1263], [0.1942, 0.0901], [0.2134, 0.0469], [0.22, 0], [0.2134, -0.0469], [0.1942, -0.0901], [0.1638, -0.1263]], 0.012, [], [0.004, 0.004, 1]), edgeMat);
  edgeR.name = 'edgeR';
  edgeR.position.set(0, 0.8, 0);
  root.add(edgeR);
  const bladeL = new THREE.Mesh(extrude([[-0.03, -0.05], [-0.075, -0.038], [-0.105, -0.065], [-0.135, -0.1], [-0.1638, -0.1263], [-0.1942, -0.0901], [-0.2134, -0.0469], [-0.22, 0], [-0.2134, 0.0469], [-0.1942, 0.0901], [-0.1638, 0.1263], [-0.135, 0.1], [-0.105, 0.065], [-0.075, 0.038], [-0.03, 0.05]], 0.014, [], [0.008, 0.006, 1]), ironMat);
  bladeL.name = 'bladeL';
  bladeL.position.set(0, 0.8, 0);
  root.add(bladeL);
  const edgeL = new THREE.Mesh(extrude([[-0.1778, -0.1603], [-0.2103, -0.1278], [-0.2347, -0.089], [-0.2499, -0.0456], [-0.255, 0], [-0.2499, 0.0456], [-0.2347, 0.089], [-0.2103, 0.1278], [-0.1778, 0.1603], [-0.1638, 0.1263], [-0.1942, 0.0901], [-0.2134, 0.0469], [-0.22, 0], [-0.2134, -0.0469], [-0.1942, -0.0901], [-0.1638, -0.1263]], 0.012, [], [0.004, 0.004, 1]), edgeMat);
  edgeL.name = 'edgeL';
  edgeL.position.set(0, 0.8, 0);
  root.add(edgeL);
  const rivetF = new THREE.Mesh(sphereGeo, edgeMat);
  rivetF.name = 'rivetF';
  rivetF.position.set(0, 0.84, 0.026);
  root.add(rivetF);
  const rivetB = new THREE.Mesh(sphereGeo, edgeMat);
  rivetB.name = 'rivetB';
  rivetB.position.set(0, 0.84, -0.026);
  root.add(rivetB);

  root.traverse((o) => {
    if (o.isMesh) {
      o.castShadow = true;
      o.receiveShadow = true;
    }
  });
  return root;
}

export default createBattleAxe;
```

---
Codels — 3D models as code for three.js. Search more: https://codels.download/api/v1/models?q=<query> · Guide: https://codels.download/llms.txt
