Jump to content
Search Community

GSAP Torch Reveal Effect

Matthew Meaklim test
Moderator Tag

Recommended Posts

Hello,

 

Excuse the title, not sure how to describe what I'm after really. And apologies if this question has already been asked.

 

I've set up a CodePen to assist... hopefully.

 

What I want is to essentially have the ".revealer" div follow the cursor to reveal the text underneath. I can get the parent div to move about no problem (commented out JS), however I'd also like the child div ".content" to remain in place, else do the exact opposite of what the parent does so that it looks like it remains in place, e.g. if ".revealer" was translated 50px 50px, ".content" would be translated -50px -50px.

 

Perhaps I'm way off with my thinking, but it my head it could work...

 

Many thanks as always.

 

Also, if it helps, the effect is similar to what's shown here, however I just want to reveal the child content, not show new content; http://minhpham.design/.

 

See the Pen GRzOvBe by ilimitadostudio (@ilimitadostudio) on CodePen

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...