Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
vipulsharma144

showing elements within boundary

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

×