* Cleans all of the resources that might cause memory leaks (e.g. plugins). * Resets the animation and cleans the definition.
()
| 272 | * Resets the animation and cleans the definition. |
| 273 | */ |
| 274 | dispose() { |
| 275 | for (const plugin of this.plugins) { |
| 276 | plugin.destroy(); |
| 277 | } |
| 278 | this.reset(); |
| 279 | this.rules = []; |
| 280 | this._duration = 0; |
| 281 | this.plugins = []; |
| 282 | } |
| 283 | |
| 284 | /** |
| 285 | * Update the frame/animation by a given time. |