Working with html/css and p5.js

i not understand any of your working environment related questions,
but if you insist NOT to use processing to show some text
still can use the ( already loaded ) p5.dom.js for it
example:

var div;

function setup() {
  createCanvas(400, 400);
  div = createDiv('').size(200, 50);
  div.html('click/move your mouse');
  div.position(20,20);    // brings it inside the canvas, disable to show it below
}

function draw() {
  background(200,200,0);
  timer();
}

function timer() {
  if ( frameCount > 300 ) div.html('');     // 5 sec ?
}

as that is permanently active you can use it later for more info to user

1 Like