Jump to content

Search In
  • More options...
Find results that contain...
Find results in...


  • Content Count

  • Joined

  • Last visited

Community Reputation

7 Newbie

About gaggo

  • Rank
    Advanced Member

Recent Profile Visitors

1,424 profile views
  1. From MDN: Since in my ./js/app/index file I have the main class and also call it from there, I thought this would be exactly what I wanted...
  2. For future reference: I posted an issue over at the parcel bundler github page: https://github.com/parcel-bundler/parcel/issues/4956
  3. Hi Jack, Thanks so much for your quick feedback! The issue was caused by my setup. I had a main index.js file, that's only purpose was to imported the main app.js, some scss and had a bit of bundler-specific code: // app code import './js/app/index'; // app scss import './scss/app.scss'; // some bundler-specific stuff if( module.hot ) { module.hot.accept(() => { window.location.reload(); }) } With the above setup, I kept getting the mentioned error when scopeHosting was enabled. I've spent an hour to get to the bottom of this, and it turns out i
  4. Hi there! I'm not sure if it's a problem with my bundler (parcel) or with gsap – I can't get parcel's scopeHoisting ( = tree shaking ) to work with gsap. It works just fine with all other libraries I use. This is what I do in my script: // GSAP in with bundler, as seen here: https://www.youtube.com/watch?v=znVi89_gazE import { gsap, CustomEase, ScrollToPlugin, Power4, Linear } from 'gsap/all'; gsap.registerPlugin(CustomEase, ScrollToPlugin); gsap.registerEase(Linear, Power4); If I bundle this without tree shaking, I get no errors. But as soon as I enable it, I get this error in my conso
  5. OK, just renewed my membership, I had an outdated copy of "gsap-bonus.tgz". All good now!
  6. Hi there! I have been happily using Draggable in combination with ThrowPropsPlugin for a while, and wanted to migrate my code to the new GSAP V.3 now. I found out that the ThrowPropsPlugin has been succeeded by the InertiaPlugin – but it seems like it's not part of my premium download package (yet)? Can someone point me to a complete migration instruction? I'm using the archive "gsap-bonus.tgz" with NPM. Basically, I want to use it like seen here, but with npm and proper imports from 'gsap': https://codepen.io/GreenSock/pen/zDwEk Thanks a lot!
  7. Wow Zach, things can be so simple!! This is what totally solved it for me: tweenMousePosition(newPos) { gsap.to(this.mousePos, 0.8, { x: newPos.x, y: newPos.y, onUpdate: () => this.adjustMask(), ease: "power4.out", overwrite: "auto" }); } Thanks so much for your help!!
  8. Ah, I see... in the quickSetter mouse follow example, I can see the good old dummy ease I always used back in the days: pos.x += (mouse.x - pos.x) * speed; pos.y += (mouse.y - pos.y) * speed; So no more support for GSAP's great easing functionality? I especially love `CustomEase` ...
  9. Hi Zach, thanks for your swift answer! I made a pen with gsap 2.x: https://codepen.io/hirasso/pen/yLeaYwR Basically I want the position of my mouse (or devicemotion on mobile) not to be applied immediately, but rather with gsap's great easing capabilities. I'd like to migrate this to GSAP V.3
  10. Hi there, I used to use TweenMax.updateTo() like described here: https://greensock.com/docs/v2/TweenMax/updateTo() How would I solve this using the new gsap Version 3? I'm using npm with the bonus packages.
  11. Hi @GreenSock, sorry for the late response – was on holidays for the week. I don't know of any risks of adding it to the package.json. I think it would make it much more intuitive to many of us, if it would 'just work', without using the /umd/ files.
  12. OK, I found the solution: Browserify expects commonJS modules Babelify runs before the final Browserify process and converts all es6 modules to commonJS – files inside node_modules are ignored by default GSAP V2 uses es6 modules and resides inside node_modules, which caused the errors Adding this to the package.json of the npm GSAP solves this: "browserify": { "transform": ["babelify"] } Could you please put this inside by default? Could save a lot of people some trouble.
  13. So, I found the cause of this: https://github.com/babel/babelify#why-arent-files-in-node_modules-being-transformed Are you guys planning to pre-compile gsap for babelify/browserify, soon?
  14. ...This also creates problems when I use premium plugins like the ThrowPropsPlugin. I have to re-write this line: import { TweenLite, _gsScope, TweenPlugin, Ease } from "gsap/TweenLite.js"; to import { TweenLite, _gsScope, TweenPlugin, Ease } from "../gsap/TweenLite.js"; ...making it also reference the relative folder outside the default node_modules location.
  15. Hi there, I'm having problems once again with babelify and gsap. When importing any file from gsap: import TweenLite from 'gsap/TweenLite'; ...I keep getting this error in the console: SyntaxError: 'import' and 'export' may only appear at the top level (22:0) while parsing [...]/node_modules/gsap/TweenLite.js [...] is my local path. The file exists. It works just fine, if I copy the full gsap folder in my project and reference it relatively: import TweenLite from '../gsap/TweenLite'; This is not related to the many issues in the in