patriciogonzalezvivo / thebookofshaders

Step-by-step guide through the abstract and complex universe of Fragment Shaders.
http://TheBookOfShaders.com
Other
5.97k stars 680 forks source link

use more precise THREE.Clock for u_time #348

Closed timohausmann closed 3 years ago

timohausmann commented 3 years ago

Currently the THREE.js template ticks with hardcoded 0.05 seconds per render cycle. This is too fast (60fps ≊ 0.0166s, 30fps ≊ 0.0333s) and THREE.Clock provides an easy, precise tool to keep track of time. ("uses performance.now if it is available, otherwise it reverts to the less accurate Date.now.")

patriciogonzalezvivo commented 3 years ago

Thank you!