AfterEffects便利な エクスプレッション

左右ループ

下記のエクスプレッションを位置のエクスプッションエリアにペースト

// === Looping horizontal movement with ease in/out ===
// Customize these values:
amplitude = 200; // movement distance (in pixels)
speed = 2; // how many cycles per second

// Calculate time
t = time * speed * Math.PI * 2;

// Calculate eased position using sine wave
xOffset = amplitude * Math.sin(t);

// Final position
value + [xOffset, 0];

上下ループ

// === Looping vertical movement with ease in/out ===
// Customize these values:
amplitude = 200; // movement distance (in pixels)
speed = 2; // how many cycles per second

// Calculate time
t = time * speed * Math.PI * 2;

// Calculate eased position using sine wave
yOffset = amplitude * Math.sin(t);

// Final position
value + [0, yOffset];

Leave a Comment

Your email address will not be published. Required fields are marked *

en_USEnglish