Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions .changeset/weak-animals-search.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,18 @@

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

```
function startAnimation() {
'main thread'
```ts
import type { MainThread } from '@lynx-js/types';

function startAnimation(ele: MainThread.Element) {
'main thread';
const animation = ele.animate([
{ opacity: 0 },
{ opacity: 1 },
], {
duration: 3000
})
duration: 3000,
});

animation.pause()
animation.start();
}
```