SS14 Graphics AnimationPlayer
БесплатноБез исполняемых скриптовНе проверенA deep practical guide to entity animations using the AnimationPlayerSystem in SS14: lifecycle, API, track types, keyframes/interpolation/easing, completion…
от makura-games★ 74 звезды на GitHubОб этом скилле
Animations via AnimationPlayer in SS14
This skill only covers entity animations via AnimationPlayerSystem :)
UI animations (Control.PlayAnimation) and shader/overlay effects are handled in separate skills.
When to use
Choose AnimationPlayerSystem when needed:
- smoothly change the properties of components over time (
SpriteComponent,TransformComponent,PointLightComponent, etc.); - run flick animations of RSI states by layers;
- synchronize visual and sound in one timeline;
- handle completion/interruption of animation through events.
Don't use it for static visual states without time: this is the normal SpriteSystem/GenericVisualizer zone.
Mental model
- You create
Animation(Length+ listAnimationTracks). - You play it through
AnimationPlayerSystem.Play(...)under the uniquekey. - The system moves the playback every frame and applies the track values.
- Upon completion,
AnimationCompletedEvent(Finished = true) arrives. - When manually stopping
Stop(...)also comesAnimationCompletedEvent, butFinished = false.
Idea: animation is a local timeline of the effect, not network business logic :)
Important client/server boundary
AnimationPlayerComponent— client entity of the visual.- On the server, this component is ignored by the component factory.
- The server reports the state, the client decides when and how to visually animate.
API parsing AnimationPlayerSystem
Launch
Play(EntityUid uid, Animation animation, string key)Play(Entity<AnimationPlayerComponent> ent, Animation animation, string key)
Practice:
- use stable key constants;
- before
PlaycheckHasRunningAnimationif the key may be repeated.
Checking running
HasRunningAnimation(EntityUid uid, string key)HasRunningAnimation(EntityUid uid, AnimationPlayerComponent? component, string key)HasRunningAnimation(AnimationPlayerComponent component, string key)
Stop
Stop(Entity<AnimationPlayerComponent?> entity, string key)Stop(EntityUid uid, AnimationPlayerComponent? component, string key)
The stop triggers a completion event with Finished = false.
Events
AnimationStartedEventAnimationCompletedEventKeyFinished(natural termination or forced)
Structure Animation
Length: total playback length.AnimationTracks: several tracks run synchronously.
Rule: Length must cover all the necessary key phases of the tracks.
Types of tracks and when to take which one
AnimationTrackComponentProperty
Changes the component property by keyframes.
Required fields:
ComponentType = typeof(...)Property = nameof(...)KeyFrames- optional
InterpolationMode
Use for:
SpriteComponent.Scale/Offset/Color/Rotation;TransformComponent.LocalPosition;PointLightComponent.AnimatedRadius/AnimatedEnable/Rotation, etc.
AnimationTrackSpriteFlick
Controls the RSI-state of the layer over time.
Required fields:
LayerKey(usually layer enum);KeyFrameswithStateId.
Use it when you need to play the state animation of the layer.
AnimationTrackPlaySound
Plays sound on the given keyframes.
Use for precise synchronization of “visual + sound” in one timeline.
KeyFrame and interpolation
AnimationTrackProperty.KeyFrame(value, keyTime, easing?):
keyTimeis a delta from the previous keyframe, not an absolute time.easingapplies to the transition between the previous and current frame.
AnimationInterpolationMode:
LinearCubicNearestPrevious
For unsupported types, interpolation actually behaves like a discrete step (previous value).
Practical examples
Example 1: secure launch by key
private const string AnimKey = "rotating_light";
private void TryPlayRotation(EntityUid uid, AnimationPlayerComponent player, Animation anim)
{
// We do not allow key conflicts in PlayingAnimations.
if (_anim.HasRunningAnimation(uid, player, AnimKey))
return;
_anim.Play((uid, player), anim, AnimKey);
}
Example 2: correct stop + cleanup
private void StopFallAnimation(EntityUid uid, AnimationPlayerComponent player, SpriteComponent sprite, Vector2 originalScale)
{
// First, we return the visual parameters to their basic state.
_sprite.SetScale((uid, sprite), originalScale);
// Then we stop the animation by key.
_anim.Stop((uid, player), "chasm_fall");
}
Example 3: property-track with easing
private static Animation BuildPickupAnim(Vector2 from, Vector2 to, Color startColor)
{
return new Animation
{
Length = TimeSpan.FromMilliseconds(175),
AnimationTracks =
{
new AnimationTrackComponentProperty
{
ComponentType = typeof(TransformComponent),
Property = nameof(TransformComponent.LocalPosition),
InterpolationMode = AnimationInterpolationMode.Linear,
Установить SS14 Graphics AnimationPlayer в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл SS14 Graphics AnimationPlayer?
A deep practical guide to entity animations using the AnimationPlayerSystem in SS14: lifecycle, API, track types, keyframes/interpolation/easing, completion events, patterns and anti-patterns for production code.
Как установить скилл SS14 Graphics AnimationPlayer?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл SS14 Graphics AnimationPlayer запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic