Jump to content
Search Community

showing elements within boundary

vipulsharma144 test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Hello 

in the given pen i want to achieve :

 

1) Only the elements inside the circle area to be visible with ease effect of gsap.i.e on increasing the radius they must appear onto screen via gsap and on decreasing similarly should disappear

2) the elements to appear or disappear should be draggable with the container as the max limit of circle.

3) the elements should be clickable.

4) the circle opacity should be reversed i.e right now it is rgba(0,0,0,0.8) inside the circle i want it to be outside the circle so as to give the selection effect

 

waiting for help.

Thank you

 

 

 

 

post-36609-0-32521600-1433833981_thumb.png

See the Pen zGwyxR by vipulsharma144 (@vipulsharma144) on CodePen

Link to comment
Share on other sites

Thanks for demo.

 

Unfortunately these are not easy tasks or directly related to GSAP. I think you have your work cut out for you. 

 

You may want to research css clip path or SVG masking techniques.

https://css-tricks.com/almanac/properties/c/clip/

https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Clipping_and_masking

 

Frankly, I'm not confident you will get great results combining them with Google Maps (but I'm not entirely sure)

 

The rest of your questions seem related to mapping coordinates of elements in different containers to circular bounds of another element, and that just isn't something GSAP has built in at the moment. 

 

The only thing of marginal help I can reccomend is this demo that Blake created: http://codepen.io/osublake/pen/YXpdYN

It does circular hitTest() which perhaps you could reverse engineer in some fashion to detect when an element is within a certain radius.

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...