(objectClass: typeof StringAnimation | typeof StringTracker | typeof StringScrollbar)
| 327 | } |
| 328 | } |
| 329 | public use(objectClass: typeof StringAnimation | typeof StringTracker | typeof StringScrollbar){ |
| 330 | const object = new objectClass(); |
| 331 | if(object instanceof StringAnimation){ |
| 332 | object.eventManager = this.eventManager |
| 333 | this.animations.push(object) |
| 334 | } |
| 335 | if(object instanceof StringScrollbar){ |
| 336 | this.scrollbar = object |
| 337 | } |
| 338 | if(object instanceof StringTracker){ |
| 339 | this.animationGlobalCycle = ()=>{ |
| 340 | this.sEn.onAnimationFrame() |
| 341 | requestAnimationFrame(object.getTrackedFunction()); |
| 342 | } |
| 343 | object.trackedFunction = this.animationGlobalCycle |
| 344 | object.start() |
| 345 | } |
| 346 | |
| 347 | |
| 348 | } |
| 349 | public start(){ |
| 350 | this.onAnimationFrame() |
| 351 | this.onResize() |
nothing calls this directly
no test coverage detected