creatures/species.js
252 lines · in natura-src-1.0.0.zip as natura/creatures/species.js · a module · its entry in the module reference
// creatures/species.js -- CreatureSpecies: the DATA layer of the creature factory.
//
// Pure data, no drawing and no behaviour: each entry is a set of proportions, colours and
// feature flags that the renderer (creatures/render.js) turns into an animal, and the facade
// (creatures/creatures.js) looks up by name. Adding a creature is adding a row here; the fox,
// fawn, boar and crow were each one row, not new drawing code -- that is the whole point of the
// split. Two body plans live in two tables: SPECIES (quadrupeds) and BIRDS (bipeds).
//
// Field glossary (quadruped): L/H body length+height, leg length + thigh fraction, neck length +
// neckAng rest angle, head/snout size, ear size, tail length + tailAng + optional bushy (brush)
// width, hump (shoulder rise), gait {stride,lift,duty,speed, hop?}, col [base, mid-shade, dark],
// belly colour, optional patches[] (soft coat markings), spots (juvenile dapple), fur {n,len,w}
// (coat density/length/weight), and feature flags canid / horns / mane / tusks / sock / *Tip / nose.
// Bird fields are documented on the BIRDS table below.
//
// UMD (node test / window.CreatureSpecies). No dependencies.
(function (root, factory) {
if (typeof module !== 'undefined' && module.exports) module.exports = factory();
else root.CreatureSpecies = factory();
})(typeof self !== 'undefined' ? self : this, function () {
'use strict';
// ---- QUADRUPEDS ----------------------------------------------------------------------------
const SPECIES = {
deer: { L:66,H:23, leg:58,thigh:.5, neck:32,neckAng:-.82, head:9,snout:11, ear:9, tail:8,tailAng:.5,
horns:true, hoof:true, hump:.1, gait:{stride:22,lift:12,duty:.64,speed:1}, col:['#a9895f','#8a6d47','#5c4630'], belly:'#c9ad82',
patches:[{x:-.37,y:-.10,rx:.10,ry:.52,c:'#ecdcbb',a:.85}, {x:.40,y:.34,rx:.10,ry:.22,c:'#d8c39a',a:.55}], tailTip:'#f0e8d4', flagTail:true, earInner:'#d9c6a6', nose:'#26190f', fur:{n:120,len:3.6,w:0.7} },
wolf: { L:72,H:21, leg:50,thigh:.52, neck:22,neckAng:-.3, head:11,snout:11, ear:7, tail:26,tailAng:.5, bushy:8, canid:true,
horns:false, hump:.16, gait:{stride:26,lift:11,duty:.58,speed:1.15}, col:['#6b6b73','#54545c','#3a3a42'], belly:'#8a8a92',
patches:[{x:.05,y:-.32,rx:.37,ry:.4,c:'#3b3b44',a:.55}, {x:-.14,y:.34,rx:.32,ry:.26,c:'#a4a4ac',a:.42}], tailTip:'#26262c', eyeCol:'#9a7a34', nose:'#17171b', fur:{n:185,len:7,w:1.0} },
hare: { L:34,H:17, leg:28,thigh:.42, neck:10,neckAng:-.55, head:8,snout:7, ear:16, tail:5,tailAng:-.3, puffTail:true, whiskers:true, tailTip:'#f4efe6',
horns:false, hump:.28, gait:{stride:30,lift:24,duty:.34,speed:1.5,hop:true}, col:['#b09a7d','#8f795c','#6a5842'], belly:'#d8cbb2',
patches:[{x:-.02,y:-.34,rx:.34,ry:.34,c:'#6a5842',a:.5}], earTip:'#241b13', earInner:'#e6d3b8', nose:'#2a1c14', fur:{n:150,len:3.2,w:0.7} },
fox: { L:50,H:15, leg:38,thigh:.5, neck:15,neckAng:-.35, head:9,snout:11, ear:9, tail:26,tailAng:.5, bushy:9, canid:true,
horns:false, hump:.14, gait:{stride:20,lift:11,duty:.5,speed:1.35}, col:['#c26a34','#a4552a','#6e3a1f'], belly:'#efe4d2',
patches:[{x:.30,y:.36,rx:.15,ry:.26,c:'#f3ecdc',a:.8}, {x:.02,y:-.30,rx:.36,ry:.32,c:'#d47b3e',a:.35}],
sock:'#33210f', tailTip:'#f2ece0', earTip:'#241108', eyeCol:'#8a5a22', nose:'#1a1109', fur:{n:150,len:4.8,w:0.8} },
// a COYOTE: the prairie canid -- greyer + LEGGIER + bigger than the fox, a grizzled tan-grey coat with a darker
// saddle, warm rufous ear-backs, and the signature BLACK-tipped bushy tail (the fox's tip is white -- the tell).
coyote:{ L:56,H:16, leg:44,thigh:.5, neck:16,neckAng:-.32, head:10,snout:12, ear:10, tail:24,tailAng:.5, bushy:10, canid:true,
horns:false, hump:.12, gait:{stride:22,lift:10,duty:.52,speed:1.2}, col:['#a5906d','#87724f','#5a4a34'], belly:'#e7ddc9',
patches:[{x:.30,y:.36,rx:.15,ry:.24,c:'#eae1d0',a:.7}, {x:-.04,y:-.34,rx:.52,ry:.30,c:'#67573f',a:.55}],
sock:'#4a3826', tailTip:'#241a12', earTip:'#7a5a38', eyeCol:'#7a5a2a', headCol:'#93805f', nose:'#211710', fur:{n:150,len:4.6,w:0.8} },
// a deer FAWN: juvenile proportions -- small round body, a big head on a short neck, gangly legs, no antlers, a spotted coat
fawn: { L:38,H:19, leg:37,thigh:.46, neck:14,neckAng:-.72, head:9,snout:6, ear:9, tail:6,tailAng:.4,
horns:false, hoof:true, hump:.06, gait:{stride:16,lift:11,duty:.6,speed:1.05}, col:['#b08153','#956b42','#66492e'], belly:'#dabd93',
patches:[{x:-.34,y:-.04,rx:.12,ry:.5,c:'#f0e2c4',a:.78}], spots:{rows:2,cols:6,c:'#f3e7cd',a:.7,r:1.7},
tailTip:'#f4ecda', flagTail:true, earInner:'#e0cbaa', nose:'#241708', fur:{n:95,len:3,w:0.6} },
// a wild-boar PIGLET: small and round, short legs, no tusks/mane yet -- the classic pale longitudinal STRIPES
piglet:{ L:32,H:16, leg:18,thigh:.5, neck:7,neckAng:.05, head:8,snout:8, ear:5, tail:5,tailAng:.5, hoof:true,
horns:false, hump:.12, gait:{stride:13,lift:8,duty:.58,speed:1.2}, col:['#9a6f45','#7a5636','#4c3824'], belly:'#b58f60',
stripes:{n:5, c:'#eaddc2', a:0.5}, nose:'#1a1009', snoutDisc:true, fur:{n:70,len:2.6,w:0.55} },
// a wild BOAR: a heavy-shouldered wedge, head carried low, short legs, a bristly dorsal mane and upcurved tusks
boar: { L:58,H:26, leg:32,thigh:.5, neck:12,neckAng:.14, head:12,snout:16, ear:7, tail:7,tailAng:.55,
horns:false, hoof:true, hump:.42, gait:{stride:17,lift:9,duty:.6,speed:1.0}, col:['#4c4239','#3a3128','#231c16'], belly:'#5a4e42',
mane:true, tusks:true, patches:[{x:-.28,y:.14,rx:.3,ry:.34,c:'#6b5d4e',a:.3}], nose:'#171009', snoutDisc:true, fur:{n:150,len:6.5,w:1.1} },
// a brown BEAR: massive and bulky, a shoulder hump, short heavy legs, a big low-carried head, small round ears, a stub tail
bear: { L:76,H:40, leg:40,thigh:.5, neck:15,neckAng:-.12, head:16,snout:13, ear:9, earRound:true, tail:5,tailAng:.3, periscope:true, plantigrade:true,
horns:false, hump:.34, gait:{stride:18,lift:8,duty:.62,speed:0.9}, col:['#5a4632','#463526','#2a1f15'], belly:'#6a563e',
patches:[{x:.14,y:-.28,rx:.34,ry:.34,c:'#6a563e',a:.24}], nose:'#130c06', fur:{n:200,len:8.5,w:1.2} },
// a COUGAR: a lithe low-slung cat -- a domed forehead + a SHORT rounded muzzle, upright ears, a very LONG heavy tail
cougar:{ L:66,H:20, leg:44,thigh:.5, neck:20,neckAng:-.16, head:12,snout:8, ear:8, tail:42,tailAng:.15, bushy:4, feline:true,
horns:false, hump:.08, gait:{stride:24,lift:10,duty:.55,speed:1.3}, col:['#b8946a','#9a7a52','#6a5236'], belly:'#e2d4ba',
patches:[{x:.05,y:-.28,rx:.34,ry:.3,c:'#c9a878',a:.28}], tailTip:'#3a2a1a', eyeCol:'#a8933e', nose:'#4a2a20', fur:{n:150,len:4,w:0.8} },
// the LION and LIONESS of the paracosm island (their 3D bodies: quad/; the 2D renderer does not yet draw lionMane,
// the ruff round the head and neck, nor the tail's tuft beyond tailTip)
lion: { L:74,H:27, leg:44,thigh:.52, neck:16,neckAng:-.12, head:15,snout:9, ear:7, tail:36,tailAng:.18, feline:true, lionMane:true,
horns:false, hump:.12, gait:{stride:26,lift:10,duty:.58,speed:1.1}, col:['#c29a5b','#a67f45','#6f5230'], belly:'#e6d2ae',
patches:[{x:.05,y:-.28,rx:.34,ry:.3,c:'#b48a50',a:.3}], tailTip:'#2e2014', eyeCol:'#b0923e', nose:'#5a3326', fur:{n:150,len:4,w:0.8} },
lioness:{ L:68,H:23, leg:42,thigh:.52, neck:16,neckAng:-.14, head:13,snout:9, ear:7, tail:34,tailAng:.18, feline:true,
horns:false, hump:.1, gait:{stride:26,lift:10,duty:.56,speed:1.2}, col:['#c9a468','#ad8751','#6f5230'], belly:'#ead9b8',
patches:[{x:.05,y:-.28,rx:.34,ry:.3,c:'#bb9459',a:.28}], tailTip:'#2e2014', eyeCol:'#b0923e', nose:'#5a3326', fur:{n:140,len:3.6,w:0.75} },
// a plains ZEBRA (the island's herd; the 2D renderer does not yet draw zebraStripes)
zebra: { L:70,H:28, leg:52,thigh:.5, neck:30,neckAng:-.7, head:16,snout:12, ear:9, tail:20,tailAng:.35, hoof:true, zebraStripes:true,
horns:false, hump:.08, gait:{stride:24,lift:10,duty:.62,speed:1.1}, col:['#f2efe6','#d9d4c6','#1d1b1a'], belly:'#f4f1ea',
tailTip:'#1d1b1a', nose:'#1d1b1a', fur:{n:90,len:2.4,w:0.6} },
// a BADGER: a low-slung crepuscular digger -- a grey body over a black belly + black legs (sock), a shoulder hump for
// digging, small round ears, a pointed snout, and the iconic WHITE head (headCol) crossed by a BLACK eye-STRIPE
// (faceStripe) running from the nose through the eye to the ear. Two genuinely new features: a head colour distinct
// from the body, and the striped face mask.
badger:{ L:56,H:18, leg:26,thigh:.48, neck:10,neckAng:-.05, head:10,snout:12, ear:5, earRound:true, tail:6,tailAng:.3,
horns:false, hump:.24, gait:{stride:14,lift:7,duty:.62,speed:0.95}, col:['#8f8f93','#727277','#4a4a50'], belly:'#28282c',
headCol:'#e9e7e0', faceStripe:'#191920', sock:'#242428', nose:'#131318', earTip:'#efeee9', fur:{n:150,len:4,w:0.9} },
// a HEDGEHOG: a tiny round dawn forager whose whole back is a SPINE COAT (the new feature) -- overlapping pale-banded
// quills that lie back when calm and stand ERECT when threatened, driven by the SAME 'bristle' channel as the badger's
// hackles (piloerection generalised). Pointed insectivore snout, short legs, a high rounded (spiny) back.
hedgehog:{ L:28,H:16, leg:11,thigh:.5, neck:6,neckAng:0, head:7,snout:9, ear:3.5, tail:2,tailAng:.2,
horns:false, hump:.30, gait:{stride:9,lift:5,duty:.62,speed:0.9}, col:['#8a7256','#6e5a44','#463628'], belly:'#c9b596',
spines:{n:165, len:8, band:'#eaddc0'}, nose:'#160e07', fur:{n:40,len:2,w:0.5} },
// a FIELD MOUSE: the smallest of the roster and the owl's prey -- a tiny round body, a short neck, a blunt snout,
// big round ears, and a long thin whippy TAIL, on a quick twitchy scurry. Reads as "the thing that gets hunted".
mouse: { L:16,H:8, leg:7,thigh:.5, neck:3,neckAng:0, head:6,snout:6, ear:4.5, earRound:true, tail:17,tailAng:.05, nakedTail:true, tailNaked:'#c2a59c', sitNibble:true,
horns:false, hump:.12, gait:{stride:7,lift:4,duty:.48,speed:1.7}, col:['#8a7a60','#6a5b46','#40352a'], belly:'#cabfa4',
earInner:'#d8c4a8', whiskers:true, nose:'#1a1009', fur:{n:30,len:1.5,w:0.4} },
// a FIELD VOLE: the barn owl's usual prey (the paracosm's meadow has six) -- the mouse's cousin but a different
// silhouette: a chunky blunt LOAF, small round ears half-sunk in shaggy grizzled fur, a short FURRED tail a third
// of the body, a blunt rounded snout, and a slower, lower scurry. (3D twin: paracosm/tools/build_vole.py.)
vole: { L:18,H:10, leg:5,thigh:.5, neck:2,neckAng:0, head:6.5,snout:3.5, ear:2.4, earRound:true, tail:6,tailAng:.05, sitNibble:true,
horns:false, hump:.18, gait:{stride:6,lift:3,duty:.52,speed:1.2}, col:['#77684f','#5b4e3d','#3a3027'], belly:'#b9ae99',
earInner:'#c9aa98', whiskers:true, nose:'#2a1a14', fur:{n:46,len:2.2,w:0.5} },
// a BISON: a massive front-heavy plains grazer -- an enormous shaggy shoulder HUMP, a low-carried heavy
// head crowned with short curved BOVID horns and a shaggy BEARD + mane, short sturdy legs, hindquarters
// tapering small behind the great forehand. Dark chocolate, shaggier + paler over the hump and head.
bison: { L:82,H:34, leg:32,thigh:.5, neck:15,neckAng:.22, head:17,snout:11, ear:6, earRound:true, tail:9,tailAng:.5,
horns:false, bovidHorns:true, beard:true, hoof:true, hump:.6, foreHump:true, mane:true,
gait:{stride:15,lift:6,duty:.66,speed:0.8}, col:['#4a3a2c','#38291d','#221610'], belly:'#3a2c20',
headCol:'#574433', nose:'#140c07', fur:{n:210,len:9,w:1.3} },
// a BISON CALF ("red dog"): reddish-tan, small, the shoulder hump barely started, no beard/horns/mane yet, a peppier gait
bisoncalf: { L:50,H:25, leg:23,thigh:.5, neck:11,neckAng:.26, head:12,snout:8, ear:5, earRound:true, tail:7,tailAng:.5,
horns:false, bovidHorns:false, beard:false, hoof:true, hump:.22, foreHump:true, mane:false,
gait:{stride:12,lift:5,duty:.64,speed:1.0}, col:['#a35c36','#8c4c2a','#703c20'], belly:'#b06a3e',
headCol:'#9a5430', nose:'#2a1408', fur:{n:120,len:5,w:1.0} },
// a RED SQUIRREL: a small rusty tree-rodent whose SIGNATURE is a huge bushy TAIL held ARCHED up over the back
// in a big plume (the new capability: archTail -- a tail that sweeps UP off the rump and curls forward over the
// body, vs every other bushy tail which trails LOW behind). A big dark eye, tufted ears, prominent whiskers, a
// quick bounding scamper. Its upright sit-and-eat pose is the natural next pass (a form built on this species).
squirrel:{ L:24,H:13, leg:12,thigh:.5, neck:6,neckAng:-.5, head:7,snout:5, ear:5, earTip:'#3a2414', tail:20,tailAng:.5, bushy:11, archTail:true, whiskers:true,
horns:false, hump:.16, gait:{stride:12,lift:11,duty:.4,speed:1.4,hop:true}, col:['#a85a2c','#8a4a22','#5a3016'], belly:'#efe7d6',
patches:[{x:.30,y:.34,rx:.14,ry:.26,c:'#efe7d6',a:.72}], earInner:'#c98a5a', nose:'#1a1009', fur:{n:95,len:3.6,w:0.7} },
// a RIVER OTTER: the operator's own benchmark for a real animal ("otters exist in nature, cats not so much") --
// a long, low, sleek semi-aquatic mustelid: a serpentine body carried close to the ground, short legs, a rounded
// head with a broad blunt muzzle + small round ears + prominent whiskers, a silvery-pale throat, and a THICK
// muscular TAIL that tapers to a point (the new S.tailW fattens the base). Sleek short fur. The badger's aquatic
// cousin: distinguished by the low-LONG body and the long heavy tapering tail (vs the badger's stub).
otter: { L:52,H:13, leg:17,thigh:.5, neck:12,neckAng:-.16, head:9,snout:7, ear:4, earRound:true, tail:32,tailAng:.08, tailW:1.7, periscope:true,
horns:false, hump:.06, gait:{stride:15,lift:8,duty:.56,speed:1.1}, col:['#6a4e39','#523c2c','#31241a'], belly:'#c2b399',
patches:[{x:.36,y:.28,rx:.15,ry:.30,c:'#cdbfa6',a:.72}], earInner:'#b59b7c', whiskers:true, nose:'#160e07', fur:{n:130,len:2.6,w:0.55} },
// a MEERKAT: the archetypal upright PEERER (operator: "extend the upright peer") -- a small slender mongoose
// that rears onto its hind feet into a SENTINEL stand (it wears the same periscope upright form as the otter),
// scanning the sky for hawks. A grizzled sandy-tan coat over a pale belly, a POINTED snout (snout>head so the
// shared upright form draws a long narrow muzzle), dark EYE-MASK patches, small dark ears, and a long THIN
// tapering tail (tailW<1, the inverse of the otter's thick prop) braced as a tripod when it stands.
meerkat:{ L:30,H:11, leg:20,thigh:.5, neck:11,neckAng:-.24, head:7,snout:10, ear:3.5, earRound:true, tail:30,tailAng:.1, tailW:0.55, periscope:true,
horns:false, hump:.14, gait:{stride:12,lift:7,duty:.54,speed:1.3}, col:['#c3a97a','#a4895c','#6a563a'], belly:'#e2d4b6',
eyeMask:'#2a2016', patches:[{x:.0,y:-.30,rx:.36,ry:.30,c:'#8a7048',a:.28}], earTip:'#241a12', tailTip:'#241a12', whiskers:true, nose:'#180f08', fur:{n:90,len:2.4,w:0.5} },
// an ELEPHANT: a great grey bulk on columnar legs, a domed head almost without a neck, huge fanning EARS, a stub
// tail and curved TUSKS -- and its defining new capability, the prehensile TRUNK (a long tapering muscular nose
// that hangs from the face and curls and sways). The operator's own named test organism ("a pack of elephants").
elephant:{ L:98,H:58, leg:54,thigh:.5, neck:12,neckAng:-.10, head:21,snout:8, ear:20, earRound:true, bigEar:true, tail:20,tailAng:.08, tailW:0.45, ivory:true, columnar:true, trunk:true,
horns:false, hump:.06, gait:{stride:18,lift:6,duty:.68,speed:0.75}, col:['#8b8782','#6f6b67','#45423f'], belly:'#9c978f',
nose:'#2a2724', fur:{n:36,len:1.4,w:0.5} },
};
// ---- BIRDS -- a different body plan: biped, an ovoid body over two backward-bending legs, a folded
// wing with primaries, a beak, a fanned tail. Fields: bodyL/bodyH size, bodyAng tilt, neck length +
// neckAng + neckCurve (S-bend) + optional neckW, head/beak/beakH size, beakType, optional beakCol,
// eye radius, wing + prim (primary count), tailBase/tail/tailN/tailFan/tailAng, leg/legW/toe/foreToes,
// col + back/breast/belly/cheek colours, optional sheen (iridescence) + legCol/legCol2, gait with
// headbob + peck.
const BIRDS = {
// a plump perching songbird: upright body, orange breast, short conical beak, a cocked tail
robin: { bodyL:42, bodyH:30, bodyAng:-0.5, neck:14, neckAng:-1.15, neckCurve:0.05, head:11, beak:9, beakH:5, beakType:'cone',
eye:2.1, wing:30, prim:4, tailBase:[-0.42,-0.05], tail:24, tailN:5, tailFan:0.42, tailAng:0.7,
leg:22, legW:1.7, toe:6, foreToes:3,
col:['#8a7a63','#6d6150','#463d30'], back:'#7a6b56', breast:'#cf6a34', belly:'#efe7db', cheek:'#b8ab97',
gait:{hop:true, stride:22, lift:18, duty:0.36, speed:1.3, headbob:0.5, peck:0.7} },
// a tall wader: horizontal body, a long S-curved neck, a dagger beak, stilt legs, a slow deliberate walk
heron: { bodyL:52, bodyH:26, bodyAng:-0.05, neck:58, neckAng:-1.0, neckCurve:0.5, neckW:5, head:9, beak:22, beakH:4, beakType:'dagger',
eye:1.8, eyeCol:'#d8c24e', wing:40, prim:5, tailBase:[-0.46,-0.02], tail:16, tailN:4, tailFan:0.28, tailAng:0.25,
leg:54, legW:1.6, toe:10, foreToes:3,
col:['#8a929a','#6f767d','#474c52'], back:'#7c848c', breast:'#aab0b6', belly:'#c4c8cc', cheek:'#9aa0a6', plume:'#2f343c', crown:'#33383f',
gait:{hop:false, stride:24, lift:15, duty:0.6, speed:0.7, headbob:0.25, peck:1.0} },
// a corvid: heavy dark body, a stout dagger beak, a strutting walk (not a hop), a blue-black sheen so it reads on the dark ground
crow: { bodyL:45, bodyH:29, bodyAng:-0.12, neck:15, neckAng:-0.78, neckCurve:0.14, neckW:7, head:12, beak:13, beakH:7, beakType:'dagger', beakCol:'#0e0f14',
eye:2.2, wing:42, prim:6, tailBase:[-0.44,-0.02], tail:26, tailN:6, tailFan:0.34, tailAng:0.18,
leg:19, legW:2.6, toe:9, foreToes:3,
col:['#33363f','#22242c','#131419'], back:'#24262e', breast:'#1c1e25', belly:'#282a32', cheek:'#2c2f38', sheen:'#42506e',
legCol:'#26282f', legCol2:'#1a1c22',
gait:{hop:false, stride:18, lift:11, duty:0.58, speed:0.95, headbob:0.45, peck:0.6} },
// a dabbling DUCK: a broad low body, a short thick-necked head, a flat spatulate BILL, stubby orange legs, a waddle
duck: { bodyL:52, bodyH:27, bodyAng:-0.06, neck:15, neckAng:-0.8, neckCurve:0.18, neckW:7, head:12, beak:15, beakH:8, beakType:'bill', beakCol:'#cbb24e',
headCol:'#2d5a39', headSheen:'#4c8a58', neckRing:'#f2eee2', speculum:'#33489a', // a MALLARD DRAKE: iridescent green head, white neck-ring, blue speculum
eye:2, wing:38, prim:5, tailBase:[-0.46,-0.04], tail:14, tailN:4, tailFan:0.3, tailAng:0.35,
leg:15, legW:2.3, toe:9, foreToes:3, legCol:'#c07a2a', legCol2:'#8a5418',
col:['#bcb8b0','#9c988f','#67635b'], back:'#7c7059', breast:'#6e4530', belly:'#c6c2ba', cheek:'#356043',
gait:{hop:false, stride:14, lift:8, duty:0.62, speed:0.85, headbob:0.3, peck:0.5} },
// a TAWNY OWL: a nocturnal raptor -- an upright compact body under a huge round head, almost no neck, ROUNDED
// wings and a short tail, feathered legs. Four genuinely new features force the model wider: a FACIAL DISC
// (the pale sound-funnel ruff, with a darker rim), FORWARD-FACING paired eyes (both on the front, not the
// side -- the owl stare), a small down-HOOKED raptor beak nested in the disc, and feathery EAR TUFTS. Cryptic
// BARRED underparts. Its signature MOTION is the head-swivel (the faceTurn pose channel), not a gait.
owl: { bodyL:40, bodyH:40, bodyAng:-0.92, neck:7, neckAng:-1.44, neckCurve:0.0, neckW:15, head:23, beak:7, beakH:7, beakType:'hook', beakCol:'#3b3128',
facialDisc:'#dccfb6', discRim:'#574934', forwardEyes:true, eyeCol:'#e2a726', earTufts:true, barred:'#40301e', brow:'#efe7d4',
eye:3.3, wing:33, prim:6, tailBase:[-0.4,0.02], tail:15, tailN:6, tailFan:0.32, tailAng:0.12,
leg:15, legW:3.0, toe:7, foreToes:2, legCol:'#c7b287', legCol2:'#93805c', feathLeg:true,
col:['#8a7355','#6e5a42','#443628'], back:'#7c6549', breast:'#c6b597', belly:'#dccfb6', cheek:'#c9bda4',
gait:{hop:false, stride:9, lift:6, duty:0.62, speed:0.75, headbob:0.12, peck:0.25} },
// a BARN OWL: the ghostly pale meadow-hunter -- reuses the owl machinery (forward eyes, hooked beak, facial disc)
// but as a DIFFERENT owl: a HEART-shaped white disc (the one new capability, discShape:'heart'), small close-set
// DARK eyes (eyeDark -- no amber iris), NO ear tufts, golden-buff back over pure-white speckled underparts. The
// exemplar of "a capability built for one creature becomes another's defining feature" (cf. hedgehog<-badger bristle).
barnowl:{ bodyL:40, bodyH:41, bodyAng:-0.95, neck:7, neckAng:-1.46, neckCurve:0.0, neckW:15, head:23, beak:7, beakH:7, beakType:'hook', beakCol:'#cbb492',
facialDisc:'#f2ece0', discShape:'heart', discRim:'#b89a6c', forwardEyes:true, eyeDark:true, eyeCol:'#120d0a', speckle:'#7a6038', brow:'#ffffff',
eye:2.7, wing:33, prim:6, tailBase:[-0.4,0.02], tail:15, tailN:6, tailFan:0.32, tailAng:0.12,
leg:15, legW:2.8, toe:7, foreToes:2, legCol:'#e6dcc6', legCol2:'#b7a988', feathLeg:true,
col:['#c6a866','#a98a4e','#7a6038'], back:'#c2a35e', breast:'#efe7d6', belly:'#f4efe4', cheek:'#efe7d6',
gait:{hop:false, stride:9, lift:6, duty:0.62, speed:0.75, headbob:0.12, peck:0.25} },
// a barn OWLET, five weeks old: the barn owl re-proportioned into a downy young -- a head nearly as big as the
// body, the body a plump pear of warm cream DOWN (no buff back yet), the heart disc white with a buff rim, stubby
// wings and almost no tail. (3D twin: paracosm/tools/build_owlets.py -- they sit in a row on the mill ridge.)
owlet: { bodyL:34, bodyH:38, bodyAng:-1.05, neck:5, neckAng:-1.5, neckCurve:0.0, neckW:16, head:22, beak:5, beakH:5, beakType:'hook', beakCol:'#e2b8ae',
facialDisc:'#fbf8f3', discShape:'heart', discRim:'#c8a878', forwardEyes:true, eyeDark:true, eyeCol:'#120d0a', speckle:'#e6dcc9', brow:'#ffffff',
eye:2.9, wing:20, prim:3, tailBase:[-0.38,0.02], tail:6, tailN:4, tailFan:0.3, tailAng:0.12,
leg:11, legW:3.2, toe:6, foreToes:2, legCol:'#e2c2b8', legCol2:'#b99a90', feathLeg:true,
col:['#e9e0cf','#d6cbb6','#a89b82'], back:'#e0d4bd', breast:'#f1ebdf', belly:'#f3eee4', cheek:'#f1ebdf',
gait:{hop:false, stride:5, lift:4, duty:0.7, speed:0.4, headbob:0.35, peck:0.1} },
// a KESTREL: the roster's first DIURNAL raptor (the owls are nocturnal) -- a small upright falcon with a blue-grey
// head + a rufous back, a buff breast, a fierce dark eye, and TWO genuinely new capabilities: a side-view HOOKED
// bill (beakType 'hook' outside the owl's facial disc, with a yellow CERE at its base) and the diagnostic falcon
// MALAR stripe -- a dark 'moustache' dropping from below the eye down the cheek. Both are the codebase's pattern
// (a feature built for one creature later serves a peregrine or a hobby).
kestrel:{ bodyL:40, bodyH:28, bodyAng:-0.5, neck:12, neckAng:-1.12, neckCurve:0.06, neckW:6, head:12, beak:9, beakH:8, beakType:'hook', beakCol:'#33291f', cere:'#e6b83a',
headCol:'#7f8892', malar:'#241f18', barred:'#6a4527',
eye:2.5, eyeCol:'#241a10', wing:34, prim:6, tailBase:[-0.44,-0.02], tail:22, tailN:6, tailFan:0.3, tailAng:0.16,
leg:16, legW:2.2, toe:8, foreToes:3, legCol:'#e6b83a', legCol2:'#a8842a',
col:['#b0793f','#96622f','#5e3c1e'], back:'#a86a34', breast:'#d8b785', belly:'#e6d3ad', cheek:'#c2ae86',
gait:{hop:false, stride:12, lift:8, duty:0.6, speed:0.9, headbob:0.2, peck:0.3} },
};
// ---- SNAKES ----------------------------------------------------------------------------------
// A third BODY PLAN: limbless. No legs, no gait-of-feet -- the whole body is a tapering ribbon on a
// traveling undulation (slither), with a wedge head, an eye, and a flicking forked tongue. Fields:
// L body length, girth max half-width, waves undulation crests + amp (fraction of L), head wedge
// length + headW cheek-width factor, col [dorsal-shade, base, dark], belly, pupil 'vert'|'round',
// eyeCol; markings: zigzag {c,a,n,amp} (adder) or collar {c,c2,a} (grass snake). Adding a snake is a
// row here + (only for a genuinely new marking) a small gated block in render.js -- same rule as the
// other two plans.
const SNAKES = {
// an ADDER (Vipera berus): a stocky grey-brown viper with the bold dark ZIGZAG down the back, a
// wedge head and a vertical (slit) pupil in a coppery eye. The dorsal zigzag is the new capability.
adder: { plan:'snake', L:122, girth:9, waves:2.5, amp:.112, head:16, headW:1.4,
col:['#b7a884','#94825f','#5b4d36'], belly:'#5b5243', pupil:'vert', eyeCol:'#b0842c',
zigzag:{ c:'#20190f', a:.94, n:22, amp:.5 } },
// a GRASS SNAKE (Natrix natrix): a long slim olive snake with the bright YELLOW-and-black COLLAR on
// the nape, a round pupil, plain flanks. Slender and quicker; a gentler read than the adder.
grass: { plan:'snake', L:150, girth:7, waves:2.15, amp:.132, head:13, headW:1.12,
col:['#6b7a4d','#54633a','#333d22'], belly:'#cbc99c', pupil:'round', eyeCol:'#33401b',
collar:{ c:'#ecd646', c2:'#20220f', a:.95 } },
// a CORN SNAKE (Pantherophis): a warm rust-orange colubrid patterned with darker SADDLES down the
// back -- dark-edged dorsal blotches, the new marking (distinct from the zigzag and the collar).
// Round pupil, slim, gentle. Its saddles are the "new species extends the model" capability here.
corn: { plan:'snake', L:138, girth:7.5, waves:2.3, amp:.122, head:12, headW:1.12,
col:['#cf8a4c','#ac6a34','#6e4420'], belly:'#ecdfc2', pupil:'round', eyeCol:'#a8641e',
saddles:{ c:'#8a3f1f', edge:'#3a1c0e', a:.9, n:14 } },
};
const isBird = name => Object.prototype.hasOwnProperty.call(BIRDS, name);
const isSnake = name => Object.prototype.hasOwnProperty.call(SNAKES, name);
const get = name => SPECIES[name] || BIRDS[name] || SNAKES[name] || null; // resolve a name to its def, any table
return { SPECIES, BIRDS, SNAKES, get, isBird, isSnake };
});