Jump to content
GreenSock

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

How to add findShadeIndex to react app

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

I am a club green sock member so i use the bonus NPM files for all my GSAP imports using es6 methods.. Where do i get findShapeIndex?

Share this post


Link to post
Share on other sites

thanks, sorry i am new to all of this... how do i import from that?

Share this post


Link to post
Share on other sites

It just a function. Copy and paste it into a file, and export it.

 

export function findShapeIndex(target, endShape, vars) {
  ...
}

 

  • Like 4

Share this post


Link to post
Share on other sites
<script src='https://s3-us-west-2.amazonaws.com/s.cdpn.io/16327/findShapeIndex.js'></script> // in index.html
 
// in component
const findShapeIndex = window.findShapeIndex 
findShapeIndex("#shape1", "#shape2")
 

Share this post


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

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. 


  • Recently Browsing   0 members

    No registered users viewing this page.

×