fix(docs/hold-tap): Update tap_unless_interrupted timing
This commit is contained in:
parent
0259811e58
commit
75e3945a9e
1 changed files with 15 additions and 7 deletions
|
@ -1,6 +1,5 @@
|
||||||
import { makeScene2D } from "@motion-canvas/2d/lib/scenes";
|
import { makeScene2D } from "@motion-canvas/2d/lib/scenes";
|
||||||
import { Text } from "@motion-canvas/2d/lib/components";
|
import { makeRefs } from "@motion-canvas/core/lib/utils";
|
||||||
import { createRef, makeRefs } from "@motion-canvas/core/lib/utils";
|
|
||||||
import { all, chain, delay, waitFor } from "@motion-canvas/core/lib/flow";
|
import { all, chain, delay, waitFor } from "@motion-canvas/core/lib/flow";
|
||||||
import Key, { KeyTravel } from "../../../components/Key";
|
import Key, { KeyTravel } from "../../../components/Key";
|
||||||
import Output from "../../../components/Output";
|
import Output from "../../../components/Output";
|
||||||
|
@ -36,14 +35,23 @@ export default makeScene2D(function* (view) {
|
||||||
);
|
);
|
||||||
yield* all(
|
yield* all(
|
||||||
tap.duration.grow(0.5, 1, linear),
|
tap.duration.grow(0.5, 1, linear),
|
||||||
delay(1, tap.body.position.y(0, 0.15)),
|
delay(
|
||||||
|
1,
|
||||||
|
chain(
|
||||||
|
tap.body.position.y(0, 0.15),
|
||||||
|
tap.group.rotation(3, 0.03),
|
||||||
|
tap.group.rotation(-3, 0.06),
|
||||||
|
tap.group.rotation(0, 0.03),
|
||||||
|
tap_output.output.text("f", 0)
|
||||||
|
)
|
||||||
|
),
|
||||||
hold.duration.grow(1, 2, linear)
|
hold.duration.grow(1, 2, linear)
|
||||||
);
|
);
|
||||||
yield* chain(
|
yield* chain(
|
||||||
all(tap.group.rotation(3, 0.03), hold.group.rotation(3, 0.03)),
|
hold.group.rotation(3, 0.03),
|
||||||
all(tap.group.rotation(-3, 0.06), hold.group.rotation(-3, 0.06)),
|
hold.group.rotation(-3, 0.06),
|
||||||
all(tap.group.rotation(0, 0.03), hold.group.rotation(0, 0.03)),
|
hold.group.rotation(0, 0.03),
|
||||||
all(tap_output.output.text("f", 0), hold_output.output.text("f", 0))
|
hold_output.output.text("f", 0)
|
||||||
);
|
);
|
||||||
yield* waitFor(0.25);
|
yield* waitFor(0.25);
|
||||||
yield* hold.body.position.y(0, 0.15);
|
yield* hold.body.position.y(0, 0.15);
|
||||||
|
|
Loading…
Add table
Reference in a new issue