๐ฟ๏ธ
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
| # Frontend Design Guideline | |
| This document summarizes key frontend design principles and rules, showcasing | |
| recommended patterns. Follow these guidelines when writing frontend code. | |
| # Readability | |
| Improving the clarity and ease of understanding code. |
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 {useState, useEffect, useRef, useCallback} from 'react' | |
| // ์ ๋๋ฉ์ด์ ํ์ด๋ฐ ํจ์ | |
| const TIMING_FUNCTIONS = { | |
| linear: (t: number) => t, | |
| easeInOut: (t: number) => (t < 0.5 ? 4 * t * t * t : 1 - Math.pow(-2 * t + 2, 3) / 2), | |
| easeIn: (t: number) => t * t * t, | |
| easeOut: (t: number) => 1 - Math.pow(1 - t, 3), | |
| bounce: (t: number) => { | |
| const n1 = 7.5625 |
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
| /** | |
| * ์ฃผ์ด์ง ๊ฐ์ด object ํ์ ์ธ์ง ๊ฒ์ฌํ๋ ํจ์ | |
| * @param {*} obj - ๊ฒ์ฌํ object | |
| * @returns {boolean} - ๊ฒ์ฌํ ๊ฐ์ด object๋ผ๋ฉด true, ์๋๋ผ๋ฉด false๋ฅผ ๋ฐํ | |
| */ | |
| function isObject(obj) { | |
| return obj !== null && typeof obj === 'object'; | |
| } | |
| /** |
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
| /** | |
| * ๋ฒ์ ์๋ฌด๊ต์ก์ ์ด์คํ๊ณ ์ถ์ง๋ง ์๊ฐ๋ฝ์ ๊น๋ฑํ๊ธฐ ์ซ์ผ์ ๋ถ๋ค์ ์ํด์ ๊ฐ๋จํ ์คํฌ๋ฆฝํธ๋ฅผ ์์ฑํด๋ณด์์ต๋๋ค. | |
| * ์ฐธ๊ณ ๋ก ์ํ์ ์ง์ ์์ํ์ ์ผ ํฉ๋๋ค :) | |
| * - https://edu.smebiz.co.kr/main/main.php ์ฌ์ดํธ์์ ์ฌ์ฉ ๊ฐ๋ฅํฉ๋๋ค. | |
| * - ์์ ์ฌ์ ํ์ ์์ [๊ฐ๋ฐ์ ๋๊ตฌ]์ [์ฝ์]์ ์ด ์ฝ๋๋ฅผ ์ ๋ ฅ ํ ์คํํด์ฃผ์ธ์. | |
| */ | |
| const ticker = setInterval(() => { | |
| const $iframe = document.getElementById("mPlayer"); | |
| const $context = $iframe.contentDocument; |