rm push/pop

This commit is contained in:
2026-02-26 08:13:27 -06:00
parent ef7e3e6449
commit ce6b0ddb3a
31 changed files with 251 additions and 255 deletions

View File

@@ -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}
}