(frames, timing)
| 210 | } |
| 211 | |
| 212 | animate(frames, timing) { |
| 213 | const animation = new Animation(this, frames, timing); |
| 214 | if(this.effects) animation.applyEffects(this.effects); |
| 215 | if(this.layer) { |
| 216 | animation.baseTimeline = this.layer.timeline; |
| 217 | animation.play(); |
| 218 | animation.finished.then(() => { |
| 219 | this[_animations].delete(animation); |
| 220 | }); |
| 221 | } |
| 222 | this[_animations].add(animation); |
| 223 | return animation; |
| 224 | } |
| 225 | |
| 226 | attr(...args) { |
| 227 | if(args.length === 0) return this.attributes[attributes]; |