combomash / engine

TypeScript Algorithmic Media Engine
https://www.npmjs.com/package/@combomash/engine
ISC License
0 stars 0 forks source link

fixed update #23

Open owmo-dev opened 2 months ago

owmo-dev commented 2 months ago

Add a fixed update method to Engine and Entity class which attempts to maintain roughly 60fps, regardless of the current frame rate. If the browser FPS dips below, it should repeat N times, if it goes above, it should skip frames. The method could be used for physics or other simulations where accuracy is not critical, but good enough will suffice.