Jump to content
Search Community

enisq

Members
  • Posts

    3
  • Joined

  • Last visited

Everything posted by enisq

  1. Thanks for reply Zach. To make sure I not mix anything, this is what I run: ng new testprj npm install --save gsap ng serve. this is the code: import 'gsap'; ngOnInit(): void { gsap.set(".ball", {xPercent: -50, yPercent: -50}); const ball = document.querySelector(".ball"); const pos = { x: window.innerWidth / 2, y: window.innerHeight / 2 }; const mouse = { x: pos.x, y: pos.y }; const speed = 0.1; const xSet = gsap.quickSetter(ball, "x", "px"); const ySet = gsap.quickSetter(ball, "y", "px"); window.addEventListener("mousemove", e => { mouse.x = e.x; mouse.y = e.y; }); gsap.ticker.add(() => { pos.x += (mouse.x - pos.x) * speed; pos.y += (mouse.y - pos.y) * speed; xSet(pos.x); ySet(pos.y); }); } but I still get the same output: Property 'quickSetter' does not exist on type 'typeof gsap'. for both xSet and ySet. Any opinions,please?
  2. Hi, I am encountering this problem continuously although I have tried to do many manipulations with importing "@types". Version 3: Property 'quickSetter' does not exist on type 'typeof gsap' Could someone pose a sample of implementation in Angular 8 + gaps.quickSetter property? Thanks,
×
×
  • Create New...