Drill: keep pass-through; restore the original loose-grain nudge, drop dust and push (t92)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-28 19:15:41 -04:00
co-authored by Claude Opus 5.5
parent 807217b22c
commit 6ac5f463aa
8 changed files with 88 additions and 148 deletions
-13
View File
@@ -22,19 +22,6 @@ with launch(viewport={'width':960,'height':600}) as (_,pg,url):
}""")
assert startup['warm']>=0
print('PASS both looks submit behind loading screen; first visible frame ms',startup)
dust=pg.evaluate("""()=>{
const particles=SET.particles,fogOn=SET.fog;SET.particles=true;SET.fog=false;
R.particles=[];EV.length=0;emit({t:'debris',x:bot.x,y:bot.y,m:RSTONE,dust:true});drainEvents();
const spawned=R.particles.length===1 && R.particles[0].dust===true;
R.ctx.clearRect(0,0,R.canvas.width,R.canvas.height);drawParticles();
const data=R.ctx.getImageData(0,0,R.canvas.width,R.canvas.height).data;
let visible=0,soft=0;for(let i=3;i<data.length;i+=4)if(data[i]){visible++;if(data[i]<100)soft++;}
for(let n=0;n<36;n++)drawParticles();const expired=R.particles.length===0;
SET.particles=false;spawnDebris(bot.x,bot.y,RSTONE,true);const disabled=R.particles.length===0;
SET.particles=particles;SET.fog=fogOn;return {spawned,visible,soft,expired,disabled};
}""")
assert dust['spawned'] and dust['visible']>4 and dust['soft']==dust['visible'] and dust['expired'] and dust['disabled'],dust
print('PASS pulse dust events draw a visible soft puff, expire and respect particles setting',dust)
pg.add_script_tag(path=str(root/'tools/perf-scenes.js'))
pg.evaluate("async()=>{perfScene('factory',1024,640);await startThreads();simPool.force=true;SET.look='pixel';SET.zoom=2;resizeRender();snapCamera();drawWorld();}")
result=pg.evaluate('''async () => {