Ember pup · celworld
seed

Ember pup

emberpup v1Made by APIc4
Open in Playground

v1 cost

$0.208

API, priced from the call usage.

Time
49s
The run, with the maths
All 1 version$0.208

Budget

c4 · 49 lines
Shapes22 / 70
Triangles4,560 / 6,000
Draw calls3 / 4
States
idle · bark
Made
1asset emberpup "Ember pup" complexity=4
2// a chibi fire puppy: a round body on four short sturdy legs with coal-dark paws, a big head with
3// a pale snout, chunky pointed ears, an ember forelock, and a curled tail ending in a fat flickering flame.
4// Two states: idle (wag + breathe + flicker), bark (head bobs, sparkles burst at the mouth).
5let S = .95..1.1
6let earS = .9..1.12
7// colourways: 0 classic ember, 1 cherry coal, 2 rare shiny frost-flame
8let pal = 0:6|1:4|2:1
9let coatC = sel(pal, tangerine, cherry, lilac)
10let bellyC = sel(pal, cream, peach, white)
11let flameC = sel(pal, marigold, tangerine, aqua)
12let tipC = sel(pal, lemon, sunflower, white)
13let pawC = sel(pal, inkDark, #3a2a2e, navy)
14let irisC = sel(pal, walnut, walnut, grape)
15
16// body: the root bone on four stubby legs
17ball body at=(0, .26*S, 0) r=(.17, .16, .22)*S color=coatC under=bellyC segs=20 rings=12 joint
18limb leg x2 on=body row=(0, 0, .24*S) at=(.095*S, -.06*S, 0) mirror len=.15*S r=(.062, .055)*S color=coatC segs=8 joint
19ball paw on=leg at=end+(0, .01*S, .02*S) r=(.068, .05, .078)*S color=pawC segs=8 rings=5
20ball chest on=body surf=(0, 22) upright lift=-.08*S r=(.11, .1, .06)*S color=bellyC segs=12 rings=8
21
22// head: big and round, pale snout, button nose, big eyes
23ball head on=body at=(0, .17*S, .17*S) r=(.17, .155, .15)*S color=coatC under=bellyC segs=20 rings=14 joint
24ball snout on=head surf=(0, -20) upright lift=-.06*S r=(.085, .06, .07)*S color=bellyC segs=12 rings=8
25ball nose on=snout surf=(0, 18) lift=-.012*S r=(.028, .022, .022)*S color=inkDark segs=8 rings=5
26face look on=head eyes=round mouth=smile size=.25 spacing=28 eyeY=12 mouthY=-32 mouthW=.3 iris=irisC blush detail=.7
27cone ear on=head surf=(38, 48) lift=-.03*S mirror h=.15*S*earS r=.07*S r2=.012*S depth=.55 color=coatC segs=10
28cone inner on=ear at=(0, .012*S, .022*S) h=.11*S*earS r=.045*S r2=.008*S depth=.4 color=flameC segs=8
29cone tuft on=head surf=(0, 68) lift=-.02*S h=.09*S r=.045*S r2=.006*S depth=.6 color=flameC segs=8
30
31// tail: three links curling up and back, a fat flame on the last
32ball tail x3 on=body at=(0, .04*S, -.19*S) chain=(0, .06*S, -.05*S) rot=(-30, 0, 0) scale=.93 r=(.06, .06, .075)*S color=coatC segs=12 rings=7 joint
33ball ember on=tail at=(0, .05*S, -.02*S) r=(.075, .07, .075)*S color=flameC segs=10 rings=7 if=i==2 joint
34cone flame on=ember at=(0, .02*S, 0) h=.17*S r=.065*S r2=.005*S color=tipC segs=10
35
36// fx: embers rising off the tail flame; a sparkle burst at the mouth when barking
37fx puff on=flame at=top n=4 hz=.9 speed=.35 spread=14 gravity=-.3 size=.025 grow=1.6 color=tipC color2=flameC
38fx bark: sparkle on=snout at=front+(0, 0, .05) n=10 hz=1.6 spread=.15 size=.03
39
40// idle: wag, breathe, flicker
41anim idle: tail wag stagger=.12
42anim idle: body breathe
43anim idle: ember s sin amp=.12 hz=3
44anim idle: head sway amp=4 hz=.3
45// bark: the head bobs out each yap, body hops, tail wags hard, flame flares
46anim bark: head rx keys=[0:0 .25:-14 .5:6 .75:-10 1:0] hz=2
47anim bark: body py bounce amp=.02 hz=2
48anim bark: tail wag amp=35 hz=3 stagger=.1
49anim bark: ember s sin amp=.25 hz=5
50