Update TODO_Animation.md

This commit is contained in:
Zihan Chen
2017-11-03 01:59:01 -07:00
committed by GitHub
parent 0f122b3cab
commit 0e5975011f
+1 -29
View File
@@ -5,32 +5,4 @@
- Possible to provide state machine XML tags
- Animation can be aborted at any moment, and launch a new one if necessary
- Animation can change different part of the view model using different interpolation at the same time
### Script
```
class MyProperties
{
prop A : int {}
prop B : int {}
}
func CreatePropA() : MyProperties^ { ... }
...
func MyCalculation(dest: MyProperties^, a: MyProperties^, b: MyProperties^, ...): void { ... }
$interface IMyAnimation : IGuiAnimation<MyProperties>; // prop CurrentState : MyProperties^ {}
func MyAnimation() : IMyAnimation
${
$Set CreatePropA(); // or use CurrentState
$Play CreatePropB(), 10 // gradually change to the specified state during 10 seconds
$Play CreatePropC(), 10, [$1*$1] // change the default linear interpolation
for(i in range [1, 10])
{
$Play CreatePropB(), 10, MyCalculation // call a function to decide the interpolation
}
}
```
- Using `IAsync`