Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Add limit to Animator.values
- Loading branch information
Showing
with
4 additions
and
5 deletions.
-
+4
−5
framer/Animator.coffee
|
@@ -22,13 +22,12 @@ class exports.Animator |
|
|
finished: -> |
|
|
throw Error "Not implemented" |
|
|
|
|
|
values: (delta=1/60)-> |
|
|
|
|
|
values: (delta=1/60,limit=100)-> |
|
|
values = [] |
|
|
|
|
|
while not @finished() |
|
|
for i in [0..limit] |
|
|
values.push(@next(delta)) |
|
|
|
|
|
if @finished() |
|
|
break |
|
|
return values |
|
|
|
|
|
|
|
|