Immutable validated sprite timeline. No GPU/ECS objects, scheduler, callbacks or mutable playback clock. @ownership Owns frame metadata; snapshots remain valid independently of the clip or source package. @thread Const sampling is worker-safe. Callers supply finite nonnegative elapsed seconds. @reentrancy No callbacks or locks. Reimport builds a new candidate without mutating existing clips. 更多...
#include <SpriteAnimation.h>
Public 成员函数 | |
| Result< SpriteAnimationFrame > | sample (double seconds) const |
| Sample a held key; loop wraps at duration, non-loop playback holds the final frame. | |
| std::size_t | frameCount () const noexcept |
| Number of authored keys. | |
| double | duration () const noexcept |
| Authored duration in seconds. | |
静态 Public 成员函数 | |
| static Result< SpriteAnimationClip > | decode (const Value &definition) |
| Decode eve.sprite-animation/1; reject unknown versions, ignore unknown fields. | |
| static Result< SpriteAnimationClip > | load (const EvpackResourceReader &reader, const AssetRef &asset, const EvpackCapabilities &capabilities) |
| Load an immutable runtime definition; reader is borrowed only during this call. | |
详细描述
Immutable validated sprite timeline. No GPU/ECS objects, scheduler, callbacks or mutable playback clock. @ownership Owns frame metadata; snapshots remain valid independently of the clip or source package. @thread Const sampling is worker-safe. Callers supply finite nonnegative elapsed seconds. @reentrancy No callbacks or locks. Reimport builds a new candidate without mutating existing clips.
在文件 SpriteAnimation.h 第 27 行定义.
成员函数说明
◆ decode()
|
static |
Decode eve.sprite-animation/1; reject unknown versions, ignore unknown fields.
- 返回
- Owning candidate or structured validation error. No previous schema exists to migrate.
在文件 SpriteAnimation.cpp 第 23 行定义.
引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), filter, image, key, loop, name, number, eve::AssetRef::parse(), eve::ParseError, eve::Result< T >::success() , 以及 value.
被这些函数引用 load() , 以及 eve::asset_import::prepareUnitySpriteAnimation().
◆ duration()
|
inlinenoexcept |
Authored duration in seconds.
在文件 SpriteAnimation.h 第 43 行定义.
◆ frameCount()
|
inlinenoexcept |
Number of authored keys.
在文件 SpriteAnimation.h 第 41 行定义.
◆ load()
|
static |
Load an immutable runtime definition; reader is borrowed only during this call.
在文件 SpriteAnimation.cpp 第 68 行定义.
引用了 caps, decode(), eve::asset::decodeRuntimeDefinition(), eve::asset::Definition, eve::Diagnostic::error(), eve::Result< T >::failure(), eve::ParseError, payload, eve::asset::EvpackResourceReader::read() , 以及 value.
◆ sample()
| Result< SpriteAnimationFrame > eve::asset::SpriteAnimationClip::sample | ( | double | seconds | ) | const |
Sample a held key; loop wraps at duration, non-loop playback holds the final frame.
- 返回
- Owning snapshot; negative/nonfinite seconds are rejected. Identical inputs select identical keys.
在文件 SpriteAnimation.cpp 第 79 行定义.
引用了 eve::Diagnostic::error(), eve::Result< T >::failure(), eve::ParseError, eve::Result< T >::success(), t , 以及 time.
该类的文档由以下文件生成:
- src/modules/asset/SpriteAnimation.h
- src/modules/asset/SpriteAnimation.cpp