hrgdavor / jscadui

MIT License
30 stars 7 forks source link

WIP: throttle attempt (has console.log for inspection) #65

Closed hrgdavor closed 10 months ago

hrgdavor commented 11 months ago

I have implemented throttling of parameter change execution.

communication with worker was also changed so entites are not sent as event, but as a response ro runMain and runScript. This allows to wrap those calls to Promise neatly, and also use await.

it is supposed to skip param changes that arrive during worker execution but make sure last state of params is rendered reliably image

I loaded the script http://3d.hrg.hr/jscad/three/examples/parametric_butt_hinge_3.7.js and changed view options->throw angle rapidly

hrgdavor commented 11 months ago

this param can slow the script, and clicking it fast can give time to produce requests that are during worker bysy time, and it is easy to see on screen if count matches image