From 73e7fe243f681612b06853e8d3b94fb172313438 Mon Sep 17 00:00:00 2001 From: HyunWoo Choi <116826162+chhw130@users.noreply.github.com> Date: Sat, 16 Dec 2023 21:36:13 +0900 Subject: [PATCH] feat(lottie) : lottie json --- component/Funnel/MainFunnel.tsx | 4 +- component/card/ChattingRoom.tsx | 23 +- component/card/DietChattingMsgCard.tsx | 22 +- component/form/UserPhysicForm.tsx | 12 +- component/icon/SaladIcon.tsx | 549 +++++++++++++++++++++++++ package-lock.json | 31 ++ package.json | 1 + src/app/layout.tsx | 1 - src/app/main/page.tsx | 17 +- src/app/page.tsx | 1 - utils/api/AxiosSetting.ts | 16 +- utils/hooks/usePostUserDiet.ts | 3 +- utils/json/loading.json | 414 +++++++++++++++++++ 13 files changed, 1059 insertions(+), 35 deletions(-) create mode 100644 component/icon/SaladIcon.tsx create mode 100644 utils/json/loading.json diff --git a/component/Funnel/MainFunnel.tsx b/component/Funnel/MainFunnel.tsx index 82bfd2d..554f57c 100644 --- a/component/Funnel/MainFunnel.tsx +++ b/component/Funnel/MainFunnel.tsx @@ -51,7 +51,7 @@ const MainFunnel = ({ setFunnel }: MainFunnelPropsType) => { 을 추천 받자! - + 나.. 오늘 얼마나 먹었더라? @@ -69,7 +69,7 @@ const MainFunnel = ({ setFunnel }: MainFunnelPropsType) => { diff --git a/component/card/ChattingRoom.tsx b/component/card/ChattingRoom.tsx index 765a1c1..345e432 100644 --- a/component/card/ChattingRoom.tsx +++ b/component/card/ChattingRoom.tsx @@ -5,7 +5,6 @@ import DietChattingMsgCart from "./DietChattingMsgCard"; import ChattingInput from "../input/ChattingInput"; import HealthIcon from "../icon/HealthIcon"; import UserChattingMsgCard from "./UserChattingMsgCard"; -import { usePostUserDiet } from "../../utils/hooks/usePostUserDiet"; import { SubmitHandler, UseFormHandleSubmit, @@ -38,12 +37,8 @@ const ChattingRoom = ({ + + 아침은 계란후라이 점심은 마라탕 저녁은 칼국수를 먹었어 + + + 아침은 계란후라이 점심은 마라탕 저녁은 칼국수를 먹었어 + + + 아침은 계란후라이 점심은 마라탕 저녁은 칼국수를 먹었어 + + + 아침은 계란후라이 점심은 마라탕 저녁은 칼국수를 먹었어 + 아침은 계란후라이 점심은 마라탕 저녁은 칼국수를 먹었어 diff --git a/component/card/DietChattingMsgCard.tsx b/component/card/DietChattingMsgCard.tsx index dcafe56..ae7a8b1 100644 --- a/component/card/DietChattingMsgCard.tsx +++ b/component/card/DietChattingMsgCard.tsx @@ -12,10 +12,14 @@ import { Heading, Spinner, Text, + VStack, } from "@chakra-ui/react"; import WarningIcon from "../icon/WarningIcon"; import { useRouter } from "next/navigation"; import { DietResponse } from "../../utils/api/AxiosSetting"; +import Lottie from "lottie-react"; +import LoadingLotte from "../../utils/json/loading.json"; +import SaladIcon from "../icon/SaladIcon"; interface DietChattingMsgCard extends CardProps { isLoading: boolean; @@ -30,14 +34,24 @@ const DietChattingMsgCart = ({ return ( <> - {isLoading && ( - - + {!isLoading && ( + + + + + + + + 식선생이 오늘의 +
+ 식사를 분석하고 있어요 +
+
)} {dietResponseData && !isLoading && ( diff --git a/component/form/UserPhysicForm.tsx b/component/form/UserPhysicForm.tsx index abfb2fc..27ccc9a 100644 --- a/component/form/UserPhysicForm.tsx +++ b/component/form/UserPhysicForm.tsx @@ -33,7 +33,7 @@ const UserPhysicForm = ({ userInfo }: UserPhysicsFormPropsType) => { const path = usePathname(); - const { postUserInfoMutation, isLoading, data } = usePostUserInfo(); + const { postUserInfoMutation, isLoading, data: userId } = usePostUserInfo(); const { handleSubmit, register, @@ -50,11 +50,11 @@ const UserPhysicForm = ({ userInfo }: UserPhysicsFormPropsType) => { targetweight: parseInt(data.targetweight), }; - if (path === "/signup") { - localStorage.setItem("userInfo", JSON.stringify(newUserInfo)); - } else { - await postUserInfoMutation(newUserInfo); - } + await postUserInfoMutation(newUserInfo); + + console.log(userId); + + localStorage.setItem("userId", userId.user_id); router.push("/main"); }; diff --git a/component/icon/SaladIcon.tsx b/component/icon/SaladIcon.tsx new file mode 100644 index 0000000..0da92e7 --- /dev/null +++ b/component/icon/SaladIcon.tsx @@ -0,0 +1,549 @@ +import React from "react"; + +const SaladIcon = () => { + return ( + <> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ); +}; + +export default SaladIcon; diff --git a/package-lock.json b/package-lock.json index e652eaa..65036fa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -16,6 +16,7 @@ "@tanstack/react-query-devtools": "^4.36.1", "axios": "^1.6.2", "framer-motion": "^10.16.16", + "lottie-react": "^2.4.0", "next": "13.5.6", "react": "^18", "react-dom": "^18", @@ -4368,6 +4369,23 @@ "loose-envify": "cli.js" } }, + "node_modules/lottie-react": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/lottie-react/-/lottie-react-2.4.0.tgz", + "integrity": "sha512-pDJGj+AQlnlyHvOHFK7vLdsDcvbuqvwPZdMlJ360wrzGFurXeKPr8SiRCjLf3LrNYKANQtSsh5dz9UYQHuqx4w==", + "dependencies": { + "lottie-web": "^5.10.2" + }, + "peerDependencies": { + "react": "^16.8.0 || ^17.0.0 || ^18.0.0", + "react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0" + } + }, + "node_modules/lottie-web": { + "version": "5.12.2", + "resolved": "https://registry.npmjs.org/lottie-web/-/lottie-web-5.12.2.tgz", + "integrity": "sha512-uvhvYPC8kGPjXT3MyKMrL3JitEAmDMp30lVkuq/590Mw9ok6pWcFCwXJveo0t5uqYw1UREQHofD+jVpdjBv8wg==" + }, "node_modules/lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", @@ -9052,6 +9070,19 @@ "js-tokens": "^3.0.0 || ^4.0.0" } }, + "lottie-react": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/lottie-react/-/lottie-react-2.4.0.tgz", + "integrity": "sha512-pDJGj+AQlnlyHvOHFK7vLdsDcvbuqvwPZdMlJ360wrzGFurXeKPr8SiRCjLf3LrNYKANQtSsh5dz9UYQHuqx4w==", + "requires": { + "lottie-web": "^5.10.2" + } + }, + "lottie-web": { + "version": "5.12.2", + "resolved": "https://registry.npmjs.org/lottie-web/-/lottie-web-5.12.2.tgz", + "integrity": "sha512-uvhvYPC8kGPjXT3MyKMrL3JitEAmDMp30lVkuq/590Mw9ok6pWcFCwXJveo0t5uqYw1UREQHofD+jVpdjBv8wg==" + }, "lru-cache": { "version": "6.0.0", "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", diff --git a/package.json b/package.json index 4e01919..e81506c 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,7 @@ "@tanstack/react-query-devtools": "^4.36.1", "axios": "^1.6.2", "framer-motion": "^10.16.16", + "lottie-react": "^2.4.0", "next": "13.5.6", "react": "^18", "react-dom": "^18", diff --git a/src/app/layout.tsx b/src/app/layout.tsx index 54015fb..53ab5e9 100644 --- a/src/app/layout.tsx +++ b/src/app/layout.tsx @@ -1,7 +1,6 @@ import type { Metadata } from "next"; import { ChakraLayout } from "@/app/ChakraLayout"; import QueryLayout from "./QueryLayout"; -import OGImg from "../../utils/img/OGImg.jpg"; export const metadata: Metadata = { metadataBase: new URL( diff --git a/src/app/main/page.tsx b/src/app/main/page.tsx index f292d65..f74fd8c 100644 --- a/src/app/main/page.tsx +++ b/src/app/main/page.tsx @@ -12,7 +12,11 @@ import HealthMountainIcon from "../../../component/icon/HealthMountainIcon"; import DietStateSection from "../../../component/section/DietStateSection"; import { usePostUserDiet } from "../../../utils/hooks/usePostUserDiet"; import { SubmitHandler, useForm } from "react-hook-form"; -import { useEffect } from "react"; + +export interface UserPostDietData { + msg: string; + userId: string | null; +} const Page = () => { const router = useRouter(); @@ -31,8 +35,13 @@ const Page = () => { } = useForm(); const onSubmit: SubmitHandler = async (data) => { + const userId = localStorage.getItem("userId"); + const userInfoData: UserPostDietData = { + msg: data.msg, + userId, + }; reset(); - await postUserDietMutation(data.msg); + await postUserDietMutation(userInfoData); }; return ( @@ -40,14 +49,12 @@ const Page = () => { @@ -55,7 +62,7 @@ const Page = () => { - + {false ? ( { }; export const postUserInfo = async (userInfo: UserInfoType) => { - const jwtToken = localStorage.getItem(`jwt`); - const res = await instacne.post("/users", userInfo, { - headers: { Authorization: `Bearer ${jwtToken}` }, - withCredentials: true, - }); + const res = await instacne.post("/users", userInfo); return res.data; }; -export const postUserDiet = async (diet: Object) => { +export const postUserDiet = async (postDietData: UserPostDietData) => { const query = { - ["query"]: diet, + ["query"]: postDietData.msg, }; - const res = await instacne.post("/users/8/diet-exercise-advice", query); + const res = await instacne.post( + `/users/${postDietData.userId}/diet-exercise-advice`, + query + ); const data: DietResponse = res.data; return data; }; diff --git a/utils/hooks/usePostUserDiet.ts b/utils/hooks/usePostUserDiet.ts index 655660a..45ac781 100644 --- a/utils/hooks/usePostUserDiet.ts +++ b/utils/hooks/usePostUserDiet.ts @@ -1,5 +1,6 @@ import { useMutation } from "@tanstack/react-query"; import { postUserDiet } from "../api/AxiosSetting"; +import { UserPostDietData } from "@/app/main/page"; export const usePostUserDiet = () => { const { @@ -7,7 +8,7 @@ export const usePostUserDiet = () => { mutateAsync: postUserDietMutation, isLoading, } = useMutation({ - mutationFn: (diet: string) => postUserDiet(diet), + mutationFn: (data: UserPostDietData) => postUserDiet(data), onError: () => {}, onSuccess: () => {}, }); diff --git a/utils/json/loading.json b/utils/json/loading.json new file mode 100644 index 0000000..ef3756b --- /dev/null +++ b/utils/json/loading.json @@ -0,0 +1,414 @@ +{ + "v": "5.7.8", + "fr": 29.9700012207031, + "ip": 0, + "op": 30.0000012219251, + "w": 500, + "h": 500, + "nm": "Loading", + "ddd": 0, + "assets": [], + "layers": [ + { + "ddd": 0, + "ind": 1, + "ty": 4, + "nm": "Shape Layer 4", + "sr": 1, + "ks": { + "o": { "a": 0, "k": 100, "ix": 11 }, + "r": { "a": 0, "k": 0, "ix": 10 }, + "p": { + "a": 1, + "k": [ + { + "i": { "x": 0.833, "y": 1 }, + "o": { "x": 0.167, "y": 0 }, + "t": 13, + "s": [546, 266, 0], + "to": [0, -11, 0], + "ti": [0, 0, 0] + }, + { + "i": { "x": 0.833, "y": 1 }, + "o": { "x": 0.167, "y": 0 }, + "t": 17, + "s": [546, 200, 0], + "to": [0, 0, 0], + "ti": [0, -11, 0] + }, + { "t": 21.0000008553475, "s": [546, 266, 0] } + ], + "ix": 2, + "l": 2, + "x": "var $bm_rt;\nvar $bm_rt;\nvar n, n, t, t, v, amp, freq, decay;\n$bm_rt = $bm_rt = n = 0;\nif (numKeys > 0) {\n $bm_rt = $bm_rt = n = nearestKey(time).index;\n if (key(n).time > time) {\n n--;\n }\n}\nif (n == 0) {\n $bm_rt = $bm_rt = t = 0;\n} else {\n $bm_rt = $bm_rt = t = sub(time, key(n).time);\n}\nif (n > 0 && t < 1) {\n v = velocityAtTime(sub(key(n).time, div(thisComp.frameDuration, 10)));\n amp = 0.05;\n freq = 4;\n decay = 8;\n $bm_rt = $bm_rt = add(value, div(mul(mul(v, amp), Math.sin(mul(mul(mul(freq, t), 2), Math.PI))), Math.exp(mul(decay, t))));\n} else {\n $bm_rt = $bm_rt = value;\n}" + }, + "a": { "a": 0, "k": [0, 0, 0], "ix": 1, "l": 2 }, + "s": { "a": 0, "k": [100, 100, 100], "ix": 6, "l": 2 } + }, + "ao": 0, + "shapes": [ + { + "ty": "gr", + "it": [ + { + "d": 1, + "ty": "el", + "s": { "a": 0, "k": [45.137, 45.137], "ix": 2 }, + "p": { "a": 0, "k": [0, 0], "ix": 3 }, + "nm": "Ellipse Path 1", + "mn": "ADBE Vector Shape - Ellipse", + "hd": false + }, + { + "ty": "st", + "c": { "a": 0, "k": [0.8, 0.9608, 0.902, 1], "ix": 3 }, + "o": { "a": 0, "k": 100, "ix": 4 }, + "w": { "a": 0, "k": 8, "ix": 5 }, + "lc": 1, + "lj": 1, + "ml": 4, + "bm": 0, + "nm": "Stroke 1", + "mn": "ADBE Vector Graphic - Stroke", + "hd": false + }, + { + "ty": "fl", + "c": { "a": 0, "k": [0.8, 0.9608, 0.902, 1], "ix": 4 }, + "o": { "a": 0, "k": 100, "ix": 5 }, + "r": 1, + "bm": 0, + "nm": "Fill 1", + "mn": "ADBE Vector Graphic - Fill", + "hd": false + }, + { + "ty": "tr", + "p": { "a": 0, "k": [-167.432, -17.432], "ix": 2 }, + "a": { "a": 0, "k": [0, 0], "ix": 1 }, + "s": { "a": 0, "k": [100, 100], "ix": 3 }, + "r": { "a": 0, "k": 0, "ix": 6 }, + "o": { "a": 0, "k": 100, "ix": 7 }, + "sk": { "a": 0, "k": 0, "ix": 4 }, + "sa": { "a": 0, "k": 0, "ix": 5 }, + "nm": "Transform" + } + ], + "nm": "Ellipse 1", + "np": 3, + "cix": 2, + "bm": 0, + "ix": 1, + "mn": "ADBE Vector Group", + "hd": false + } + ], + "ip": 0, + "op": 30.0000012219251, + "st": 0, + "bm": 0 + }, + { + "ddd": 0, + "ind": 2, + "ty": 4, + "nm": "Shape Layer 3", + "sr": 1, + "ks": { + "o": { "a": 0, "k": 100, "ix": 11 }, + "r": { "a": 0, "k": 0, "ix": 10 }, + "p": { + "a": 1, + "k": [ + { + "i": { "x": 0.833, "y": 1 }, + "o": { "x": 0.167, "y": 0 }, + "t": 9, + "s": [454, 266, 0], + "to": [0, -11, 0], + "ti": [0, 0, 0] + }, + { + "i": { "x": 0.833, "y": 1 }, + "o": { "x": 0.167, "y": 0 }, + "t": 13, + "s": [454, 200, 0], + "to": [0, 0, 0], + "ti": [0, -11, 0] + }, + { "t": 17.0000006924242, "s": [454, 266, 0] } + ], + "ix": 2, + "l": 2, + "x": "var $bm_rt;\nvar $bm_rt;\nvar n, n, t, t, v, amp, freq, decay;\n$bm_rt = $bm_rt = n = 0;\nif (numKeys > 0) {\n $bm_rt = $bm_rt = n = nearestKey(time).index;\n if (key(n).time > time) {\n n--;\n }\n}\nif (n == 0) {\n $bm_rt = $bm_rt = t = 0;\n} else {\n $bm_rt = $bm_rt = t = sub(time, key(n).time);\n}\nif (n > 0 && t < 1) {\n v = velocityAtTime(sub(key(n).time, div(thisComp.frameDuration, 10)));\n amp = 0.05;\n freq = 4;\n decay = 8;\n $bm_rt = $bm_rt = add(value, div(mul(mul(v, amp), Math.sin(mul(mul(mul(freq, t), 2), Math.PI))), Math.exp(mul(decay, t))));\n} else {\n $bm_rt = $bm_rt = value;\n}" + }, + "a": { "a": 0, "k": [0, 0, 0], "ix": 1, "l": 2 }, + "s": { "a": 0, "k": [100, 100, 100], "ix": 6, "l": 2 } + }, + "ao": 0, + "shapes": [ + { + "ty": "gr", + "it": [ + { + "d": 1, + "ty": "el", + "s": { "a": 0, "k": [45.137, 45.137], "ix": 2 }, + "p": { "a": 0, "k": [0, 0], "ix": 3 }, + "nm": "Ellipse Path 1", + "mn": "ADBE Vector Shape - Ellipse", + "hd": false + }, + { + "ty": "st", + "c": { "a": 0, "k": [0.502, 0.902, 0.7569, 1], "ix": 3 }, + "o": { "a": 0, "k": 100, "ix": 4 }, + "w": { "a": 0, "k": 8, "ix": 5 }, + "lc": 1, + "lj": 1, + "ml": 4, + "bm": 0, + "nm": "Stroke 1", + "mn": "ADBE Vector Graphic - Stroke", + "hd": false + }, + { + "ty": "fl", + "c": { "a": 0, "k": [0.502, 0.902, 0.7569, 1], "ix": 4 }, + "o": { "a": 0, "k": 100, "ix": 5 }, + "r": 1, + "bm": 0, + "nm": "Fill 1", + "mn": "ADBE Vector Graphic - Fill", + "hd": false + }, + { + "ty": "tr", + "p": { "a": 0, "k": [-167.432, -17.432], "ix": 2 }, + "a": { "a": 0, "k": [0, 0], "ix": 1 }, + "s": { "a": 0, "k": [100, 100], "ix": 3 }, + "r": { "a": 0, "k": 0, "ix": 6 }, + "o": { "a": 0, "k": 100, "ix": 7 }, + "sk": { "a": 0, "k": 0, "ix": 4 }, + "sa": { "a": 0, "k": 0, "ix": 5 }, + "nm": "Transform" + } + ], + "nm": "Ellipse 1", + "np": 3, + "cix": 2, + "bm": 0, + "ix": 1, + "mn": "ADBE Vector Group", + "hd": false + } + ], + "ip": 0, + "op": 30.0000012219251, + "st": -359.00001462237, + "bm": 0 + }, + { + "ddd": 0, + "ind": 3, + "ty": 4, + "nm": "Shape Layer 2", + "sr": 1, + "ks": { + "o": { "a": 0, "k": 100, "ix": 11 }, + "r": { "a": 0, "k": 0, "ix": 10 }, + "p": { + "a": 1, + "k": [ + { + "i": { "x": 0.833, "y": 1 }, + "o": { "x": 0.167, "y": 0 }, + "t": 4, + "s": [365, 266, 0], + "to": [0, -11, 0], + "ti": [0, 0, 0] + }, + { + "i": { "x": 0.833, "y": 1 }, + "o": { "x": 0.167, "y": 0 }, + "t": 9, + "s": [365, 200, 0], + "to": [0, 0, 0], + "ti": [0, -11, 0] + }, + { "t": 13.0000005295009, "s": [365, 266, 0] } + ], + "ix": 2, + "l": 2, + "x": "var $bm_rt;\nvar $bm_rt;\nvar n, n, t, t, v, amp, freq, decay;\n$bm_rt = $bm_rt = n = 0;\nif (numKeys > 0) {\n $bm_rt = $bm_rt = n = nearestKey(time).index;\n if (key(n).time > time) {\n n--;\n }\n}\nif (n == 0) {\n $bm_rt = $bm_rt = t = 0;\n} else {\n $bm_rt = $bm_rt = t = sub(time, key(n).time);\n}\nif (n > 0 && t < 1) {\n v = velocityAtTime(sub(key(n).time, div(thisComp.frameDuration, 10)));\n amp = 0.05;\n freq = 4;\n decay = 8;\n $bm_rt = $bm_rt = add(value, div(mul(mul(v, amp), Math.sin(mul(mul(mul(freq, t), 2), Math.PI))), Math.exp(mul(decay, t))));\n} else {\n $bm_rt = $bm_rt = value;\n}" + }, + "a": { "a": 0, "k": [0, 0, 0], "ix": 1, "l": 2 }, + "s": { "a": 0, "k": [100, 100, 100], "ix": 6, "l": 2 } + }, + "ao": 0, + "shapes": [ + { + "ty": "gr", + "it": [ + { + "d": 1, + "ty": "el", + "s": { "a": 0, "k": [45.137, 45.137], "ix": 2 }, + "p": { "a": 0, "k": [0, 0], "ix": 3 }, + "nm": "Ellipse Path 1", + "mn": "ADBE Vector Shape - Ellipse", + "hd": false + }, + { + "ty": "st", + "c": { "a": 0, "k": [0.0078, 0.7176, 0.4627, 1], "ix": 3 }, + "o": { "a": 0, "k": 100, "ix": 4 }, + "w": { "a": 0, "k": 8, "ix": 5 }, + "lc": 1, + "lj": 1, + "ml": 4, + "bm": 0, + "nm": "Stroke 1", + "mn": "ADBE Vector Graphic - Stroke", + "hd": false + }, + { + "ty": "fl", + "c": { "a": 0, "k": [0.0078, 0.7176, 0.4627, 1], "ix": 4 }, + "o": { "a": 0, "k": 100, "ix": 5 }, + "r": 1, + "bm": 0, + "nm": "Fill 1", + "mn": "ADBE Vector Graphic - Fill", + "hd": false + }, + { + "ty": "tr", + "p": { "a": 0, "k": [-167.432, -17.432], "ix": 2 }, + "a": { "a": 0, "k": [0, 0], "ix": 1 }, + "s": { "a": 0, "k": [100, 100], "ix": 3 }, + "r": { "a": 0, "k": 0, "ix": 6 }, + "o": { "a": 0, "k": 100, "ix": 7 }, + "sk": { "a": 0, "k": 0, "ix": 4 }, + "sa": { "a": 0, "k": 0, "ix": 5 }, + "nm": "Transform" + } + ], + "nm": "Ellipse 1", + "np": 3, + "cix": 2, + "bm": 0, + "ix": 1, + "mn": "ADBE Vector Group", + "hd": false + } + ], + "ip": 0, + "op": 30.0000012219251, + "st": 0, + "bm": 0 + }, + { + "ddd": 0, + "ind": 4, + "ty": 4, + "nm": "Shape Layer 1", + "sr": 1, + "ks": { + "o": { "a": 0, "k": 100, "ix": 11 }, + "r": { "a": 0, "k": 0, "ix": 10 }, + "p": { + "a": 1, + "k": [ + { + "i": { "x": 0.833, "y": 1 }, + "o": { "x": 0.167, "y": 0 }, + "t": 0, + "s": [277, 266, 0], + "to": [0, -11, 0], + "ti": [0, 0, 0] + }, + { + "i": { "x": 0.833, "y": 1 }, + "o": { "x": 0.167, "y": 0 }, + "t": 4, + "s": [277, 200, 0], + "to": [0, 0, 0], + "ti": [0, -11, 0] + }, + { "t": 9.00000036657752, "s": [277, 266, 0] } + ], + "ix": 2, + "l": 2, + "x": "var $bm_rt;\nvar $bm_rt;\nvar n, n, t, t, v, amp, freq, decay;\n$bm_rt = $bm_rt = n = 0;\nif (numKeys > 0) {\n $bm_rt = $bm_rt = n = nearestKey(time).index;\n if (key(n).time > time) {\n n--;\n }\n}\nif (n == 0) {\n $bm_rt = $bm_rt = t = 0;\n} else {\n $bm_rt = $bm_rt = t = sub(time, key(n).time);\n}\nif (n > 0 && t < 1) {\n v = velocityAtTime(sub(key(n).time, div(thisComp.frameDuration, 10)));\n amp = 0.05;\n freq = 4;\n decay = 8;\n $bm_rt = $bm_rt = add(value, div(mul(mul(v, amp), Math.sin(mul(mul(mul(freq, t), 2), Math.PI))), Math.exp(mul(decay, t))));\n} else {\n $bm_rt = $bm_rt = value;\n}" + }, + "a": { "a": 0, "k": [0, 0, 0], "ix": 1, "l": 2 }, + "s": { "a": 0, "k": [100, 100, 100], "ix": 6, "l": 2 } + }, + "ao": 0, + "shapes": [ + { + "ty": "gr", + "it": [ + { + "d": 1, + "ty": "el", + "s": { "a": 0, "k": [45.137, 45.137], "ix": 2 }, + "p": { "a": 0, "k": [0, 0], "ix": 3 }, + "nm": "Ellipse Path 1", + "mn": "ADBE Vector Shape - Ellipse", + "hd": false + }, + { + "ty": "st", + "c": { "a": 0, "k": [0.1792, 0.4608, 0.3575, 1], "ix": 3 }, + "o": { "a": 0, "k": 100, "ix": 4 }, + "w": { "a": 0, "k": 8, "ix": 5 }, + "lc": 1, + "lj": 1, + "ml": 4, + "bm": 0, + "nm": "Stroke 1", + "mn": "ADBE Vector Graphic - Stroke", + "hd": false + }, + { + "ty": "fl", + "c": { "a": 0, "k": [0.1792, 0.4608, 0.3575, 1], "ix": 4 }, + "o": { "a": 0, "k": 100, "ix": 5 }, + "r": 1, + "bm": 0, + "nm": "Fill 1", + "mn": "ADBE Vector Graphic - Fill", + "hd": false + }, + { + "ty": "tr", + "p": { "a": 0, "k": [-167.432, -17.432], "ix": 2 }, + "a": { "a": 0, "k": [0, 0], "ix": 1 }, + "s": { "a": 0, "k": [100, 100], "ix": 3 }, + "r": { "a": 0, "k": 0, "ix": 6 }, + "o": { "a": 0, "k": 100, "ix": 7 }, + "sk": { "a": 0, "k": 0, "ix": 4 }, + "sa": { "a": 0, "k": 0, "ix": 5 }, + "nm": "Transform" + } + ], + "nm": "Ellipse 1", + "np": 3, + "cix": 2, + "bm": 0, + "ix": 1, + "mn": "ADBE Vector Group", + "hd": false + } + ], + "ip": 0, + "op": 30.0000012219251, + "st": 0, + "bm": 0 + } + ], + "markers": [] +}