<commit_before>const easerCount = 500
const easing = 0.05
const diameter = 10
let easer = []

function setup() {
  createCanvas(windowWidth, windowHeight)
  // console.log(`${windowWidth}, ${windowHeight}`)
  noStroke()
  background(255)

  for (let i = 0; i < easerCount; i++) {
    let e = new Easer(width / 2, height / 2, diameter, easing);
    easer.push(e);
  }
}

function draw() {
  background(255)

  for (let i = 0; i < easer.length; i++) {
    easer[i].update()
    easer[i].render()
  }
}

function mousePressed() {
  for (let i = 0; i < easer.length; i++) {
    easer[i].setTarget(mouseX, mouseY)
  }
}


function Easer(xpos, ypos, diameter, newEasing) {
  this.x = xpos
  this.y = ypos
  this.targetX = this.x
  this.targetY = this.y
  this.d = diameter
  this.ease = newEasing
  this.clr = color(random(0, 255), random(0, 255), random(0, 255), 127)

  this.render = function() {
    fill(this.clr)
    ellipse(this.x, this.y, this.d, this.d)
  }

  this.update = function() {
    let dx = this.targetX - this.x
    let dy = this.targetY - this.y
    if (abs(dx) > 0.1 || abs(dy) > 0.1) {
      this.x += dx * this.ease<commit_msg>windowResize()<commit_after>const easerCount = 500
const easing = 0.05
const diameter = 10
let easer = []

function setup() {
  createCanvas(windowWidth, windowHeight)
  // console.log(`${windowWidth}, ${windowHeight}`)
  noStroke()
  background(255)

  for (let i = 0; i < easerCount; i++) {
    let e = new Easer(width / 2, height / 2, diameter, easing);
    easer.push(e);
  }
}

function draw() {
  background(255)

  for (let i = 0; i < easer.length; i++) {
    easer[i].update()
    easer[i].render()
  }
}

function mousePressed() {
  for (let i = 0; i < easer.length; i++) {
    easer[i].setTarget(mouseX, mouseY)
  }
}

function windowResized() {
  resizeCanvas(windowWidth, windowHeight)
}


function Easer(xpos, ypos, diameter, newEasing) {
  this.x = xpos
  this.y = ypos
  this.targetX = this.x
  this.targetY = this.y
  this.d = diameter
  this.ease = newEasing
  this.clr = color(random(0, 255), random(0, 255), random(0, 255), 127)

  this.render = function() {
    fill(this.clr)
    ellipse(this.x, this.y, this.d, this.d)
  }

  this.update = function() {
    let dx = this.targetX - this.x
    let dy = this.targetY - this.y
    if (abs(dx) > 0.1 || abs(dy) > 0.1) {
      this.x += dx * this.ease
{'fraction_non_alphanumeric': 0.16560779330792036, 'fraction_numerical': 0.03218975010588734, 'mean_word_length': 2.9630872483221475, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4392546', 'n_tokens_mistral': 991, 'n_tokens_neox': 920, 'n_words': 221}