Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replaces images and reuse #32

Open
Spomsoree opened this issue Nov 13, 2020 · 0 comments
Open

Replaces images and reuse #32

Spomsoree opened this issue Nov 13, 2020 · 0 comments

Comments

@Spomsoree
Copy link

I've got the following setup:

I'm using a mask with a video in the background.
Based on the scroll position the video will be replaced.
The transition should be with the distortion effect.

This works fine, but I get the error from this issue: #23
Also relates to: #14
I thought I could replace the images and run the .next() event, but doesn't work.

if (!distortion) {
        distortion = new hoverEffect({
            hover:             false,
            parent:            videoContainer.get(0),
            image1:            lastVideo.thumbnail,
            image2:            nextVideo.thumbnail,
            intensity:         0.3,
            displacementImage: '/images/distortion.jpg',
        });
    } else {
        distortion.image1 = lastVideo.thumbnail;
        distortion.image2 = nextVideo.thumbnail;
    }

    distortion.next();

Any ideas on how to resolve this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant