Grumpy hedgehog · celworld
seed

Grumpy hedgehog

grumpy_hedgehog v1Made by APIc4
Open in Playground

v1 cost

$0.219

API, priced from the call usage.

The run, with the maths
All 1 version$0.219

Budget

c4 · 42 lines
Shapes40 / 70
Triangles5,684 / 6,000
Draw calls3 / 4
States
walk · curl
Used in
No scene yet
Made
1asset grumpy_hedgehog "Grumpy hedgehog" complexity=4
2// a chibi hedgehog: a round peach belly under a dome of quills, a big scowling face with a pointed snout,
3// stubby legs; it breathes and glares about at rest, waddles on walk, and curls up with puffed quills on curl
4let S = .9..1.1
5let coat = walnut:3|barkA:2|redwood|iron
6let belly = peach:3|cream|skin2
7let tip = cream:3|honey|white
8let quillL = .95..1.2
9
10// body: the root bone, with the quill dome over the back
11ball body at=(0, .25*S, 0) r=(.19, .16, .22)*S color=belly segs=20 rings=12 joint
12ball back on=body half at=(0, -.02*S, -.04*S) r=(.2, .22, .24)*S color=coat segs=20 rings=10 joint
13limb leg x2 on=body row=(0, 0, .22*S) at=(.1*S, -.08*S, 0) mirror len=.12*S r=(.05, .045)*S color=belly segs=10 joint
14
15// quills: three rings up the dome and one on top
16cone quillLow x12 on=back surf=(0, 22) ring=6 lift=-.02*S h=.12*S*quillL r=.04*S r2=0 bands=[.62:tip] color=coat segs=6
17cone quillMid x9 on=back surf=(0, 50) ring=6 ring0=15 lift=-.02*S h=.13*S*quillL r=.04*S r2=0 bands=[.62:tip] color=coat segs=6
18cone quillHigh x6 on=back surf=(0, 76) ring=6 ring0=8 lift=-.02*S h=.12*S*quillL r=.04*S r2=0 bands=[.62:tip] color=coat segs=6
19cone quillTop on=back surf=(0, 90) lift=-.02*S h=.12*S*quillL r=.04*S r2=0 bands=[.62:tip] color=coat segs=6
20
21// head, snout, ears
22ball head on=body at=(0, .03*S, .19*S) r=(.15, .13, .14)*S color=belly segs=20 rings=12 joint
23cone snout on=head surf=(0, -6) lift=-.03*S h=.11*S r=.065*S r2=.026*S color=belly segs=12
24ball nose on=snout at=end r=.03*S color=inkDark ink=thin segs=8 rings=5
25ball ear on=head surf=(64, 42) upright mirror lift=-.015*S r=.05*S color=coat segs=10 rings=6
26face look on=head eyes=round mouth=cat spacing=30 eyeY=14 mouthY=-42 mouthW=.22 size=.2 brows=inkDark blush detail=.6
27
28// idle: breathe and glare about
29anim body breathe
30anim head ry sin amp=7 hz=.25
31anim head rx sin amp=3 hz=.4 phase=.3
32// walk: a side to side waddle
33anim walk: leg gait amp=32 hz=1.8 stagger=.5
34anim walk: body rz sin amp=6 hz=.9
35anim walk: body py bounce amp=.012 hz=3.6
36// curl: tuck the head, fold the legs, roll forward and puff the quills out
37anim curl: body rx keys=[0:0 .6:28 1:28] hz=1.2 once
38anim curl: head rx keys=[0:0 .6:50 1:50] hz=1.2 once
39anim curl: head pz keys=[0:0 .6:-.06 1:-.06] hz=1.2 once
40anim curl: head py keys=[0:0 .6:-.04 1:-.04] hz=1.2 once
41anim curl: leg rx keys=[0:0 .6:75 1:75] hz=1.2 once
42anim curl: back s keys=[0:0 .6:.14 1:.14] hz=1.2 once
43