ansuft
Content Type
Profiles
Forums
Store
Blog
Product
Showcase
FAQ
Downloads
Posts posted by ansuft
-
-
-
-
Hi, I have this part of a slide code:
function nextSlide(pageNumber) {
const nextPage = pages[pageNumber];
const currentPage = pages[current];
const nextText = nextPage.querySelector("h1");
const tl = new TimelineMax({
onStart: function() {
slides.forEach(slide => {
slide.style.pointerEvents = "none";
});
},
onComplete: function() {
slides.forEach(slide => {
slide.style.pointerEvents = "all";
});
}
});tl.fromTo(
currentPage,
0.3,
{ opacity: 1, pointerEvents: "all" },
{ opacity: 0, pointerEvents: "none" }
)
.fromTo(
nextPage,
0.3,
{ opacity: 0, pointerEvents: "none" },
{ opacity: 1, pointerEvents: "all" },
"-=0.6"
)
fromTo(nextText, 0.3, { opacity: 0, y: 0 }, { opacity: 1, y: 0 });current = pageNumber;
}And I don't know how to implement a splitText in 'h1' (nexText) like here:
In particular, I don't know how to make these two parts combine:
const nextText = nextPage.querySelector ("h1");
and
var mySplitText = new SplitText ("# quote", {type: "chars, words, lines"})See the Pen aVJRBg by GreenSock (@GreenSock) on CodePen
-
On 8/10/2017 at 10:04 AM, OSUblake said:
Another variation. This will let you interrupt the animation.
How could I create a ".activate div" to change attributes with gsap?
-
splitText implementation
in GSAP
Posted
Thanks, it works correctly. Is it possible that the effect is also done when leaving? Don't let me combine staggerTo and staggerFrom