1asset water_cooler "Water cooler" complexity=3
2// an office water cooler: a rounded cabinet with a dark tap nook (a cold blue tap and a hot red tap
3// over a drip tray), a big upside-down jug of water on top with bubbles glugging up inside it, and a
4// stack of paper cups in a holder on the side
5let S = .95..1.05
6let cabC = white:3|cream|silver|mint
7let trimC = iron:2|cobalt|teal
8let jugC = waterLight:3|aqua|sky
9
10// the cabinet and its tap nook
11box cab size=(.36, .98, .36)*S round=.05 bev=2 bands=[.04:cabC .62:trimC .66:cabC] color=trimC
12box nook on=cab at=(0, .5*S, .16*S) size=(.26, .26, .06)*S round=.03 color=inkDark
13cyl tap x2 on=nook at=(-.055, .2, .06) row=(.11, 0, 0) rot=(90, 0, 0) h=.05 r=.022 color=sel(i, cobalt, cherry) segs=10
14cyl spout x2 on=nook at=(-.055, .16, .08) row=(.11, 0, 0) h=.05 r=.01 color=silver segs=6
15box tray on=nook at=(0, -.01, .06) size=(.22, .03, .1) round=.01 color=silver
16box collar on=cab at=(0, .98*S, 0) size=(.3, .05, .3)*S round=.02 color=trimC
17
18// the jug: a neck into the collar, a fat ribbed bottle
19lathe jug on=collar at=(0, -.02, 0) h=.52*S r=.17*S prof=[0:.32 .12:.36 .2:.92 .3:1 .5:.97 .54:1 .8:1 .92:.9 1:.55] bands=[.5:jugC*1.06 .54:jugC] color=jugC segs=32 rings=16
20
21// bubbles glugging up the front of the jug
22ball bubble x3 on=jug at=(0, .16*S, .155*S) row=(.05, 0, 0) r=.028 color=white ink=none segs=8 rings=5 joint
23ball fizz on=jug at=(.08, .3*S, .14*S) r=.022 color=white ink=none segs=8 rings=5 joint
24
25// the cup holder on the side with paper cups
26cyl holder on=cab at=(.2*S, .55*S, 0) rot=(0, 0, 0) h=.24 r=.045 color=trimC segs=12
27cone cup x3 on=holder at=(0, -.06, 0) chain=(0, -.03, 0) h=.08 r=.02 r2=.04 color=white segs=10
28
29anim bubble py keys=[0:0 .85:.26 .9:.28 1:0] hz=.7 stagger=.33
30anim fizz py keys=[0:0 .85:.18 1:0] hz=.9 phase=.4
31