Jump to content
Search Community

Todd Morin

Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by Todd Morin

  1. Im getting a console error that says "Invalid property effectVelocity set to 0.06666666666666667 Missing plugin? gsap.registerPlugin()" I'm just using TweenMax and it just started doing this. Im using DOM and canvas to get the animation. I have noticed if I shrink the height of the window it functions properly but I still get the invalid effectVelocity. https://toddportfoliotest.000webhostapp.com/dist/index.html This is the im using that targets the TweenMax class WrapEffect { constructor(material) {_defineProperty(this, "update", isScrolling => { // update velocity this.scrollingContainer = this.scrollingContainer || document.scrollingElement || document.documentElement; this.velocity = (window.scrollY || this.scrollingContainer.scrollTop) - this.oldScrollTop; this.oldScrollTop = window.scrollY || document.documentElement.scrollTop; // ease the effect velocity if (this.effectTween) { this.effectTween.kill(); } if ( this.velocity !== 0 || this.material.uniforms.effectVelocity.value > 0.0) { this.effectTween = TweenLite.to(this, 0.5, { effectVelocity: isScrolling ? Math.abs(this.velocity) / 15 : 0, onUpdate: () => { this.material.uniforms.effectVelocity.value = this.effectVelocity; }, ease: Power2.easeOut }); } });this.material = material;this.oldScrollTop = 0;this.velocity = 0;}}
×
×
  • Create New...