# Snowman

> A jolly low-poly snowman built from three slightly lumpy snowballs, with a carrot nose, coal eyes, smile and buttons, twiggy stick arms, a cozy knitted scarf and an optional black top hat. Adjust height and scarf color. Head and arms are pivoted groups — a perfect winter village NPC, Christmas decoration or festive level landmark.

![Snowman preview](https://codels.download/m/snowman.png)

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

## Facts

- Category: Characters › Humanoids
- Size (W × H × D): 1.20 × 1.58 × 0.73 m — units are meters, +Y up, front faces +Z
- Origin: center of the base (y = 0)
- Triangles: 1,336 · Meshes: 31 · Materials: 7
- License: CC0-1.0 (Codels built-in)
- Tags: holiday, snowman, cartoon, low-poly, stylized, christmas, garden, snow, village, party-game, platformer, character, decoration, npc, game-ready, mobile-friendly, parametric, color-white, size-medium, poly-low
- Page: https://codels.download/models/snowman

## Files

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

## Parameters

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

| Param | Type | Range / options | Default | Current |
|---|---|---|---|---|
| `height` | number | 0.8 – 2.4 | 1.6 | 1.6 |
| `scarf` | color | #rrggbb | #d8433b | #d8433b |
| `hat` | boolean | true \| false | true | true |

## Parts

- snowman (group)
  - base (group)
    - bottomBall (sphere · snow)
  - body (group)
    - middleBall (sphere · snow)
    - button1 (icosahedron · coal)
    - button2 (icosahedron · coal)
    - button3 (icosahedron · coal)
  - armL (group)
    - stickL (cylinder · stick)
    - twigL1 (cylinder · stick)
    - twigL2 (cylinder · stick)
  - armR (group)
    - stickR (cylinder · stick)
    - twigR1 (cylinder · stick)
    - twigR2 (cylinder · stick)
  - scarf (group)
    - scarfWrap (torus · scarf)
    - scarfBand1 (torus · scarfStripe)
    - scarfBand2 (torus · scarfStripe)
    - scarfTail (group)
      - scarfEnd (box · scarf)
      - scarfEndStripe (box · scarfStripe)
      - fringe (box · scarf)
      - fringe (box · scarf)
      - fringe (box · scarf)
  - head (group)
    - headBall (sphere · snow)
    - eyeL (icosahedron · coal)
    - eyeR (icosahedron · coal)
    - carrotNose (cone · carrot)
    - smile1 (icosahedron · coal)
    - smile2 (icosahedron · coal)
    - smile3 (icosahedron · coal)
    - smile4 (icosahedron · coal)
    - smile5 (icosahedron · coal)
    - topHat (group)
      - hatBrim (cylinder · hat)
      - hatCrown (cylinder · hat)
      - hatBand (cylinder · scarf)

## How to use

Save the code below as `snowman.js`, then:

```js
import { createSnowman } from './snowman.js';
const model = createSnowman();
scene.add(model);
```

## Code

```js
/**
 * Snowman — Codels 3D model library (https://codels.download/models/snowman)
 * License: CC0-1.0 · Units: meters · Y-up · Front: +Z · Origin: center of the base (y = 0)
 * Triangles: 1,336 · Size (W × H × D): 1.20 × 1.58 × 0.73 m
 *
 * Usage:
 *   import { createSnowman } from './snowman.js';
 *   
 *   const model = createSnowman();
 *   model.position.set(0, 0, 0);
 *   scene.add(model);
 */
import * as THREE from 'three';

const deg = THREE.MathUtils.degToRad;

// Deterministic vertex displacement (organic low-poly look).
function jitter(geometry, amount, seed) {
  const pos = geometry.attributes.position;
  const h = (a, b, c, s) => {
    let x = Math.imul(a, 73856093) ^ Math.imul(b, 19349663) ^ Math.imul(c, 83492791) ^ Math.imul(s, 2654435761);
    x = Math.imul(x ^ (x >>> 16), 2246822507);
    x = Math.imul(x ^ (x >>> 13), 3266489909);
    return ((x ^ (x >>> 16)) >>> 0) / 4294967295 - 0.5;
  };
  for (let i = 0; i < pos.count; i++) {
    const x = pos.getX(i), y = pos.getY(i), z = pos.getZ(i);
    const qx = Math.round(x * 1000), qy = Math.round(y * 1000), qz = Math.round(z * 1000);
    pos.setXYZ(i, x + h(qx, qy, qz, seed) * 2 * amount, y + h(qx, qy, qz, seed + 1) * 2 * amount, z + h(qx, qy, qz, seed + 2) * 2 * amount);
  }
  pos.needsUpdate = true;
  geometry.computeVertexNormals();
  return geometry;
}

export function createSnowman() {
  const root = new THREE.Group();
  root.name = 'Snowman';

  // Materials
  const snowMat = new THREE.MeshStandardMaterial({ name: 'snow', color: 0xf3f6fb, roughness: 0.75, flatShading: true });
  const coalMat = new THREE.MeshStandardMaterial({ name: 'coal', color: 0x25232a, roughness: 0.6, flatShading: true });
  const carrotMat = new THREE.MeshStandardMaterial({ name: 'carrot', color: 0xf08a24, roughness: 0.6, flatShading: true });
  const stickMat = new THREE.MeshStandardMaterial({ name: 'stick', color: 0x6b4527, roughness: 0.9, flatShading: true });
  const scarfMat = new THREE.MeshStandardMaterial({ name: 'scarf', color: 0xd8433b, roughness: 0.95, flatShading: true });
  const scarfStripeMat = new THREE.MeshStandardMaterial({ name: 'scarfStripe', color: 0xf4efe6, roughness: 0.95, flatShading: true });
  const hatMat = new THREE.MeshStandardMaterial({ name: 'hat', color: 0x24222b, roughness: 0.5, flatShading: true });

  // Shared geometries
  const icosahedronGeo = new THREE.IcosahedronGeometry(0.032, 0);
  const cylinderGeo = new THREE.CylinderGeometry(0.016, 0.022, 0.5, 5);
  const cylinderGeo2 = new THREE.CylinderGeometry(0.009, 0.012, 0.14, 4);
  const cylinderGeo3 = new THREE.CylinderGeometry(0.009, 0.012, 0.12, 4);
  const torusGeo = new THREE.TorusGeometry(0.1848, 0.057, 6, 3, 0.4488);
  const boxGeo = new THREE.BoxGeometry(0.025, 0.05, 0.04);
  const icosahedronGeo2 = new THREE.IcosahedronGeometry(0.03, 0);
  const icosahedronGeo3 = new THREE.IcosahedronGeometry(0.018, 0);

  // Parts
  const snowman = new THREE.Group();
  snowman.name = 'snowman';
  snowman.scale.setScalar(0.9639);
  root.add(snowman);
  const base = new THREE.Group();
  base.name = 'base';
  snowman.add(base);
  const bottomBall = new THREE.Mesh(jitter(new THREE.SphereGeometry(0.37, 12, 9), 0.012, 3), snowMat);
  bottomBall.name = 'bottomBall';
  bottomBall.position.set(0, 0.333, 0);
  bottomBall.scale.set(1, 0.9, 1);
  base.add(bottomBall);
  const body = new THREE.Group();
  body.name = 'body';
  snowman.add(body);
  const middleBall = new THREE.Mesh(jitter(new THREE.SphereGeometry(0.28, 12, 9), 0.01, 5), snowMat);
  middleBall.name = 'middleBall';
  middleBall.position.set(0, 0.7893, 0);
  middleBall.scale.set(1, 0.9, 1);
  body.add(middleBall);
  const button1 = new THREE.Mesh(icosahedronGeo, coalMat);
  button1.name = 'button1';
  button1.position.set(0, 0.8993, 0.2399);
  body.add(button1);
  const button2 = new THREE.Mesh(icosahedronGeo, coalMat);
  button2.name = 'button2';
  button2.position.set(0, 0.7893, 0.268);
  button2.rotation.set(deg(30), deg(50), 0);
  body.add(button2);
  const button3 = new THREE.Mesh(icosahedronGeo, coalMat);
  button3.name = 'button3';
  button3.position.set(0, 0.6793, 0.2399);
  button3.rotation.set(deg(60), deg(100), 0);
  body.add(button3);
  const armL = new THREE.Group();
  armL.name = 'armL';
  armL.position.set(0.22, 0.8493, 0);
  armL.rotation.set(0, deg(-10), deg(-58));
  snowman.add(armL);
  const stickL = new THREE.Mesh(cylinderGeo, stickMat);
  stickL.name = 'stickL';
  stickL.position.set(0, 0.25, 0);
  armL.add(stickL);
  const twigL1 = new THREE.Mesh(cylinderGeo2, stickMat);
  twigL1.name = 'twigL1';
  twigL1.position.set(-0.045, 0.45, 0);
  twigL1.rotation.set(0, 0, deg(38));
  armL.add(twigL1);
  const twigL2 = new THREE.Mesh(cylinderGeo3, stickMat);
  twigL2.name = 'twigL2';
  twigL2.position.set(0.035, 0.38, 0);
  twigL2.rotation.set(0, 0, deg(-35));
  armL.add(twigL2);
  const armR = new THREE.Group();
  armR.name = 'armR';
  armR.position.set(-0.22, 0.8493, 0);
  armR.rotation.set(0, deg(10), deg(48));
  snowman.add(armR);
  const stickR = new THREE.Mesh(cylinderGeo, stickMat);
  stickR.name = 'stickR';
  stickR.position.set(0, 0.25, 0);
  armR.add(stickR);
  const twigR1 = new THREE.Mesh(cylinderGeo2, stickMat);
  twigR1.name = 'twigR1';
  twigR1.position.set(0.045, 0.45, 0);
  twigR1.rotation.set(0, 0, deg(-38));
  armR.add(twigR1);
  const twigR2 = new THREE.Mesh(cylinderGeo3, stickMat);
  twigR2.name = 'twigR2';
  twigR2.position.set(-0.035, 0.38, 0);
  twigR2.rotation.set(0, 0, deg(35));
  armR.add(twigR2);
  const scarf = new THREE.Group();
  scarf.name = 'scarf';
  snowman.add(scarf);
  const scarfWrap = new THREE.Mesh(new THREE.TorusGeometry(0.1848, 0.055, 6, 14), scarfMat);
  scarfWrap.name = 'scarfWrap';
  scarfWrap.position.set(0, 0.9959, 0);
  scarfWrap.rotation.set(deg(90), 0, 0);
  scarf.add(scarfWrap);
  const scarfBand1 = new THREE.Mesh(torusGeo, scarfStripeMat);
  scarfBand1.name = 'scarfBand1';
  scarfBand1.position.set(0, 0.9959, 0);
  scarfBand1.rotation.set(deg(90), 0, deg(-60));
  scarf.add(scarfBand1);
  const scarfBand2 = new THREE.Mesh(torusGeo, scarfStripeMat);
  scarfBand2.name = 'scarfBand2';
  scarfBand2.position.set(0, 0.9959, 0);
  scarfBand2.rotation.set(deg(90), 0, deg(10));
  scarf.add(scarfBand2);
  const scarfTail = new THREE.Group();
  scarfTail.name = 'scarfTail';
  scarfTail.position.set(0.1, 0.9859, 0.2148);
  scarfTail.rotation.set(deg(14), deg(20), deg(12));
  scarf.add(scarfTail);
  const scarfEnd = new THREE.Mesh(new THREE.BoxGeometry(0.11, 0.3, 0.05), scarfMat);
  scarfEnd.name = 'scarfEnd';
  scarfEnd.position.set(0, -0.15, 0);
  scarfTail.add(scarfEnd);
  const scarfEndStripe = new THREE.Mesh(new THREE.BoxGeometry(0.115, 0.04, 0.055), scarfStripeMat);
  scarfEndStripe.name = 'scarfEndStripe';
  scarfEndStripe.position.set(0, -0.22, 0);
  scarfTail.add(scarfEndStripe);
  const fringe = new THREE.Mesh(boxGeo, scarfMat);
  fringe.name = 'fringe';
  fringe.position.set(-0.035, -0.32, 0);
  scarfTail.add(fringe);
  const fringe2 = new THREE.Mesh(boxGeo, scarfMat);
  fringe2.name = 'fringe';
  fringe2.position.set(0, -0.32, 0);
  scarfTail.add(fringe2);
  const fringe3 = new THREE.Mesh(boxGeo, scarfMat);
  fringe3.name = 'fringe';
  fringe3.position.set(0.035, -0.32, 0);
  scarfTail.add(fringe3);
  const head = new THREE.Group();
  head.name = 'head';
  head.position.set(0, 0.9909, 0);
  snowman.add(head);
  const headBall = new THREE.Mesh(jitter(new THREE.SphereGeometry(0.21, 12, 9), 0.007, 7), snowMat);
  headBall.name = 'headBall';
  headBall.position.set(0, 0.168, 0);
  head.add(headBall);
  const eyeL = new THREE.Mesh(icosahedronGeo2, coalMat);
  eyeL.name = 'eyeL';
  eyeL.position.set(0.075, 0.228, 0.18);
  eyeL.scale.set(1, 1.2, 0.8);
  head.add(eyeL);
  const eyeR = new THREE.Mesh(icosahedronGeo2, coalMat);
  eyeR.name = 'eyeR';
  eyeR.position.set(-0.075, 0.228, 0.18);
  eyeR.scale.set(1, 1.2, 0.8);
  head.add(eyeR);
  const carrotNose = new THREE.Mesh(new THREE.ConeGeometry(0.038, 0.2, 6), carrotMat);
  carrotNose.name = 'carrotNose';
  carrotNose.position.set(0, 0.168, 0.29);
  carrotNose.rotation.set(deg(85), 0, 0);
  head.add(carrotNose);
  const smile1 = new THREE.Mesh(icosahedronGeo3, coalMat);
  smile1.name = 'smile1';
  smile1.position.set(-0.0682, 0.1145, 0.1833);
  head.add(smile1);
  const smile2 = new THREE.Mesh(icosahedronGeo3, coalMat);
  smile2.name = 'smile2';
  smile2.position.set(-0.0366, 0.0986, 0.1868);
  head.add(smile2);
  const smile3 = new THREE.Mesh(icosahedronGeo3, coalMat);
  smile3.name = 'smile3';
  smile3.position.set(0, 0.093, 0.1882);
  head.add(smile3);
  const smile4 = new THREE.Mesh(icosahedronGeo3, coalMat);
  smile4.name = 'smile4';
  smile4.position.set(0.0366, 0.0986, 0.1868);
  head.add(smile4);
  const smile5 = new THREE.Mesh(icosahedronGeo3, coalMat);
  smile5.name = 'smile5';
  smile5.position.set(0.0682, 0.1145, 0.1833);
  head.add(smile5);
  const topHat = new THREE.Group();
  topHat.name = 'topHat';
  topHat.position.set(0.01, 0.3318, -0.01);
  topHat.rotation.set(deg(-6), 0, deg(-9));
  head.add(topHat);
  const hatBrim = new THREE.Mesh(new THREE.CylinderGeometry(0.25, 0.25, 0.03, 12), hatMat);
  hatBrim.name = 'hatBrim';
  hatBrim.position.set(0, 0.015, 0);
  topHat.add(hatBrim);
  const hatCrown = new THREE.Mesh(new THREE.CylinderGeometry(0.15, 0.14, 0.27, 12), hatMat);
  hatCrown.name = 'hatCrown';
  hatCrown.position.set(0, 0.165, 0);
  topHat.add(hatCrown);
  const hatBand = new THREE.Mesh(new THREE.CylinderGeometry(0.146, 0.146, 0.05, 12), scarfMat);
  hatBand.name = 'hatBand';
  hatBand.position.set(0, 0.06, 0);
  topHat.add(hatBand);

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

export default createSnowman;
```

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