v1.0.0-rc.2
diffusionstudio/corev1.0.0-rc.2Sep 5, 2024by k9p5
AI Summary
Advanced animations now support functional properties, allowing values to be calculated dynamically based on time or other parameters within the clip.
Key Highlights
- Functional properties for animations
- Dynamic coordinate calculation using Timestamp
New Features
- Functional properties for animation values
Full Release Notes
### Functional Properties
We introduced functional properties for advance animations. Instead of a clip value/ Keyframe you can now assign a function.
### Example
```typescript
await composition.add(
new core.ImageClip(new File(...), {
x: (time: core.Timestamp) => time.seconds * 500,
y: (time: core.Timestamp) => time.seconds * 200,
})
);
```
When used in combination with regular functions, the `this` context will be the Clip itself.