MCPcopy Index your code
hub / github.com/Fiddle-Digital/string-scroll / use

Method use

src/index.ts:329–348  ·  view source on GitHub ↗
(objectClass: typeof StringAnimation | typeof StringTracker | typeof StringScrollbar)

Source from the content-addressed store, hash-verified

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()

Callers

nothing calls this directly

Calls 3

onAnimationFrameMethod · 0.65
getTrackedFunctionMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected