Smokit · celworld
seed

Smokit

smokit v1Made by APIc4
Open in Playground

v1 cost

$0.119

API, priced from the call usage.

Time
46s
The run, with the maths
All 1 version$0.119

Budget

c4 · 48 lines
Shapes30 / 70
Triangles4,956 / 6,000
Draw calls4 / 4
States
idle · puff
Used in
No scene yet
Made
1asset smokit "Smokit" complexity=4 float
2// a soot-sprite kitten that floats: a round smoky body under a big round head, tufted ears with
3// glowing insides, huge ember-ringed eyes, a glowing ember collar with beads, smoke-puff fluff
4// round the belly, stubby nub paws and a curling wisp tail with an ember tip.
5// colourways: soot (common), ash (common), rare shiny (lilac with aqua embers)
6let S = .92..1.08
7let earS = .9..1.15
8let shiny = chance(.1)
9let ash = chance(.45)
10let way = shiny*2 + (1-shiny)*ash
11let coatC = sel(way, iron:3|granite|tyre, greystone:2|concrete|silver, lilac:2|grape|bubblegum)
12let emberC = sel(way, tangerine:3|marigold|tomato, sunflower:2|lemon|marigold, aqua:2|mint|sky)
13let fluffC = light(coatC, .1)
14let pawC = light(coatC, .18)
15
16// body: the floating root bone
17ball body at=(0, .3*S, 0) r=(.19, .17, .18)*S color=coatC segs=16 rings=10 joint
18puff fluff x5 on=body ring=12 surf=(0, -18) upright lift=-.05*S r=(.09, .075, .09)*S color=fluffC segs=10 rings=6
19ball paw x2 on=body row=(0, 0, .14*S) at=(.08*S, -.14*S, 0) mirror r=(.05, .04, .05)*S color=pawC segs=8 rings=5
20
21// big chibi head
22ball head on=body at=(0, .24*S, .02*S) r=(.22, .2, .19)*S color=coatC segs=20 rings=14 joint
23puff tuft x3 on=head ring=15 ring0=60 surf=(0, 66) upright lift=-.05*S r=(.075, .06, .075)*S color=fluffC segs=10 rings=6
24cone ear on=head surf=(32, 48) lift=-.035*S mirror h=.15*S*earS r=.075*S r2=.012*S depth=.6 color=coatC segs=10
25cone inner on=ear at=(0, .012*S, .02*S) h=.1*S*earS r=.045*S r2=.008*S depth=.45 color=emberC ink=glow segs=8
26face look on=head eyes=round mouth=cat size=.3 spacing=27 eyeY=2 mouthY=-28 mouthW=.28 iris=emberC skin=coatC detail=.65
27
28// the ember collar ring with glowing beads
29torus collar on=body at=(0, .06*S, 0) R=.18*S r=.028*S color=emberC ink=glow segs=24 sides=6
30ball bead x6 on=collar ring ring0=30 at=(.18*S, 0, 0) r=.035*S color=emberC ink=glow segs=8 rings=5
31
32// the wisp tail: tapering smoke links curling up, an ember at the tip
33ball tail x4 on=body at=(0, -.02*S, -.16*S) chain=(0, .07*S, -.05*S) rot=(-30, 0, 0) scale=.85 r=(.07, .07, .08)*S color=fluffC segs=10 rings=6 joint
34ball tip on=tail at=(0, .07*S, -.03*S) r=.045*S color=emberC ink=glow segs=8 rings=5 if=i==3
35
36// puff: a burst of soot smoke as it shakes and half-vanishes
37fx puff: smoke on=body at=(0, .05, 0) n=8 hz=.8 speed=.8 spread=70 size=.08 grow=2.6 color=coatC color2=fluffC
38
39// idle: float, curl the tail, look about
40anim idle: body bob amp=.04 hz=.6
41anim idle: tail rx sin amp=12 hz=.7 stagger=.12
42anim idle: tail wag amp=14 hz=.9 stagger=.1
43anim idle: head sway amp=5 hz=.3
44// puff: shrink into the smoke with a fast shiver, then pop back
45anim puff: body s keys=[0:0 .3:-.28 .55:.12 1:0] hz=1.4
46anim puff: body rz sin amp=9 hz=7
47anim puff: head rx sin amp=6 hz=7 phase=.25
48anim puff: tail rx sin amp=25 hz=3 stagger=.15
49