本页内容

KeyframeAnimation QML Type

一种为 Transform 实现简单关键帧动画的类型。更多内容...

Import Statement: import Qt3D.Animation 2.12
In C++: QKeyframeAnimation
Inherits:

AbstractAnimation

Status: Technology preview

此类型处于技术预览阶段,内容可能会有变动。

属性

详细说明

KeyframeAnimation 类型实现了一种简单的关键帧动画,可用于对Transform 进行动画处理。关键帧由多个带时间戳的Qt3D.Core::Transform组成,这些 经过插值处理后应用于目标Transform。关键帧之间使用EasingCurve来控制插值器。 当设置给 KeyframeAnimation 的位置小于或大于关键帧位置中定义的值时,可设置 RepeatMode。

属性文档

easing : EasingCurve

保存插值器在关键帧之间的平滑曲线。

endMode : enumeration

对大于上一帧位置的帧位置值保持循环播放模式。

  • 无
  • 常量
  • 重复

framePositions : list<real>

存储关键帧的位置。列表中的每个位置都指定了相应关键帧的位置。这些值必须按升序排列。值可以是正数或负数,且没有预定义的单位。

keyframes : list<Transform>

存储关键帧动画中的关键帧列表。

startMode : enumeration

用于设置小于第一帧位置的帧位置值的重复模式。

  • 无
  • 常量
  • 重复

target : Transform

保存动画所应用的目标变换。

targetName : string

存储目标变换的名称。这是一个便捷属性,便于将目标变换与关键帧动画进行匹配。该名称通常与目标变换的父实体的名称相同,但并非必须如此。

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.