We are about to switch to a new forum software. Until then we have removed the registration on this forum.
hi, i want to use textarea with korean characters input, so i have to use p5.dom library. if it's possible, i want include the p5.dom library into processing sketch. or, convert this p5.js sketch to processing and show it on processing.
var input, button, greeting;
function setup() {
// create canvas createCanvas(710, 400);
input = createInput(); input.position(20, 65);
button = createButton('submit'); button.position(150, 65); button.mousePressed(greet);
greeting = createElement('h2', 'what is your name?'); greeting.position(20, 5);
textAlign(CENTER) textSize(50); }
function greet() { var name = input.value(); greeting.html('hello '+name+'!'); input.value('');
for (var i=0; i<200; i++) { push(); fill(random(255), 255, 255); translate(random(width), random(height)); rotate(random(2*PI)); text(name, 0, 0); pop(); } }
thank you..
Answers
https://forum.Processing.org/two/discussion/8045/how-to-format-code-and-text
p5.js is written in JavaScript. While main Processing (a.K.a. Java Mode) is written in Java.
Java doesn't have any direct access to some browsers DOM as JS does.
Java can act as a backend server though.