Skip to content

Commit c4a8bb6

Browse files
committed
update animation docs
1 parent 65cfef1 commit c4a8bb6

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -106,14 +106,7 @@ const renderAnimation = () => {
106106
};
107107
requestAnimationFrame(renderAnimation);
108108

109-
// Initial frame.
110-
animation.transition({
111-
duration: 0, // Render immediately.
112-
callback: loopAnimation,
113-
blobOptions: {...},
114-
});
115-
116-
// Loop between random blobs every 4s.
109+
// Keyframe loop.
117110
const loopAnimation = () => {
118111
animation.transition({
119112
duration: 4000,
@@ -122,6 +115,13 @@ const loopAnimation = () => {
122115
blobOptions: {...},
123116
});
124117
};
118+
119+
// Initial frame.
120+
animation.transition({
121+
duration: 0, // Render immediately.
122+
callback: loopAnimation,
123+
blobOptions: {...},
124+
});
125125
```
126126

127127
## Complete API

0 commit comments

Comments
 (0)