xxxxxxxxxx
2116
let img;
let predictions = [];
let facemesh;
// let emojiData;
let input, emojiInput, generateButton, emojiSizeInput, fontSelector, fontSizeInput, colorPicker, emojiWheel;
let emoji = "🧠";
let selectedPoints = [
{ label: "Nose Tip", pos: 4, key: 0 },
{ label: "Nose Bridge", pos: 6, key: 1 },
{ label: "Nose Center", pos: 195, key: 1 },
{ label: "Right Nostril Bulge", pos: 48, key: 2 },
{ label: "Left Nostril Bulge", pos: 278, key: 3 },
{ label: "R Nostril Base", pos: 99, key: 4 },
{ label: "L Nostril Base", pos: 328, key: 5 },
{ label: "Right Eyebrow End", pos: 124, key: 6 },
{ label: "Left Eyebrow Start", pos: 285, key: 6 },
{ label: "Left Eyebrow End", pos: 383, key: 7 },
{ label: "Right Eyebrow End", pos: 55, key: 6 },
{ label: "Right Eyebrow Middle", pos: 52, key: 8 },
{ label: "Left Eyebrow Middle", pos: 282, key: 9 },
{ label: "Right Eyelid Upper", pos: 159, key: 10 },
{ label: "Left Eyelid Upper", pos: 386, key: 11 },
{ label: "Right Eyelid Lower", pos: 145, key: 12 },
{ label: "Left Eyelid Lower", pos: 374, key: 13 },
{ label: "Right Inner Eye", pos: 155, key: 13 },
{ label: "Right Outer Eye", pos: 33, key: 13 },
{ label: "Left Inner Eye", pos: 381, key: 13 },
{ label: "Left Outer Eye", pos: 446, key: 13 },
{ label: "Right Infraorbital Fold", pos: 229, key: 13 },
{ label: "Left Infraorbital Fold", pos: 449, key: 13 },
{ label: "Middle Lip Upper", pos: 0, key: 14 },
{ label: "R Upper Bend", pos: 39, key: 15 },
{ label: "L Upper Bend", pos: 269, key: 16 },
{ label: "Right Ear", pos: 234, key: 17 },
{ label: "Left Ear", pos: 454, key: 18 },
{ label: "Center Lower Lip", pos: 17, key: 19 },
{ label: "Right Lower Lip", pos: 181, key: 20 },
{ label: "Left Lower Lip", pos: 405, key: 20 },
{ label: "Right Mouth Corner", pos: 76, key: 20 },
{ label: "Left Mouth Corner", pos: 306, key: 21 },
{ label: "Upper Forehead", pos: 10, key: 22 },
{ label: "Lower Forehead", pos: 151, key: 22 },
{ label: "Right Forehead", pos: 103, key: 22 },
{ label: "Left Forehead", pos: 332, key: 22 },
{ label: "Center Chin", pos: 199, key: 23 },
{ label: "Right Orbital Lower", pos: 50, key: 24 },
{ label: "Left Orbital Lower", pos: 280, key: 25 },
{ label: "Right Lower Chin", pos: 32, key: 26 },
{ label: "Left Lower Chin", pos: 262, key: 27 },
{ label: "Right Upper Chin", pos: 210, key: 28 },
{ label: "Left Upper Chin", pos: 364, key: 29 },
// { label: "gn", pos: 152 },
// { label: "lgo", pos: 136 },
// { label: "rgo", pos: 365 },
// { label: "lsbal", pos: 60 },
// { label: "rsbal", pos: 290 },
// { label: "sn", pos: 2 },
// { label: "lal", pos: 129 },
// { label: "ral", pos: 358 },
// { label: "lcph", pos: 39 },
// { label: "rcph", pos: 269 },
// { label: "sto", pos: 14 },
// { label: "lps", pos: 158 },
// { label: "lpi", pos: 144 },
// { label: "rpi", pos: 373 },
// { label: "rps", pos: 385 },
// { label: "lex", pos: 33 },
// { label: "len", pos: 133 },
// { label: "ren", pos: 362 },
// { label: "rex", pos: 263 },
];
const emojiData = [
"😀",
"😃",
"😄",
"😁",
"😆",
"😅",
"🤣",
"😂",
"🙂",
"🙃",
"🫠",
"😉",
"😊",
"😇",
"🥰",
"😍",
"🤩",
"😘",
"😗",
"☺️",
"😚",
"😙",
"🥲",
"😋",
"😛",
"😜",
"🤪",
"😝",
"🤑",
"🤗",
"🤭",
"🫢",
"🫣",
"🤫",
"🤔",
"🫡",
"🤐",
"🤨",
"😐",
"😑",
"😶",
"🫥",
"😶🌫️",
"😏",
"😒",
"🙄",
"😬",
"😮💨",
"🤥",
"😌",
"😔",
"😪",
"🤤",
"😴",
"😷",
"🤒",
"🤕",
"🤢",
"🤮",
"🤧",
"🥵",
"🥶",
"🥴",
"😵",
"😵💫",
"🤯",
"🤠",
"🥳",
"🥸",
"😎",
"🤓",
"🧐",
"😕",
"🫤",
"😟",
"🙁",
"☹️",
"😮",
"😯",
"😲",
"😳",
"🥺",
"🥹",
"😦",
"😧",
"😨",
"😰",
"😥",
"😢",
"😭",
"😱",
"😖",
"😣",
"😞",
"😓",
"😩",
"😫",
"🥱",
"😤",
"😡",
"😠",
"🤬",
"😈",
"👿",
"💀",
"☠️",
"💩",
"🤡",
"👹",
"👺",
"👻",
"👽",
"👾",
"🤖",
"😺",
"😸",
"😹",
"😻",
"😼",
"😽",
"🙀",
"😿",
"😾",
"🙈",
"🙉",
"🙊",
"💋",
"💌",
"💘",
"💝",
"💖",
"💗",
"💓",
"💞",
"💕",
"💟",
"❣️",
"💔",
"❤️🔥",
"❤️🩹",
"❤️",
"🧡",
"💛",
"💚",
"💙",
"💜",
"🤎",
"🖤",
"🤍",
"💯",
"💢",
"💥",
"💫",
"💦",
"💨",
"🕳️",
"💣",
"💬",
"👁️🗨️",
"🗨️",
"🗯️",
"💭",
"💤",
"👋",
"🤚",
"🖐️",
"✋",
"🖖",
"🫱",
"🫲",
"🫳",
"🫴",
"👌",
"🤌",
"🤏",
"✌️",
"🤞",
"🫰",
"🤟",
"🤘",
"🤙",
"👈",
"👉",
"👆",
"🖕",
"👇",
"☝️",
"🫵",
"👍",
"👎",
"✊",
"👊",
"🤛",
"🤜",
"👏",
"🙌",
"🫶",
"👐",
"🤲",
"🤝",
"🙏",
"✍️",
"💅",
"🤳",
"💪",
"🦾",
"🦿",
"🦵",
"🦶",
"👂",
"🦻",
"👃",
"🧠",
"🫀",
"🫁",
"🦷",
"🦴",
"👀",
"👁️",
"👅",
"👄",
"🫦",
"👶",
"🧒",
"👦",
"👧",
"🧑",
"👱",
"👨",
"🧔",
"🧔♂️",
"🧔♀️",
"👨🦰",
"👨🦱",
"👨🦳",
"👨🦲",
"👩",
"👩🦰",
"🧑🦰",
"👩🦱",
"🧑🦱",
"👩🦳",
"🧑🦳",
"👩🦲",
"🧑🦲",
"👱♀️",
"👱♂️",
"🧓",
"👴",
"👵",
"🙍",
"🙍♂️",
"🙍♀️",
"🙎",
"🙎♂️",
"🙎♀️",
"🙅",
"🙅♂️",
"🙅♀️",
"🙆",
"🙆♂️",
"🙆♀️",
"💁",
"💁♂️",
"💁♀️",
"🙋",
"🙋♂️",
"🙋♀️",
"🧏",
"🧏♂️",
"🧏♀️",
"🙇",
"🙇♂️",
"🙇♀️",
"🤦",
"🤦♂️",
"🤦♀️",
"🤷",
"🤷♂️",
"🤷♀️",
"🧑⚕️",
"👨⚕️",
"👩⚕️",
"🧑🎓",
"👨🎓",
"👩🎓",
"🧑🏫",
"👨🏫",
"👩🏫",
"🧑⚖️",
"👨⚖️",
"👩⚖️",
"🧑🌾",
"👨🌾",
"👩🌾",
"🧑🍳",
"👨🍳",
"👩🍳",
"🧑🔧",
"👨🔧",
"👩🔧",
"🧑🏭",
"👨🏭",
"👩🏭",
"🧑💼",
"👨💼",
"👩💼",
"🧑🔬",
"👨🔬",
"👩🔬",
"🧑💻",
"👨💻",
"👩💻",
"🧑🎤",
"👨🎤",
"👩🎤",
"🧑🎨",
"👨🎨",
"👩🎨",
"🧑✈️",
"👨✈️",
"👩✈️",
"🧑🚀",
"👨🚀",
"👩🚀",
"🧑🚒",
"👨🚒",
"👩🚒",
"👮",
"👮♂️",
"👮♀️",
"🕵️",
"🕵️♂️",
"🕵️♀️",
"💂",
"💂♂️",
"💂♀️",
"🥷",
"👷",
"👷♂️",
"👷♀️",
"🫅",
"🤴",
"👸",
"👳",
"👳♂️",
"👳♀️",
"👲",
"🧕",
"🤵",
"🤵♂️",
"🤵♀️",
"👰",
"👰♂️",
"👰♀️",
"🤰",
"🫃",
"🫄",
"🤱",
"👩🍼",
"👨🍼",
"🧑🍼",
"👼",
"🎅",
"🤶",
"🧑🎄",
"🦸",
"🦸♂️",
"🦸♀️",
"🦹",
"🦹♂️",
"🦹♀️",
"🧙",
"🧙♂️",
"🧙♀️",
"🧚",
"🧚♂️",
"🧚♀️",
"🧛",
"🧛♂️",
"🧛♀️",
"🧜",
"🧜♂️",
"🧜♀️",
"🧝",
"🧝♂️",
"🧝♀️",
"🧞",
"🧞♂️",
"🧞♀️",
"🧟",
"🧟♂️",
"🧟♀️",
"🧌",
"💆",
"💆♂️",
"💆♀️",
"💇",
"💇♂️",
"💇♀️",
"🚶",
"🚶♂️",
"🚶♀️",
"🧍",
"🧍♂️",
"🧍♀️",
"🧎",
"🧎♂️",
"🧎♀️",
"🧑🦯",
"👨🦯",
"👩🦯",
"🧑🦼",
"👨🦼",
"👩🦼",
"🧑🦽",
"👨🦽",
"👩🦽",
"🏃",
"🏃♂️",
"🏃♀️",
"💃",
"🕺",
"🕴️",
"👯",
"👯♂️",
"👯♀️",
"🧖",
"🧖♂️",
"🧖♀️",
"🧗",
"🧗♂️",
"🧗♀️",
"🤺",
"🏇",
"⛷️",
"🏂",
"🏌️",
"🏌️♂️",
"🏌️♀️",
"🏄",
"🏄♂️",
"🏄♀️",
"🚣",
"🚣♂️",
"🚣♀️",
"🏊",
"🏊♂️",
"🏊♀️",
"⛹️",
"⛹️♂️",
"⛹️♀️",
"🏋️",
"🏋️♂️",
"🏋️♀️",
"🚴",
"🚴♂️",
"🚴♀️",
"🚵",
"🚵♂️",
"🚵♀️",
"🤸",
"🤸♂️",
"🤸♀️",
"🤼",
"🤼♂️",
"🤼♀️",
"🤽",
"🤽♂️",
"🤽♀️",
"🤾",
"🤾♂️",
"🤾♀️",
"🤹",
"🤹♂️",
"🤹♀️",
"🧘",
"🧘♂️",
"🧘♀️",
"🛀",
"🛌",
"🧑🤝🧑",
"👭",
"👫",
"👬",
"💏",
"👩❤️💋👨",
"👨❤️💋👨",
"👩❤️💋👩",
"💑",
"👩❤️👨",
"👨❤️👨",
"👩❤️👩",
"👪",
"👨👩👦",
"👨👩👧",
"👨👩👧👦",
"👨👩👦👦",
"👨👩👧👧",
"👨👨👦",
"👨👨👧",
"👨👨👧👦",
"👨👨👦👦",
"👨👨👧👧",
"👩👩👦",
"👩👩👧",
"👩👩👧👦",
"👩👩👦👦",
"👩👩👧👧",
"👨👦",
"👨👦👦",
"👨👧",
"👨👧👦",
"👨👧👧",
"👩👦",
"👩👦👦",
"👩👧",
"👩👧👦",
"👩👧👧",
"🗣️",
"👤",
"👥",
"🫂",
"👣",
"🐵",
"🐒",
"🦍",
"🦧",
"🐶",
"🐕",
"🦮",
"🐕🦺",
"🐩",
"🐺",
"🦊",
"🦝",
"🐱",
"🐈",
"🐈⬛",
"🦁",
"🐯",
"🐅",
"🐆",
"🐴",
"🐎",
"🦄",
"🦓",
"🦌",
"🦬",
"🐮",
"🐂",
"🐃",
"🐄",
"🐷",
"🐖",
"🐗",
"🐽",
"🐏",
"🐑",
"🐐",
"🐪",
"🐫",
"🦙",
"🦒",
"🐘",
"🦣",
"🦏",
"🦛",
"🐭",
"🐁",
"🐀",
"🐹",
"🐰",
"🐇",
"🐿️",
"🦫",
"🦔",
"🦇",
"🐻",
"🐻❄️",
"🐨",
"🐼",
"🦥",
"🦦",
"🦨",
"🦘",
"🦡",
"🐾",
"🦃",
"🐔",
"🐓",
"🐣",
"🐤",
"🐥",
"🐦",
"🐧",
"🕊️",
"🦅",
"🦆",
"🦢",
"🦉",
"🦤",
"🪶",
"🦩",
"🦚",
"🦜",
"🐸",
"🐊",
"🐢",
"🦎",
"🐍",
"🐲",
"🐉",
"🦕",
"🦖",
"🐳",
"🐋",
"🐬",
"🦭",
"🐟",
"🐠",
"🐡",
"🦈",
"🐙",
"🐚",
"🪸",
"🐌",
"🦋",
"🐛",
"🐜",
"🐝",
"🪲",
"🐞",
"🦗",
"🪳",
"🕷️",
"🕸️",
"🦂",
"🦟",
"🪰",
"🪱",
"🦠",
"💐",
"🌸",
"💮",
"🪷",
"🏵️",
"🌹",
"🥀",
"🌺",
"🌻",
"🌼",
"🌷",
"🌱",
"🪴",
"🌲",
"🌳",
"🌴",
"🌵",
"🌾",
"🌿",
"☘️",
"🍀",
"🍁",
"🍂",
"🍃",
"🪹",
"🪺",
"🍇",
"🍈",
"🍉",
"🍊",
"🍋",
"🍌",
"🍍",
"🥭",
"🍎",
"🍏",
"🍐",
"🍑",
"🍒",
"🍓",
"🫐",
"🥝",
"🍅",
"🫒",
"🥥",
"🥑",
"🍆",
"🥔",
"🥕",
"🌽",
"🌶️",
"🫑",
"🥒",
"🥬",
"🥦",
"🧄",
"🧅",
"🍄",
"🥜",
"🫘",
"🌰",
"🍞",
"🥐",
"🥖",
"🫓",
"🥨",
"🥯",
"🥞",
"🧇",
"🧀",
"🍖",
"🍗",
"🥩",
"🥓",
"🍔",
"🍟",
"🍕",
"🌭",
"🥪",
"🌮",
"🌯",
"🫔",
"🥙",
"🧆",
"🥚",
"🍳",
"🥘",
"🍲",
"🫕",
"🥣",
"🥗",
"🍿",
"🧈",
"🧂",
"🥫",
"🍱",
"🍘",
"🍙",
"🍚",
"🍛",
"🍜",
"🍝",
"🍠",
"🍢",
"🍣",
"🍤",
"🍥",
"🥮",
"🍡",
"🥟",
"🥠",
"🥡",
"🦀",
"🦞",
"🦐",
"🦑",
"🦪",
"🍦",
"🍧",
"🍨",
"🍩",
"🍪",
"🎂",
"🍰",
"🧁",
"🥧",
"🍫",
"🍬",
"🍭",
"🍮",
"🍯",
"🍼",
"🥛",
"☕",
"🫖",
"🍵",
"🍶",
"🍾",
"🍷",
"🍸",
"🍹",
"🍺",
"🍻",
"🥂",
"🥃",
"🫗",
"🥤",
"🧋",
"🧃",
"🧉",
"🧊",
"🥢",
"🍽️",
"🍴",
"🥄",
"🔪",
"🫙",
"🏺",
"🌍",
"🌎",
"🌏",
"🌐",
"🗺️",
"🗾",
"🧭",
"🏔️",
"⛰️",
"🌋",
"🗻",
"🏕️",
"🏖️",
"🏜️",
"🏝️",
"🏞️",
"🏟️",
"🏛️",
"🏗️",
"🧱",
"🪨",
"🪵",
"🛖",
"🏘️",
"🏚️",
"🏠",
"🏡",
"🏢",
"🏣",
"🏤",
"🏥",
"🏦",
"🏨",
"🏩",
"🏪",
"🏫",
"🏬",
"🏭",
"🏯",
"🏰",
"💒",
"🗼",
"🗽",
"⛪",
"🕌",
"🛕",
"🕍",
"⛩️",
"🕋",
"⛲",
"⛺",
"🌁",
"🌃",
"🏙️",
"🌄",
"🌅",
"🌆",
"🌇",
"🌉",
"♨️",
"🎠",
"🛝",
"🎡",
"🎢",
"💈",
"🎪",
"🚂",
"🚃",
"🚄",
"🚅",
"🚆",
"🚇",
"🚈",
"🚉",
"🚊",
"🚝",
"🚞",
"🚋",
"🚌",
"🚍",
"🚎",
"🚐",
"🚑",
"🚒",
"🚓",
"🚔",
"🚕",
"🚖",
"🚗",
"🚘",
"🚙",
"🛻",
"🚚",
"🚛",
"🚜",
"🏎️",
"🏍️",
"🛵",
"🦽",
"🦼",
"🛺",
"🚲",
"🛴",
"🛹",
"🛼",
"🚏",
"🛣️",
"🛤️",
"🛢️",
"⛽",
"🛞",
"🚨",
"🚥",
"🚦",
"🛑",
"🚧",
"⚓",
"🛟",
"⛵",
"🛶",
"🚤",
"🛳️",
"⛴️",
"🛥️",
"🚢",
"✈️",
"🛩️",
"🛫",
"🛬",
"🪂",
"💺",
"🚁",
"🚟",
"🚠",
"🚡",
"🛰️",
"🚀",
"🛸",
"🛎️",
"🧳",
"⌛",
"⏳",
"⌚",
"⏰",
"⏱️",
"⏲️",
"🕰️",
"🕛",
"🕧",
"🕐",
"🕜",
"🕑",
"🕝",
"🕒",
"🕞",
"🕓",
"🕟",
"🕔",
"🕠",
"🕕",
"🕡",
"🕖",
"🕢",
"🕗",
"🕣",
"🕘",
"🕤",
"🕙",
"🕥",
"🕚",
"🕦",
"🌑",
"🌒",
"🌓",
"🌔",
"🌕",
"🌖",
"🌗",
"🌘",
"🌙",
"🌚",
"🌛",
"🌜",
"🌡️",
"☀️",
"🌝",
"🌞",
"🪐",
"⭐",
"🌟",
"🌠",
"🌌",
"☁️",
"⛅",
"⛈️",
"🌤️",
"🌥️",
"🌦️",
"🌧️",
"🌨️",
"🌩️",
"🌪️",
"🌫️",
"🌬️",
"🌀",
"🌈",
"🌂",
"☂️",
"☔",
"⛱️",
"⚡",
"❄️",
"☃️",
"⛄",
"☄️",
"🔥",
"💧",
"🌊",
"🎃",
"🎄",
"🎆",
"🎇",
"🧨",
"✨",
"🎈",
"🎉",
"🎊",
"🎋",
"🎍",
"🎎",
"🎏",
"🎐",
"🎑",
"🧧",
"🎀",
"🎁",
"🎗️",
"🎟️",
"🎫",
"🎖️",
"🏆",
"🏅",
"🥇",
"🥈",
"🥉",
"⚽",
"⚾",
"🥎",
"🏀",
"🏐",
"🏈",
"🏉",
"🎾",
"🥏",
"🎳",
"🏏",
"🏑",
"🏒",
"🥍",
"🏓",
"🏸",
"🥊",
"🥋",
"🥅",
"⛳",
"⛸️",
"🎣",
"🤿",
"🎽",
"🎿",
"🛷",
"🥌",
"🎯",
"🪀",
"🪁",
"🎱",
"🔮",
"🪄",
"🧿",
"🪬",
"🎮",
"🕹️",
"🎰",
"🎲",
"🧩",
"🧸",
"🪅",
"🪩",
"🪆",
"♠️",
"♥️",
"♦️",
"♣️",
"♟️",
"🃏",
"🀄",
"🎴",
"🎭",
"🖼️",
"🎨",
"🧵",
"🪡",
"🧶",
"🪢",
"👓",
"🕶️",
"🥽",
"🥼",
"🦺",
"👔",
"👕",
"👖",
"🧣",
"🧤",
"🧥",
"🧦",
"👗",
"👘",
"🥻",
"🩱",
"🩲",
"🩳",
"👙",
"👚",
"👛",
"👜",
"👝",
"🛍️",
"🎒",
"🩴",
"👞",
"👟",
"🥾",
"🥿",
"👠",
"👡",
"🩰",
"👢",
"👑",
"👒",
"🎩",
"🎓",
"🧢",
"🪖",
"⛑️",
"📿",
"💄",
"💍",
"💎",
"🔇",
"🔈",
"🔉",
"🔊",
"📢",
"📣",
"📯",
"🔔",
"🔕",
"🎼",
"🎵",
"🎶",
"🎙️",
"🎚️",
"🎛️",
"🎤",
"🎧",
"📻",
"🎷",
"🪗",
"🎸",
"🎹",
"🎺",
"🎻",
"🪕",
"🥁",
"🪘",
"📱",
"📲",
"☎️",
"📞",
"📟",
"📠",
"🔋",
"🪫",
"🔌",
"💻",
"🖥️",
"🖨️",
"⌨️",
"🖱️",
"🖲️",
"💽",
"💾",
"💿",
"📀",
"🧮",
"🎥",
"🎞️",
"📽️",
"🎬",
"📺",
"📷",
"📸",
"📹",
"📼",
"🔍",
"🔎",
"🕯️",
"💡",
"🔦",
"🏮",
"🪔",
"📔",
"📕",
"📖",
"📗",
"📘",
"📙",
"📚",
"📓",
"📒",
"📃",
"📜",
"📄",
"📰",
"🗞️",
"📑",
"🔖",
"🏷️",
"💰",
"🪙",
"💴",
"💵",
"💶",
"💷",
"💸",
"💳",
"🧾",
"💹",
"✉️",
"📧",
"📨",
"📩",
"📤",
"📥",
"📦",
"📫",
"📪",
"📬",
"📭",
"📮",
"🗳️",
"✏️",
"✒️",
"🖋️",
"🖊️",
"🖌️",
"🖍️",
"📝",
"💼",
"📁",
"📂",
"🗂️",
"📅",
"📆",
"🗒️",
"🗓️",
"📇",
"📈",
"📉",
"📊",
"📋",
"📌",
"📍",
"📎",
"🖇️",
"📏",
"📐",
"✂️",
"🗃️",
"🗄️",
"🗑️",
"🔒",
"🔓",
"🔏",
"🔐",
"🔑",
"🗝️",
"🔨",
"🪓",
"⛏️",
"⚒️",
"🛠️",
"🗡️",
"⚔️",
"🔫",
"🪃",
"🏹",
"🛡️",
"🪚",
"🔧",
"🪛",
"🔩",
"⚙️",
"🗜️",
"⚖️",
"🦯",
"🔗",
"⛓️",
"🪝",
"🧰",
"🧲",
"🪜",
"⚗️",
"🧪",
"🧫",
"🧬",
"🔬",
"🔭",
"📡",
"💉",
"🩸",
"💊",
"🩹",
"🩼",
"🩺",
"🩻",
"🚪",
"🛗",
"🪞",
"🪟",
"🛏️",
"🛋️",
"🪑",
"🚽",
"🪠",
"🚿",
"🛁",
"🪤",
"🪒",
"🧴",
"🧷",
"🧹",
"🧺",
"🧻",
"🪣",
"🧼",
"🫧",
"🪥",
"🧽",
"🧯",
"🛒",
"🚬",
"⚰️",
"🪦",
"⚱️",
"🗿",
"🪧",
"🪪",
"🏧",
"🚮",
"🚰",
"♿",
"🚹",
"🚺",
"🚻",
"🚼",
"🚾",
"🛂",
"🛃",
"🛄",
"🛅",
"⚠️",
"🚸",
"⛔",
"🚫",
"🚳",
"🚭",
"🚯",
"🚱",
"🚷",
"📵",
"🔞",
"☢️",
"☣️",
"⬆️",
"↗️",
"➡️",
"↘️",
"⬇️",
"↙️",
"⬅️",
"↖️",
"↕️",
"↔️",
"↩️",
"↪️",
"⤴️",
"⤵️",
"🔃",
"🔄",
"🔙",
"🔚",
"🔛",
"🔜",
"🔝",
"🛐",
"⚛️",
"🕉️",
"✡️",
"☸️",
"☯️",
"✝️",
"☦️",
"☪️",
"☮️",
"🕎",
"🔯",
"♈",
"♉",
"♊",
"♋",
"♌",
"♍",
"♎",
"♏",
"♐",
"♑",
"♒",
"♓",
"⛎",
"🔀",
"🔁",
"🔂",
"▶️",
"⏩",
"⏭️",
"⏯️",
"◀️",
"⏪",
"⏮️",
"🔼",
"⏫",
"🔽",
"⏬",
"⏸️",
"⏹️",
"⏺️",
"⏏️",
"🎦",
"🔅",
"🔆",
"📶",
"📳",
"📴",
"♀️",
"♂️",
"⚧️",
"✖️",
"➕",
"➖",
"➗",
"🟰",
"♾️",
"‼️",
"⁉️",
"❓",
"❔",
"❕",
"❗",
"〰️",
"💱",
"💲",
"⚕️",
"♻️",
"⚜️",
"🔱",
"📛",
"🔰",
"⭕",
"✅",
"☑️",
"✔️",
"❌",
"❎",
"➰",
"➿",
"〽️",
"✳️",
"✴️",
"❇️",
"©️",
"®️",
"™️",
"#️⃣",
"*️⃣",
"0️⃣",
"1️⃣",
"2️⃣",
"3️⃣",
"4️⃣",
"5️⃣",
"6️⃣",
"7️⃣",
"8️⃣",
"9️⃣",
"🔟",
"🔠",
"🔡",
"🔢",
"🔣",
"🔤",
"🅰️",
"🆎",
"🅱️",
"🆑",
"🆒",
"🆓",
"ℹ️",
"🆔",
"Ⓜ️",
"🆕",
"🆖",
"🅾️",
"🆗",
"🅿️",
"🆘",
"🆙",
"🆚",
"🈁",
"🈂️",
"🈷️",
"🈶",
"🈯",
"🉐",
"🈹",
"🈚",
"🈲",
"🉑",
"🈸",
"🈴",
"🈳",
"㊗️",
"㊙️",
"🈺",
"🈵",
"🔴",
"🟠",
"🟡",
"🟢",
"🔵",
"🟣",
"🟤",
"⚫",
"⚪",
"🟥",
"🟧",
"🟨",
"🟩",
"🟦",
"🟪",
"🟫",
"⬛",
"⬜",
"◼️",
"◻️",
"◾",
"◽",
"▪️",
"▫️",
"🔶",
"🔷",
"🔸",
"🔹",
"🔺",
"🔻",
"💠",
"🔘",
"🔳",
"🔲",
"🏁",
"🚩",
"🎌",
"🏴",
"🏳️",
"🏳️🌈",
"🏳️⚧️",
"🏴☠️",
"🇦🇨",
"🇦🇩",
"🇦🇪",
"🇦🇫",
"🇦🇬",
"🇦🇮",
"🇦🇱",
"🇦🇲",
"🇦🇴",
"🇦🇶",
"🇦🇷",
"🇦🇸",
"🇦🇹",
"🇦🇺",
"🇦🇼",
"🇦🇽",
"🇦🇿",
"🇧🇦",
"🇧🇧",
"🇧🇩",
"🇧🇪",
"🇧🇫",
"🇧🇬",
"🇧🇭",
"🇧🇮",
"🇧🇯",
"🇧🇱",
"🇧🇲",
"🇧🇳",
"🇧🇴",
"🇧🇶",
"🇧🇷",
"🇧🇸",
"🇧🇹",
"🇧🇻",
"🇧🇼",
"🇧🇾",
"🇧🇿",
"🇨🇦",
"🇨🇨",
"🇨🇩",
"🇨🇫",
"🇨🇬",
"🇨🇭",
"🇨🇮",
"🇨🇰",
"🇨🇱",
"🇨🇲",
"🇨🇳",
"🇨🇴",
"🇨🇵",
"🇨🇷",
"🇨🇺",
"🇨🇻",
"🇨🇼",
"🇨🇽",
"🇨🇾",
"🇨🇿",
"🇩🇪",
"🇩🇬",
"🇩🇯",
"🇩🇰",
"🇩🇲",
"🇩🇴",
"🇩🇿",
"🇪🇦",
"🇪🇨",
"🇪🇪",
"🇪🇬",
"🇪🇭",
"🇪🇷",
"🇪🇸",
"🇪🇹",
"🇪🇺",
"🇫🇮",
"🇫🇯",
"🇫🇰",
"🇫🇲",
"🇫🇴",
"🇫🇷",
"🇬🇦",
"🇬🇧",
"🇬🇩",
"🇬🇪",
"🇬🇫",
"🇬🇬",
"🇬🇭",
"🇬🇮",
"🇬🇱",
"🇬🇲",
"🇬🇳",
"🇬🇵",
"🇬🇶",
"🇬🇷",
"🇬🇸",
"🇬🇹",
"🇬🇺",
"🇬🇼",
"🇬🇾",
"🇭🇰",
"🇭🇲",
"🇭🇳",
"🇭🇷",
"🇭🇹",
"🇭🇺",
"🇮🇨",
"🇮🇩",
"🇮🇪",
"🇮🇱",
"🇮🇲",
"🇮🇳",
"🇮🇴",
"🇮🇶",
"🇮🇷",
"🇮🇸",
"🇮🇹",
"🇯🇪",
"🇯🇲",
"🇯🇴",
"🇯🇵",
"🇰🇪",
"🇰🇬",
"🇰🇭",
"🇰🇮",
"🇰🇲",
"🇰🇳",
"🇰🇵",
"🇰🇷",
"🇰🇼",
"🇰🇾",
"🇰🇿",
"🇱🇦",
"🇱🇧",
"🇱🇨",
"🇱🇮",
"🇱🇰",
"🇱🇷",
"🇱🇸",
"🇱🇹",
"🇱🇺",
"🇱🇻",
"🇱🇾",
"🇲🇦",
"🇲🇨",
"🇲🇩",
"🇲🇪",
"🇲🇫",
"🇲🇬",
"🇲🇭",
"🇲🇰",
"🇲🇱",
"🇲🇲",
"🇲🇳",
"🇲🇴",
"🇲🇵",
"🇲🇶",
"🇲🇷",
"🇲🇸",
"🇲🇹",
"🇲🇺",
"🇲🇻",
"🇲🇼",
"🇲🇽",
"🇲🇾",
"🇲🇿",
"🇳🇦",
"🇳🇨",
"🇳🇪",
"🇳🇫",
"🇳🇬",
"🇳🇮",
"🇳🇱",
"🇳🇴",
"🇳🇵",
"🇳🇷",
"🇳🇺",
"🇳🇿",
"🇴🇲",
"🇵🇦",
"🇵🇪",
"🇵🇫",
"🇵🇬",
"🇵🇭",
"🇵🇰",
"🇵🇱",
"🇵🇲",
"🇵🇳",
"🇵🇷",
"🇵🇸",
"🇵🇹",
"🇵🇼",
"🇵🇾",
"🇶🇦",
"🇷🇪",
"🇷🇴",
"🇷🇸",
"🇷🇺",
"🇷🇼",
"🇸🇦",
"🇸🇧",
"🇸🇨",
"🇸🇩",
"🇸🇪",
"🇸🇬",
"🇸🇭",
"🇸🇮",
"🇸🇯",
"🇸🇰",
"🇸🇱",
"🇸🇲",
"🇸🇳",
"🇸🇴",
"🇸🇷",
"🇸🇸",
"🇸🇹",
"🇸🇻",
"🇸🇽",
"🇸🇾",
"🇸🇿",
"🇹🇦",
"🇹🇨",
"🇹🇩",
"🇹🇫",
"🇹🇬",
"🇹🇭",
"🇹🇯",
"🇹🇰",
"🇹🇱",
"🇹🇲",
"🇹🇳",
"🇹🇴",
"🇹🇷",
"🇹🇹",
"🇹🇻",
"🇹🇼",
"🇹🇿",
"🇺🇦",
"🇺🇬",
"🇺🇲",
"🇺🇳",
"🇺🇸",
"🇺🇾",
"🇺🇿",
"🇻🇦",
"🇻🇨",
"🇻🇪",
"🇻🇬",
"🇻🇮",
"🇻🇳",
"🇻🇺",
"🇼🇫",
"🇼🇸",
"🇽🇰",
"🇾🇪",
"🇾🇹",
"🇿🇦",
"🇿🇲",
"🇿🇼",
"🏴",
"🏴",
"🏴",
];
const selectFonts = [
{ label: "Arial", key: 0 },
{ label: "Arial Black", key: 8 },
{ label: "Bookman", key: 10 },
{ label: "Comic Sans MS", key: 6 },
{ label: "Courier New", key: 3 },
{ label: "Garamond", key: 9 },
{ label: "Georgia", key: 4 },
{ label: "Impact", key: 7 },
{ label: "Palatino", key: 5 },
{ label: "Tahoma", key: 11 },
{ label: "Times New Roman", key: 1 },
{ label: "Trebuchet MS", key: 12 },
{ label: "Verdana", key: 2 },
];
function setup() {
if (Cookies.get("modified_values") !== undefined) {
selectedPoints = JSON.parse(Cookies.get("modified_values"));
}
createCanvas(4000, 6000);
input = createFileInput(handleFile);
input.position(40, 30);
// blendMode(DIFFERENCE);
textSize(15);
text("choose emoji:", 210, 75);
emojiInput = createButton(emoji);
emojiInput.id("emojiInput");
emojiInput.position(318, 75);
emojiInput.mousePressed(openEmojiWheel);
text("emoji-size:", 210, 115);
emojiSizeInput = createInput("500");
emojiSizeInput.position(210, 120);
text("text-size:", 40, 115);
fontSizeInput = createInput("50");
fontSizeInput.position(40, 120);
text("text-color:", 40, 155);
colorPicker = createColorPicker("#000000");
colorPicker.position(40, 160);
generateButton = createButton("GENERATE IMAGE");
generateButton.position(40, 290);
generateButton.mousePressed(generateImage);
generateButton.attribute("disabled", "");
createSelection();
createFontSelection();
createEmojiSelection();
}
function createSelection() {
let select = createSelect();
select.position(40, 200);
select.option("Please select facial feature:");
for (let i = 0; i < selectedPoints.length; i++) {
select.option(selectedPoints[i].key + ": " + selectedPoints[i].label);
}
select.changed(function () {
let choosenNumber = select.value();
choosenNumber = choosenNumber.substring(0, 2);
if (choosenNumber.substring(1) == ":") {
choosenNumber = choosenNumber.substring(0, 1);
}
facialFeatureText = createInput(selectedPoints[choosenNumber].label);
facialFeatureText.position(40, 225);
facialFeatureButton = createButton("Change Value");
facialFeatureButton.position(40, 250);
facialFeatureButton.mousePressed(function () {
selectedPoints[choosenNumber].label = facialFeatureText.value();
Cookies.set("modified_values", JSON.stringify(selectedPoints));
createSelection();
});
});
}
function createFontSelection() {
fontSelector = createSelect();
fontSelector.position(40, 80);
text("select font:", 40, 75);
for (let i = 0; i < selectFonts.length; i++) {
fontSelector.option(selectFonts[i].label);
}
}
function createEmojiSelection() {
emojiWheel = document.createElement("div");
emojiWheel.setAttribute("id", "emojiWheel");
document.body.appendChild(emojiWheel);
for (let i = 0; i < emojiData.length / 40; i++) {
let emojiPanel = document.createElement("div");
emojiPanel.setAttribute("class", "emojiPanel");
emojiWheel.appendChild(emojiPanel);
for (let j = 0; j < 8; j++) {
for (let k = 0; k < 5; k++) {
let emojiNum = j * 5 + k + i * 40;
if (emojiNum < 1811) {
let emojiRow = document.createElement("div");
let content = document.createTextNode(emojiData[emojiNum]);
emojiRow.appendChild(content);
emojiRow.setAttribute("class", "emojiRow");
emojiRow.addEventListener("click", function () {
emojiClick(this);
});
emojiPanel.appendChild(emojiRow);
}
}
}
}
}
function openEmojiWheel() {
emojiLayer = document.getElementById("emojiLayer");
if (emojiWheel.style.display == "block") {
emojiWheel.style.display = "none";
emojiLayer.style.display = "none";
} else {
emojiWheel.style.display = "block";
emojiLayer.style.display = "block";
}
}
function emojiClick(clicked_emoji) {
emoji = clicked_emoji.innerHTML;
let eomjibutton = document.getElementById("emojiInput");
eomjibutton.innerHTML = emoji;
emojiWheel.style.display = "none";
emojiLayer.style.display = "none";
}
function generateImage() {
fill(colorPicker.value());
textFont(fontSelector.value());
// img = createImg("4000x6000_face.jpg", imageReady);
// img.hide();
textAlign(CENTER, CENTER);
imageReady();
}
function handleFile(file) {
print(file);
if (file.type === "image") {
img = createImg(file.data, function () {
generateButton.removeAttribute("disabled");
});
img.hide();
} else {
img = null;
}
}
function imageReady() {
facemesh = ml5.facemesh(function () {
facemesh.predict(img);
});
facemesh.on("predict", (results) => {
predictions = results;
image(img, 0, 0, width, height);
noStroke();
drawKeypoints();
textAlign(CENTER);
noLoop();
saveCanvas("myCanvas", "jpg");
});
}
function drawKeypoints() {
for (let i = 0; i < predictions.length; i += 1) {
const keypoints = predictions[i].scaledMesh;
for (let j = 0; j < selectedPoints.length; j++) {
let [x, y] = keypoints[selectedPoints[j].pos];
push();
textSize(parseInt(emojiSizeInput.value()));
text(emoji, x, y);
pop();
push();
textSize(parseInt(fontSizeInput.value()));
if (selectedPoints[j].label.length > 15) {
let broken = selectedPoints[j].label.replace(/\s/, "\n");
text(broken, x, y - 80);
} else {
text(selectedPoints[j].label, x, y - 60);
}
}
}
}
// function keyPressed() {
// if (keyCode === 80) {
// saveCanvas("myCanvas", "jpg");
// }
// }