sc0ttj / component

A tiny library for isomorphic JavaScript components
MIT License
2 stars 1 forks source link

Feature: add an integrated `usePhysics` addon #62

Open sc0ttj opened 2 years ago

sc0ttj commented 2 years ago

Use cases:

Features:

See:

Nice to haves:

sc0ttj commented 1 year ago

https://jsfiddle.net/21q6Lgyx/5/

^ nice fiddle showing throttled FPS, demonstrate using window.performance.now() instead of Date.now()

https://jsfiddle.net/chicagogrooves/nRpVD/2/

^ another nice one with adding controls to dynamically adjust target framerate, sampling framerate on a separate interval from the animation, and adding a graph of historical framerates

both based on this stack overflow answer

https://stackoverflow.com/a/19772220