May 2018
Intermediate to advanced
470 pages
13h 54m
English
In the rotate(index) and stopRotate() methods, we will implement rotation animation behavior using requestAnimationFrame for smooth animations on the browser.
Using the rotate method, we will update the rotateY transform value of the given object at a steady rate on a set time interval with requestionAnimationFrame.
/MERNVR/index.js:
this.lastUpdate = Date.now() rotate = index => event => { const now = Date.now() const diff = now - this.lastUpdate ...Read now
Unlock full access