MCPcopy Create free account
hub / github.com/DavidHDev/react-bits / update

Method update

src/content/Components/CircularGallery/CircularGallery.jsx:540–549  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

538 }
539 }
540 update() {
541 this.scroll.current = lerp(this.scroll.current, this.scroll.target, this.scroll.ease);
542 const direction = this.scroll.current > this.scroll.last ? 'right' : 'left';
543 if (this.medias) {
544 this.medias.forEach(media => media.update(this.scroll, direction));
545 }
546 this.renderer.render({ scene: this.scene, camera: this.camera });
547 this.scroll.last = this.scroll.current;
548 this.raf = window.requestAnimationFrame(this.update.bind(this));
549 }
550 addEventListeners() {
551 this.boundOnResize = this.onResize.bind(this);
552 this.boundOnWheel = this.onWheel.bind(this);

Callers 1

constructorMethod · 0.95

Calls 3

lerpFunction · 0.70
renderMethod · 0.45
bindMethod · 0.45

Tested by

no test coverage detected