Last active
February 18, 2024 04:42
-
-
Save rylanharper/a4856c2f96996da157800ca1bc5bc4b6 to your computer and use it in GitHub Desktop.
Basic gsap menu with clipPath in Nuxt3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { gsap } from 'gsap' | |
| import { CustomEase } from 'gsap/CustomEase' | |
| import { ScrollTrigger } from 'gsap/ScrollTrigger' | |
| import { ScrollToPlugin } from 'gsap/ScrollToPlugin' | |
| export default defineNuxtPlugin(async () => { | |
| gsap.registerPlugin(CustomEase, ScrollToPlugin, ScrollTrigger) | |
| return { | |
| provide: { gsap, CustomEase, ScrollToPlugin, ScrollTrigger } | |
| } | |
| }) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export default () => { | |
| const nuxtApp = useNuxtApp() | |
| return { | |
| gsap: nuxtApp.$gsap, | |
| CustomEase: nuxtApp.$CustomEase, | |
| ScrollTrigger: nuxtApp.$ScrollTrigger, | |
| ScrollToPlugin: nuxtApp.$ScrollToPlugin | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment