Jump to content
Search Community

StGewehr

Members
  • Posts

    5
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

StGewehr's Achievements

  1. Hi, GreenSock Team! Please, have a look on the Pen. On each document click it will launch the timeline, which fires the onStart callback twice(!). The bug is new for 3.7.0, because I cannot reproduce it on the older 3.6.0. Thanks, Iurii
  2. Hi @OSUblake ! My thanks for quick response. Actually, I was very close, I just split declaration and addition of a method to prototype into different files, and it works fine. So it should look something like this (perhaps for those who find this topic). //some index.ts /// <reference path="./utils/extensions/gsap.d.ts"/> import "./utils/extensions/gsap.extensions"; //gsap.d.ts declare namespace gsap.core { export interface Timeline { deepKill(): void; } } //gsap.extensions.ts import { gsap } from "gsap"; gsap.core.Timeline.prototype.deepKill = function () { this.getChildren(true, true, true).forEach((animation) => animation.kill()); this.kill(); }; Thanks, Yury
  3. Hi! I feel that it would be very handy, if I can extend the prototype of gsap.core.Timeline, and add TypeScript typings for these extension methods. For example, this way I can add typing for the "effects" (with extendTimeline = true). Or, like the "deepKill" method that was suggested by @Greensock. Here's what I'm trying to do: Are there any proper way? That "deepKill" call on the left should be "yellow" if it is caught by TS typing system. Thank you!
  4. Hi @GreenSock ! I got it, very clear. And your solution works just fine! Thank you for support!
  5. Hi guys, First of all, thank you for amazing tool! My question is about the onInterrupt callback, I put them on multiple nested timelines. Then I ".kill ()" the root timeline and expect that ALL onInterrupt will be called. At the moment, it works only on the root. Are my expectations wrong? The idea is that I have some structure of nested objects, and each object returns its own part of the animation, and I want to use onInterrupt to do clean up inside this "node tree". Otherwise ... I have to find all the children and kill them one by one? Or keep references to them while preparing the timeline, which will result in dirty code. Many thanks!
×
×
  • Create New...