Jump to content
GreenSock

Dushyant Kumar

Members
  • Posts

    12
  • Joined

  • Last visited

Dushyant Kumar's Achievements

1

Reputation

  1. Thanks...🤍 I tried but it seems repeat is not working I think I'm missing something or doing wrong have a look, the same CodePen I've edited
  2. I want to rotate the box on mouse move 1. when cursor goes UPSIDE box will rotate anti-clock-wise 2. when cursor goes DOWNSIDE box will rotate clock-wise How it could be done with gsap ease Thanks
  3. I've Use I've Used gsap set to but not working gsap.set(dpkCursor, { xPercent: -50, yPercent: -50 });
  4. Hello sir ! My question is that can I use (https://cdnjs.cloudflare.com/ajax/libs/gsap/3.5.1/gsap.min.js) this only without any extra plugin as dependency for an open source (MIT) project I want to contribute is there any licensing issue
  5. Thankyou This work good window.addEventListener("mousemove", e => { // best Power4.out or sine.out gsap.to(dpkCursorMouse,{ duration:.10, x: e.x, y: e.y, ease:'sine.out', overwrite:true, }) });
  6. How Can I optimize This Sir const dpkCursor = document.querySelector(".dpkCursor"); gsap.set(dpkCursor, { xPercent: -50, yPercent: -50 }); let dpkCursorPos = { x: window.innerWidth / 2, y: window.innerHeight / 2 }; let dpkCursorMouse = { x: dpkCursorPos.x, y: dpkCursorPos.y }; window.addEventListener("mousemove", e => { // best Power4.out or sine.out gsap.to(dpkCursorMouse,{ duration:.25, x: e.x, y: e.y, ease:'sine.out' }) }); let dpkCursorSpeed = 1; let dpkCursorXSet = gsap.quickSetter(dpkCursor, "x", "px"); let dpkCursorySet = gsap.quickSetter(dpkCursor, "y", "px"); gsap.ticker.add(() => { dpkCursorPos.x += (dpkCursorMouse.x - dpkCursorPos.x) * dpkCursorSpeed; dpkCursorPos.y += (dpkCursorMouse.y - dpkCursorPos.y) * dpkCursorSpeed; dpkCursorXSet(dpkCursorPos.x); dpkCursorySet(dpkCursorPos.y); });
  7. I want Some Smoothness so i need some animation inside mousemove and for performance optimization i used ticker what is the best way to do so gsap.to(dpkCursorMouse,{ duration:.25, x: e.x, y: e.y, ease:'sine.out' })
  8. Yeh Sir i want to make it default whenever users scroll Plz Suggest some Optimization Thankyou so much for reply
  9. Hello Sir ! I want Some Optimization On my Custom Cursor Example and most importantly i want to remove .hover-active on scroll ( plz suggest some logic in the place where i comment in codepen ) in the best way as calling a function on scroll may create lag or jank
×