A Pen by Seoh Char

Developer
Size
5,325 Kb
Views
6,072

How do I make an a pen by seoh char?

What is a a pen by seoh char? How do you make a a pen by seoh char? This script and codes were developed by Seoh Char on 14 December 2022, Wednesday.

A Pen by Seoh Char Previews

A Pen by Seoh Char - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>A Pen by Seoh Char</title>
</head>
<body> <script src='https://builds.framerjs.com/06a4df9/framer.js'></script> <script src="js/index.js"></script>
</body>
</html>

A Pen by Seoh Char - Script Codes JS Codes

/* * Utility to teardown and assembly Ja/Mo * * @see [Hangul Syllables(AC00–D7AF)](http://www.unicode.org/charts/PDF/UAC00.pdf) */
(function() { var Jamo, TypeWriter, layer, pause, start, string, type; Jamo = { INITIAL: ["ㄱ", "ㄲ", "ㄴ", "ㄷ", "ㄸ", "ㄹ", "ㅁ", "ㅂ", "ㅃ", "ㅅ", "ㅆ", "ㅇ", "ㅈ", "ㅉ", "ㅊ", "ㅋ", "ㅌ", "ㅍ", "ㅎ"], MIDIAL: ["ㅏ", "ㅐ", "ㅑ", "ㅒ", "ㅓ", "ㅔ", "ㅕ", "ㅖ", "ㅗ", "ㅘ", "ㅙ", "ㅚ", "ㅛ", "ㅜ", "ㅝ", "ㅞ", "ㅟ", "ㅠ", "ㅡ", "ㅢ", "ㅣ"], FINIAL: ["", "ㄱ", "ㄲ", "ㄳ", "ㄴ", "ㄵ", "ㄶ", "ㄷ", "ㄹ", "ㄺ", "ㄻ", "ㄼ", "ㄽ", "ㄾ", "ㄿ", "ㅀ", "ㅁ", "ㅂ", "ㅄ", "ㅅ", "ㅆ", "ㅇ", "ㅈ", "ㅊ", "ㅋ", "ㅌ", "ㅍ", "ㅎ"], teardown: function(string) { var char, code, head, i, len, mid, results, tail; results = []; for (i = 0, len = string.length; i < len; i++) { char = string[i]; if (!this.isHangul(char)) { results.push(char); } else { code = char.charCodeAt(0) - 0xAC00; tail = code % 28; mid = (code - tail) / 28 % 21; head = (((code - tail) / 28) - mid) / 21; results.push([head, mid, tail]); } } return results; }, assembly: function(array) { return array.map(function(jamo) { if (!Array.isArray(jamo)) { return jamo; } return String.fromCharCode(jamo[0] * 21 * 28 + jamo[1] * 28 + jamo[2] + 0xAC00); }); }, isHangul: function(char) { var code; code = char.charCodeAt(0); return 0xAC00 <= code && code <= 0xD7A3; } }; TypeWriter = (function() { function TypeWriter(string, target, delayFn) { var Type; this.target = target; this.delayFn = delayFn; this.string = Jamo.teardown(string); Type = { None: 0, Initial: 1, Midial: 2, Final: 3 }; this.flatten = this.string.reduce(function(pre, cur) { if (Array.isArray(cur)) { pre.push({ char: cur[0], type: Type.Initial, origin: cur }); pre.push({ char: cur[1], type: Type.Midial, origin: cur }); if (cur[2] !== 0) { pre.push({ char: cur[2], type: Type.Final, origin: cur }); } } else { if (cur.charCodeAt(0) === 10) { cur = '<br>'; } pre.push({ char: cur, type: Type.None }); } return pre; }, []); if (this.delayFn == null) { this.delayFn = function() { return Math.random() * (500 - 250) + 250; }; } } TypeWriter.prototype._get = function(backward) { var str; if (backward == null) { backward = false; } if (typeof window !== "undefined" && window !== null ? window.Framer : void 0) { str = this.target.html; } else if (this.target instanceof HTMLElement) { str = this.target.innerHTML; } else if (typeof this.target === "function") { str = this.target(); } else { str = this.target; } if (backward) { str = str.substring(0, str.length - 1); } return str; }; TypeWriter.prototype._set = function(string) { if (typeof window !== "undefined" && window !== null ? window.Framer : void 0) { return this.target.html = string; } else if (this.target instanceof HTMLElement) { return this.target.innerHTML = string; } else if (typeof this.target === "function") { return this.target(string); } else { return this.target = string; } }; TypeWriter.prototype._type = function() { var chars, morpheme, str; if (this._offset >= this.flatten.length) { return; } morpheme = this.flatten[this._offset++]; if (morpheme.type > 1) { chars = morpheme.origin.slice(0, morpheme.type); chars.push(0); str = this._get(true) + Jamo.assembly([chars]); } else if (morpheme.type === 1) { str = this._get(); str += Jamo.INITIAL[morpheme.char]; } else { str = this._get(); str += morpheme.char; } this._set(str); return this._runner = setTimeout(this._type, this.delayFn()); }; TypeWriter.prototype.start = function() { this._offset = 0; this._type = this._type.bind(this); return this.resume(); }; TypeWriter.prototype.stop = function() { return clearTimeout(this._runner); }; TypeWriter.prototype.resume = function() { return this._runner = setTimeout(this._type, this.delayFn()); }; return TypeWriter; })(); TypeWriter.prototype.pause = TypeWriter.prototype.stop; layer = new Layer({ width: 320, height: 500 }); layer.html = ""; start = new Layer({ y: 500, backgroundColor: 'green' }); start.html = 'start'; pause = new Layer({ y: 500, x: 220, backgroundColor: 'red' }); pause.html = 'pause'; string = "동해 물과 백두산이 마르고 닳도록\n하느님이 보우하사 우리나라 만세.\n무궁화 삼천리 화려강산\n대한 사람, 대한으로 길이 보전하세.\n\n남산 위에 저 소나무, 철갑을 두른 듯\n바람서리 불변함은 우리 기상일세.\n무궁화 삼천리 화려강산\n대한 사람, 대한으로 길이 보전하세.\n\n가을 하늘 공활한데 높고 구름 없이\n밝은 달은 우리 가슴 일편단심일세.\n무궁화 삼천리 화려강산\n대한 사람, 대한으로 길이 보전하세.\n\n이 기상과 이 맘으로 충성을 다하여\n괴로우나 즐거우나 나라 사랑하세.\n무궁화 삼천리 화려강산\n대한 사람, 대한으로 길이 보전하세"; type = new TypeWriter(string, layer, function() { return 100; }); start.on(Events.Click, function() { if (type._offset > 0) { return type.resume(); } else { return type.start(); } }); pause.on(Events.Click, function() { return type.pause(); });
}).call(this);
A Pen by Seoh Char - Script Codes
A Pen by Seoh Char - Script Codes
Home Page Home
Developer Seoh Char
Username seoh
Uploaded December 14, 2022
Rating 3
Size 5,325 Kb
Views 6,072
Do you need developer help for A Pen by Seoh Char?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Seoh Char (seoh) Script Codes
Create amazing art & images with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!