Skip to content

其他

我们还提供了其他一些工具和方法!

const { dump } = useChapter("1.1.1");

对于熟悉引擎的用户,可以使用 dump 进行调试,dump 会返回一个对象,其中包含当前章节的所有信息。这段信息是类似 rewriteIR 的对象,但未经 parser 处理。

interface DumpResult {
name: string;
cache: Map<string, ChapterUnit[]>;
}

在动效中,我们提供了一些缓动函数,用于控制动画的速度。

export type EaseStringLiteral =
| "none"
| "power1" | "power1.in" | "power1.out" | "power1.inOut"
| "power2" | "power2.in" | "power2.out" | "power2.inOut"
| "power3" | "power3.in" | "power3.out" | "power3.inOut"
| "power4" | "power4.in" | "power4.out" | "power4.inOut"
| "back" | "back.in" | "back.out" | "back.inOut"
| "bounce" | "bounce.in" | "bounce.out" | "bounce.inOut"
| "circ" | "circ.in" | "circ.out" | "circ.inOut"
| "elastic" | "elastic.in" | "elastic.out" | "elastic.inOut"
| "expo" | "expo.in" | "expo.out" | "expo.inOut"
| "sine" | "sine.in" | "sine.out" | "sine.inOut"