rm push/pop
This commit is contained in:
8
tween.cm
8
tween.cm
@@ -8,7 +8,7 @@ function make_engine(default_clock) {
|
||||
tweens: [],
|
||||
default_clock: default_clock || null,
|
||||
add(tween) {
|
||||
push(this.tweens, tween)
|
||||
this.tweens[] = tween
|
||||
},
|
||||
remove(tween) {
|
||||
this.tweens = filter(this.tweens, t => t != tween)
|
||||
@@ -164,7 +164,7 @@ var TimelineProto = {
|
||||
engine: null,
|
||||
|
||||
add_event: function(time_value, fn) {
|
||||
push(this.events, { time: time_value, fn, fired: false })
|
||||
this.events[] = { time: time_value, fn, fired: false }
|
||||
},
|
||||
|
||||
add_tween: function(obj, props, duration, start_time) {
|
||||
@@ -257,13 +257,13 @@ $delay(() => {
|
||||
function snapshot() {
|
||||
var result = []
|
||||
arrfor(TweenEngine.tweens, function(tw) {
|
||||
push(result, {
|
||||
result[] = {
|
||||
startVals: tw.startVals,
|
||||
endVals: tw.endVals,
|
||||
duration: tw.duration,
|
||||
startTime: tw.startTime,
|
||||
easing: tw.easing ? (tw.easing.name || 'unknown') : 'none'
|
||||
})
|
||||
}
|
||||
})
|
||||
return {active_count: length(TweenEngine.tweens), tweens: result}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user