Skip to content

hm5-types (source format) / CannedMotion

Interface: CannedMotion ​

"罐頭動態": a ready-made motion over a frame range of a layer — the whole layer moves / fades as one, about its art's centre at start. Keyframes are untouched; motions stack (offsets add, scales and alphas multiply), on top of the layer tween.

Properties ​

PropertyTypeDescription
anchor?objectthe start is locked to a keyframe of a layer in the same timeline: when that keyframe moves the motion moves with it. keyId = Keyframe.id; dropped when that keyframe is gone.
anchor.keyIdstring-
anchor.layerIdstring-
easing?EasingSpecprogress curve; absent = the kind's own (springs for the bouncy ones)
idstring-
kindCannedMotionKind-
lengthnumberframes (>= 1)
motionBlur?MotionBlurmotion blur of the layer while this motion moves it; present = on
params?Record<string, string | number | boolean>the kind's parameters (direction, distance, bounce …); absent keys take the catalogue default
reach?numberslide in / out with "outside the view" on: the distance (layer px) that takes the art just past the edge of the view (camera frame, else the stage) at the motion's resting frame — worked out by the editor after every change; the motion slides max(distance, reach).
startnumberfirst frame, 0-based. With anchor it always equals that keyframe's frame (kept so after every command).

HereSplash — 2D animation for the web