threejs-animation

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Animation and Timelines

动画与时间线

Use the project's installed versions and existing architecture. These instructions supplement the user's task; they do not authorize unrelated changes or external actions.
Identify which system owns each animated property: imported clips, procedural motion, scroll timeline, controls, or physics. Blend or hand off explicitly when two systems would otherwise write the same transform.
Use elapsed time or delta in seconds rather than frame counts. Clamp large visual deltas after a tab resumes; physics needs its own fixed-step policy. Use frame-independent damping such as 1 - exp(-lambda * delta), with reusable scratch values.
Create a mixer for the appropriate root, select clips by inspected names, and define loop, pause, finished, and transition behavior. Reset and play the destination action as needed for crossfades; inspect root motion rather than silently translating both the root and its parent.
For scroll, map normalized section progress to a defined timeline. Recalculate ranges on layout changes and handle reverse scrolling and jumps directly. Do not accumulate scroll deltas as if all input arrived continuously. Keep text readable and content reachable without the animated camera path.
Respect reduced-motion preferences by removing nonessential motion or presenting stable states. Suspend work when the scene is inactive where practical. Stop owned actions, remove mixer listeners, and uncache roots only after their actions stop.
Verify at different frame rates, after backgrounding, during rapid state changes, on backward scroll, and with reduced motion. Confirm animation speed and final states remain consistent.
使用项目已安装的版本和现有架构。这些说明是对用户任务的补充;不授权无关更改或外部操作。
确定每个动画属性由哪个系统拥有:导入的剪辑、程序化运动、滚动时间线、控制器或物理。当两个系统会同时写入同一变换时,明确混合或交接。
使用以秒为单位的经过时间或增量,而不是帧计数。在标签页恢复后,限制大的视觉增量;物理需要自己的固定步长策略。使用帧无关阻尼,例如
1 - exp(-lambda * delta)
,并使用可复用的临时值。
为适当的根节点创建混合器,按检查到的名称选择剪辑,并定义循环、暂停、完成和过渡行为。根据需要重置并播放目标动作以进行交叉淡入淡出;检查根运动,而不是同时静默平移根及其父级。
对于滚动,将标准化的区块进度映射到定义的时间线。在布局变化时重新计算范围,并直接处理反向滚动和跳变。不要像所有输入连续到达一样累积滚动增量。保持文本可读,内容可在没有动画相机路径的情况下访问。
尊重减少动画的偏好,移除非必要的运动或提供稳定状态。在场景不活跃时尽量暂停工作。停止拥有的动作,移除混合器监听器,并仅在动作停止后取消缓存根节点。
在不同帧率、后台运行、快速状态变化、反向滚动和减少动画的情况下验证。确认动画速度和最终状态保持一致。

API reference

API 参考

Consult the official documentation for exact signatures and revision-specific behavior. If documentation access is unavailable, inspect installed types/source and state any remaining uncertainty.
查阅官方文档以获取准确的函数签名和特定版本的行为。如果无法访问文档,请检查已安装的类型/源码,并说明任何剩余的不确定性。