end dleta

This commit is contained in:
ntr 2019-06-11 13:57:44 +10:00
parent f8c1019411
commit de3df722ed

View File

@ -31,7 +31,9 @@ class TrippyTriangle extends Component {
progress() { progress() {
const delta = this.state.delta + 0.1; const delta = this.state.delta + 0.1;
const pct = 50 - 50 * Math.sin(delta); const pct = 50 - 50 * Math.sin(delta);
this.setState({ pct, delta }); this.setState({ pct, delta });
if (delta > 20) return false;
requestAnimationFrame(this.progress); requestAnimationFrame(this.progress);
} }