Action that changes Unicode when you type text

Asked 2 weeks ago, Updated 2 weeks ago, 1 views

Hello, I'm Corinne, a designer, and I'm a self-taught questioner.

First, get clear help with the questions, and ask questions to solve embarrassing but different problems.

Currently, I am

I'm working on making html where the Unicode value changes wildly when I type text. ( (

The professor made and shared the code on p5 editor as a sample. (

What's the problem is

The sample coding that the professor made for me works in the p5 editor is loading when I bring it to the desktop path. It only appears, but it doesn't work. Even if the coding that the professor made is made into each file on the desktop, loading is the same. It says...(In the past, when I copied the sample code from my desktop and opened the file, the sample worked as it was.)This time, the sample is not working either. I think it's because of the typeface. I don't know how to fix it. (The NanumGothic.ttf font doesn't go up on Is it because it's a font file? Or maybe it's just a little bit of an error.)

I think it's because I don't know the exact value of the function that brings up the code you wrote. Below is the code I made, and I put a function value that I thought might be right among the codes you made.

<divid="article" onfocus="draw(i);">"Hey

I don't know if this is the right function. Strangely, JavaScript should be applied to that article The Java script is applied separately in the next line.

After watching it, it, it's really... I beg of course.


2022-09-20 10:24

1 Answers

To point out something that doesn't fit, let's talk about something that fits. Why doesn't it work for me, but for a damn professor? I'll erase this and that from your sketch.js and look at the key points.

let str = 'Hello'; // 3 characters in total
function draw() { // A draw() function that does not accept any factor does the following:
  Let unicode = '; // Make one blank text to draw on the screen.
  for (var i = 0; i < str.length; i++) {
    // At this point, str[i] corresponds to each letter 'hell', 'ro', and 'woo'. If you don't know why... Please google javascript for and make sure to study.
    Let unitmp = str[i].charCodeAt(0).toString(16); // obtain Unicode eigenvalues for each character.
    Let unitint = parseInt(unitmp,16) + 1; // Add 1 to its eigenvalues to determine the Unicode eigenvalues of the following characters:
    unicode += String.fromCharCode(unit); // Get the following characters with the unitint you just found, and add them to the text you want to draw on the screen.
  // At this point, 'hello' would have changed to 'hehehehe.'
  str = unicode; // The text to draw has been decided, so take it and replace the current character.
  text(str, 100, 240); // Draw a letter on the screen.

Now, I'll ask you the opposite question.
Your code is doing what you have to do, what about your code? Is that the right code to do what you have to do and not do anything else?

To do this throughout Jang-er's "I'm Not Envy" lyrics, should str be '#article' or (div.article.innerText) "Hey you guys~"? How essential/influential is "sharing Gothic font" in doing this? (Isn't 'manipulating Unicode' actually an element that has nothing to do with the routine?) When draw(i), i is useful or not in the draw() execution process? Professor's index.html has one body tag, and even if you look at the source of this site, there is one body tag, but isn't it strange that your index.html has two bodies?

The application process is too fast, but anyway, study Professor Yang Min-ha's samples and slowly do it again one by one! Good luck to you.

2022-09-20 10:24

If you have any answers or tips

© 2022 pinfo. All rights reserved.