'๐', '๐', '๐', '๐', '๐', '๐
', '๐', '๐คฃ', '๐', '๐',
'๐', '๐ฅฐ', '๐', '๐', '๐', '๐', 'โบ๏ธ', '๐', '๐', '๐',
'๐', '๐', '๐ค', '๐ค', '๐ค', '๐', '๐ฅณ', '๐', '๐', '๐',
'๐', '๐', '๐', '๐', 'โน๏ธ', '๐ข', '๐ญ', '๐ค', '๐ ', '๐ก',
'๐คฌ', '๐คฏ', '๐ณ', '๐ฅบ', '๐ฑ', '๐จ', '๐ฐ', '๐ฅ', '๐', '๐ค',
'๐', '๐', '๐', '๐ฉ', '๐ฅด', '๐ฅต', '๐ต', '๐', '๐ฃ', '๐ข',
'๐ค', '๐คข', '๐คฎ', '๐คก', '๐ค ', '๐คซ', '๐คญ', '๐ง', '๐คจ', '๐ง',
'๐', '๐ฟ', '๐น', '๐บ', '๐', '๐ป', '๐ฝ', '๐ค', '๐ฉ', '๐',
console.log(emojis.join(', '));
let atlas = { atlas: null, cols: 0, rows: 0 }
theShader = new p5.Shader(this.renderer, vert, frag)
createCanvas(windowWidth, windowHeight, WEBGL)
customCursor = select('.custom-cursor');
textBlock = createP("โข Press 1-6 for a change in frequency.<br>โข Press s for a shader.<br>โข Press d for enlargement.<br>โข Press โ or โ to take a closer look.<br>โข Press space to pause.");
textBlock.position(60, 100);
textBlock.style('font-size', '20pt');
textBlock.style('color', 'rgb(0,0,0)');
textBlock.style('line-height', '1.5');
textBlock.style('z-index', '1');
let titleText = createP("Isn't it fun, emoji's");
titleText.position(60, 20);
titleText.style('font-family', 'Helvetica, sans-serif');
titleText.style('font-weight', 'bold');
titleText.style('font-size', '36pt');
titleText.style('color', 'rgb(0,0,0)');
titleText.style('z-index', '1');
backgroundBlock = createDiv('');
backgroundBlock.position(40, 50);
textBlock.style('font-family', 'Helvetica, sans-serif');
backgroundBlock.size(650, 300);
backgroundBlock.style('background-color', '#ffdc00');
backgroundBlock.style('border', '5px solid rgb(0,0,0)');
backgroundBlock.style('border-radius', '20px');
backgroundBlock.style('transition', 'transform 0.3s');
backgroundBlock.style('cursor', 'none');
backgroundBlock.style('transition', 'transform 0.7s');
backgroundBlock.style('cursor', 'pointer');
backgroundBlock.mouseOver(() => {
backgroundBlock.style('transform', 'skew(-5deg, 0deg)');
backgroundBlock.mouseOut(() => {
backgroundBlock.style('transform', 'skew(0deg, 0deg)');
theShader.setUniform("iResolution", [width, height])
theShader.setUniform("iMouse", [mouseX, mouseY])
theShader.setUniform("iGrid", [cols, rows])
theShader.setUniform("iAtlas", atlas.atlas)
theShader.setUniform("iAtlasGrid", [atlas.cols, atlas.rows])
theShader.setUniform("iLength", emojis.length)
theShader.setUniform("iTime", frameCount / 60)
theShader.setUniform("iType", flowType)
theShader.setUniform("iIsShadow", isShadow)
theShader.setUniform("iIsDistortions", isDistortions)
theShader.setUniform("iWei", wei)
rect(0, 0, width, height)
customCursor.position(mouseX, mouseY);
function getAtlas({ array, cols, unitSize, unitScale = 0.8 }) {
const rows = ceil(emojis.length / cols)
const gfx = createGraphics(unitSize * cols, unitSize * rows)
gfx.textAlign(CENTER, CENTER)
gfx.textSize(unitSize * unitScale)
array.forEach((value, index) => {
unitSize / 2 + unitSize * (index % cols),
unitSize / 2 + unitSize * gfx.floor(index / cols)
return { atlas: gfx, cols: cols, rows: rows }
PressDo("1", () => (flowType = 1))
PressDo("2", () => (flowType = 2))
PressDo("3", () => (flowType = 3))
PressDo("4", () => (flowType = 4))
PressDo("5", () => (flowType = 5))
PressDo("6", () => (flowType = 6))
PressDo("s", () => (isShadow = !isShadow))
PressDo("d", () => (isDistortions = !isDistortions))
PressDo("ArrowUp", () => (wei = min(1, wei + 0.02)))
PressDo("ArrowDown", () => (wei = max(0, wei - 0.02)))