xxxxxxxxxx
49
//font credit : Pinyon Script by google font
let num = 20;
let radian = 500;
let sizeText = 150;
let font;
let a = 50;
function preload(){
font = loadFont("Pinyon.ttf");
}
function setup() {
createCanvas(700, 500);
}
function draw() {
background(0,0,0,50);
angleMode(DEGREES);
textSize(sizeText);
textAlign(CENTER);
textFont(font);
noFill();
let time = millis()/100;
radian = map(sin(time),-1,1,300,0);
a = map(sin(time),-1,1,10,50);
drawText("1",-150,0,200,255);
drawText("9",-50,0,200,255);
drawText("6",50,0,255,150);
drawText("1",150,0,255,150);
}
function drawText(TEXT,space,r,g,b){
for(let angle=0; angle<=360; angle+=360/num){
push();
translate(width/2,height/2+(sizeText/3));
stroke(r,g,b,a);
fill(r,g,b,a);
let xPos = space+radian*cos(angle);
let yPos = radian*sin(angle);
text(TEXT,xPos,yPos);
pop();
}
}