Skip to content
This repository has been archived by the owner on Nov 5, 2023. It is now read-only.

Commit

Permalink
Remove paid GSAP plugins usage
Browse files Browse the repository at this point in the history
  • Loading branch information
d0rich committed Jul 9, 2023
1 parent 5179346 commit 4220128
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 16 deletions.
5 changes: 2 additions & 3 deletions components/d/character/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,8 @@ watch(
action: shapeAction.value?.$el,
profi: shapeProfi.value?.$el
}
if (isMorphSVGPluginInstalled()) {
// TODO: Replace with flubber
if (false) {
gsap.fromTo(
shapeToAnimate.value?.$el,
{ morphSVG: poseShapeMap[oldPose] },
Expand All @@ -112,12 +113,10 @@ watch(
<g v-if="!noShape">
<component
:is="initialSvgPath"
v-show="isMorphSVGPluginInstalled()"
ref="shapeToAnimate"
:class="shapeClass"
/>
<use
v-show="!isMorphSVGPluginInstalled()"
:class="shapeClass"
:href="useHref"
/>
Expand Down
8 changes: 0 additions & 8 deletions plugins/gsap.client.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,9 @@
// @ts-ignore
import consola from 'consola'
import gsap from 'gsap'
import { MotionPathPlugin } from 'gsap/MotionPathPlugin'
import { ScrollTrigger } from 'gsap/ScrollTrigger'
import { SplitText } from 'gsap/SplitText'
import { MorphSVGPlugin } from 'gsap/MorphSVGPlugin'

export default defineNuxtPlugin(() => {
gsap.registerPlugin(MotionPathPlugin)
gsap.registerPlugin(ScrollTrigger)
gsap.registerPlugin(SplitText)
gsap.registerPlugin(MorphSVGPlugin)
if (!isMorphSVGPluginInstalled())
consola.warn('Free GSAP is used. Morph SVG plugin is ignored.')
window.gsap = gsap
})
5 changes: 0 additions & 5 deletions utils/gsap.ts

This file was deleted.

0 comments on commit 4220128

Please sign in to comment.