https://editor.p5js.org/illus0r/sketches/NHBATASC7
//https://editor.p5js.org/illus0r/sketches/w7cKGBPM-
let myFont
let str
function preload() {
myFont = loadFont('MajorMonoDisplay-Regular.ttf')
}
function setup() {
createCanvas(512,512)
// frameRate(10)
textFont(myFont)
textAlign(CENTER, CENTER)
textSize(400)
str = 'genklub'
}
function draw() {
// background('fff')
for(let i = 0; i < str.length; i++) {
let b = 256*(sin(frameCount*.1 + i)*.5+.5)
fill(b, b, b, 100)
let amp = 200
let x = width/2 + amp * sin(i*2*PI/str.length + frameCount*.01)
let y = height/2 + amp * cos(i*2*PI/str.length + frameCount*.01)
text(str[i], x, y)
}
}
let str = 'Genklub'
function setup() {
createCanvas(400, 400)
textAlign(CENTER, CENTER)
}
function draw() {
background(220)
text(str[0], width/2, height/2)
}
let str = 'Hello world'
function setup() {
createCanvas(400, 400)
textAlign(CENTER, CENTER)
textSize(100)
}
function draw() {
background(220)
for(let i = 0; i < str.length; i++) {
let a = -(i * 2 * PI / str.length)
let x = width/2 + 100 * sin(a)
let y = height/2 + 100 * cos(a)
text(str[i], x, y)
}
}
let str = 'Helloworld'
let myFont
function preload() {
myFont = loadFont('MajorMonoDisplay-Regular.ttf')
}
function setup() {
createCanvas(400, 400)
textAlign(CENTER, CENTER)
textSize(50)
textFont(myFont)
}
function draw() {
background(0)
fill(255)
for(let i = 0; i < str.length; i++) {
let a = i * 2 * PI / str.length + frameCount * .01
let x = width/2 + 100 * sin(a)
let y = height/2 + 100 * -cos(a)
text(str[i], x, y)
}
}
let str = 'Helloworld'
let myFont
function preload() {
myFont = loadFont('MajorMonoDisplay-Regular.ttf')
}
function setup() {
createCanvas(400, 400)
textAlign(CENTER, CENTER)
textSize(400)
textFont(myFont)
background(0)
}
function draw() {
for(let i = 0; i < str.length; i++) {
fill(255*(sin(frameCount * .1 + i * 2) * .5 + .5))
let a = i * 2 * PI / str.length + frameCount * .01
let x = width/2 + 200 * sin(a)
let y = height/2 + 200 * -cos(a)
text(str[i], x, y)
}
}