动画与过渡
了解如何在 Pixi’VN 中使用 animate 函数和计时器创建动画和过渡效果。
动画是任何视频游戏的关键组成部分,有助于创造更具吸引力和沉浸感的体验。 在 Pixi’VN 中,动画通过计时器和 animate 函数进行管理。
animate 函数是对 motion 库的封装,提供了一种简单而强大的方式来为画布组件添加动画。 你可以定义动画的属性,例如持续时间、easing 等。
Pixi’VN 还提供了多个函数,用于在叙事步骤(steps)之间执行过渡。 所有过渡效果都建立在 animate 函数之上,因此也可以轻松创建自定义过渡效果。
Pixi’VN 中的所有动画都是由计时器触发的,计时器是在每一帧运行并利用 PixiJS 执行函数的类。
Animate
Animate Pixi’VN canvas components with the animate function, including movement, rotation, fading, zooming, and mirroring.
过渡效果
Built-in transition effects for showing and removing canvas components, and how to create your own.
Ticker
Use tickers directly when you need very complex or elaborate animations that go beyond what the animate function alone can express.