NEW GOLD DREAM

 


CÓDIGO

//(C)Sergio Salazar Latorre

//New Gold Dream

//Basado en el LP de Simple Minds del mismo nombre

let x,y

let a

let s

let l=600

let ngd

let font


function preload(){

  font = loadFont("GGR.ttf")

}


function setup() {

  textFont(font)

  createCanvas(l,l);

  angleMode(DEGREES)

  background(0);

  ngd= new NewGoldenDream(1,0.9,l/2,l/2)

}


function draw() {

  strokeWeight(3)

  stroke(255)

  ngd.heavenSit()

  if(frameCount==3700){

    noLoop()

    fill(255,0,0)

    strokeWeight(6)

    textSize(80)

    text("New Gold Dream", l/400*40,l/2)

    textSize(30)

    text("(C)Sergio Salazar Latorre",l/3.5,l/2+40)

  }

  

}


class NewGoldenDream{

  constructor(fx,fy,rx,ry){

    this.fx=fx

    this.fy=fy

    this.rx=rx

    this.ry=ry

    this.x

    this.y

  }

  

  heavenSit(){

    this.x = l/2+sin(frameCount*1)*250

    this.y = l/2+cos(frameCount*0.9)*250

    point(this.x, this.y)

  }

}


Comentarios

Entradas populares