diff --git a/src/constants/code/TextAnimations/blurTextCode.ts b/src/constants/code/TextAnimations/blurTextCode.ts index c4e998c..f7536e7 100644 --- a/src/constants/code/TextAnimations/blurTextCode.ts +++ b/src/constants/code/TextAnimations/blurTextCode.ts @@ -1,18 +1,15 @@ -import code from '@content/TextAnimations/BlurText/BlurText.vue?raw'; import { createCodeObject } from '@/types/code'; +import code from '@content/TextAnimations/BlurText/BlurText.vue?raw'; export const blurText = createCodeObject(code, 'TextAnimations/BlurText', { installation: `npm install motion-v`, usage: ` diff --git a/src/content/TextAnimations/BlurText/BlurText.vue b/src/content/TextAnimations/BlurText/BlurText.vue index d21d1b0..420d15c 100644 --- a/src/content/TextAnimations/BlurText/BlurText.vue +++ b/src/content/TextAnimations/BlurText/BlurText.vue @@ -1,81 +1,99 @@ - + handleAnimationComplete(index)" + @animation-complete="handleAnimationComplete(index)" + style="display: inline-block; will-change: transform, filter, opacity" > - {{ segment === ' ' ? '\u00A0' : segment - }}{{ animateBy === 'words' && index < elements.length - 1 ? '\u00A0' : '' }} + {{ segment === ' ' ? '\u00A0' : segment }} + diff --git a/src/demo/TextAnimations/BlurTextDemo.vue b/src/demo/TextAnimations/BlurTextDemo.vue index 045f27a..1ef466c 100644 --- a/src/demo/TextAnimations/BlurTextDemo.vue +++ b/src/demo/TextAnimations/BlurTextDemo.vue @@ -1,33 +1,24 @@ - + { - showCallback && showToast(); - } - " + :delay="delay" + class-name="blur-text-demo" + @animation-complete="showToast" /> - - - + Animate By: @@ -35,7 +26,7 @@ Direction: @@ -43,11 +34,15 @@ - - - - - + @@ -66,30 +61,26 @@
+
handleAnimationComplete(index)" + @animation-complete="handleAnimationComplete(index)" + style="display: inline-block; will-change: transform, filter, opacity" > - {{ segment === ' ' ? '\u00A0' : segment - }}{{ animateBy === 'words' && index < elements.length - 1 ? '\u00A0' : '' }} + {{ segment === ' ' ? '\u00A0' : segment }} +