Architect runs: a skipped review that passes still ends with the monkey's cheer
This commit is contained in:
parent
b04e1e22c1
commit
87364af55d
2 changed files with 3 additions and 1 deletions
|
|
@ -13,7 +13,8 @@ function mkRun(l,dur,bad){const m=UI.mk;if(!m)return;const [x,y]=mkMid(l);m.fx=m
|
|||
function mkSpray(m){for(let i=0;i<(m.bad?26:16);i++){const a=Math.PI*2*i/(m.bad?26:16)+((i*37)%10)/10,v=0.05+((i*53)%10)/180;
|
||||
m.spray.push({x:m.tx,y:m.ty,vx:Math.cos(a)*v,vy:Math.sin(a)*v-0.06,c:m.bad?(i%3?'#FF4D5E':'#FFD23F'):MK_COLS[i%MK_COLS.length],t:animT,s:i%4===0?(m.bad?'💥':'✂️'):null});}}
|
||||
// The review is over: a cheer when everything held, a tantrum where it broke.
|
||||
function mkEnd(ok){const m=UI.mk;if(!m)return;m.mood=ok?'cheer':'dance';m.t0=animT;}
|
||||
function mkEnd(ok){const m=UI.mk;if(!m)return;// a pending spray (the review was skipped mid-run) would override the cheer
|
||||
m.sprayAt=null;m.mood=ok?'cheer':'dance';m.t0=animT;}
|
||||
function mkStop(){UI.mk=null;}
|
||||
function mkDraw(ks){const m=UI.mk;if(!m)return;
|
||||
const p=Math.min(1,(animT-m.t0)/m.dur),e=p<0.5?2*p*p:1-Math.pow(-2*p+2,2)/2;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue