-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmotion_smoke.affine
More file actions
30 lines (23 loc) · 1.22 KB
/
Copy pathmotion_smoke.affine
File metadata and controls
30 lines (23 loc) · 1.22 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// SPDX-License-Identifier: MPL-2.0
// bindings #4 — Motion library smoke test.
//
// The harness installs a mock at globalThis.__as_motion before
// importing the generated module; we re-export thin wrappers so the
// harness can drive every motion extern via stable names.
//
// Coverage: animate / cancel (original) + animateMini / tween /
// spring / ease (bindings #4 → ● promotion).
use Deno::{Json};
use Motion::{AnimationControls, Easing, motionAnimate, motionAnimateMini, motionCancel, motionEase, motionSpring, motionTween};
pub fn smokeAnimate(target: Json, keyframes: Json, options: Json) -> AnimationControls =
motionAnimate(target, keyframes, options);
pub fn smokeCancel(controls: AnimationControls) -> Int =
motionCancel(controls);
pub fn smokeAnimateMini(target: Json, keyframes: Json, options: Json) -> AnimationControls =
motionAnimateMini(target, keyframes, options);
pub fn smokeTween(target: Json, from: Json, to: Json, options: Json) -> AnimationControls =
motionTween(target, from, to, options);
pub fn smokeSpring(target: Json, keyframes: Json, springConfig: Json) -> AnimationControls =
motionSpring(target, keyframes, springConfig);
pub fn smokeEase(name: String) -> Easing =
motionEase(name);