Skip to content

Commit 3aed7c6

Browse files
committed
chore: update changeset
1 parent 52db511 commit 3aed7c6

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

.changeset/weak-animals-search.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,18 @@
44

55
Add `animate` API in Main Thread Script(MTS), so you can now control a CSS animation imperatively
66

7-
```
8-
function startAnimation() {
9-
'main thread'
7+
```ts
8+
import type { MainThread } from '@lynx-js/types';
9+
10+
function startAnimation(ele: MainThread.Element) {
11+
'main thread';
1012
const animation = ele.animate([
1113
{ opacity: 0 },
1214
{ opacity: 1 },
1315
], {
14-
duration: 3000
15-
})
16+
duration: 3000,
17+
});
1618

17-
animation.pause()
19+
animation.start();
1820
}
1921
```

0 commit comments

Comments
 (0)