Hi.
I *really* want to add pause in timeline by writing like this.
gsap.timeline().addSpace("+=1")
I saw an old post about this, with TimelineLite.prototype, so I tried converting to gsap 3.0 like below, but it doesn't work.
// https://greensock.com/forums/topic/9856-inserting-a-pausedelaywait-into-timeline/?do=findComment&comment=41126&_backrid=69387
// TimelineLite.prototype.addSpace = function (position) {
// return this.set({}, {}, position);
// };
gsap.timeline.prototype.addSpace = function (position) {
return this.set({}, {}, position);
};
Now I want to use registerEffect, but it produces error when I deploy. (it works fine in development, weirdly)
I also made codepen URL. It doesn't work in codepen as well.
gsap.registerEffect({
name: "addSpace",
effect: () => {
return gsap.set({}, {})
},
extendTimeline: true,
})
tl.addSpace("+=0.5);
// DOMException: Failed to execute 'querySelectorAll' on 'Document': '+=0.5' is not a valid selector.
I'm working on a project that requires a lot of adding pause between tweens, so I really want to make this work.
I think the error is about not specifying targets, but I can't figure it out how to fix it.