()
| 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); |
no test coverage detected