{"name":"dev_PARTY #004","description":"Interactive NFT by @andriibakulin\n\n<code>\nlet entities = [];\nlet offset = 0;\n\nclass Entity\n{\n    constructor(x, y, color, size, border_radius)\n    {\n        this.x = x;\n        this.y = y;\n        this.rotation = 0;\n        this.size = size;\n        this.color = color;\n        this.border_radius = border_radius;\n    }\n\n    next(dt)\n    {\n        this.rotation += 10;\n        this.size += dt * 30;\n        this.color += 10;\n    }\n\n    render(offset)\n    {\n        const c0 = Mathf_Repeat(this.color/3 + offset * 1.5, 255);\n        const c1 = Mathf_PingPong(this.color, 128) + 128;\n\n        noFill();\n        stroke(c0, 255, c1);\n        strokeWeight(1);\n\n        resetMatrix();\n        translate(this.x, this.y);\n        rotate(+(this.rotation - offset * 3));\n        square(-this.size/2, -this.size/2 - this.size*3, this.size, this.border_radius);\n        square(-this.size/2, -this.size/2 + this.size*3, this.size, this.border_radius);\n\n        resetMatrix();\n        translate(this.x, this.y);\n        rotate(-(this.rotation - offset * 3));\n        square(-this.size/2 - this.size*3, -this.size/2, this.size, this.border_radius);\n        square(-this.size/2 + this.size*3, -this.size/2, this.size, this.border_radius);\n    }\n}\n\nfunction setup()\n{\n    createCanvas(window.innerWidth, window.innerHeight)\n\n    pixelDensity(1);\n    frameRate(60);\n\n    colorMode(HSB, 255);\n    angleMode(DEGREES);\n\n    background(0);\n}\n\nfunction windowResized()\n{\n    resizeCanvas(window.innerWidth, window.innerHeight);\n}\n\nfunction draw()\n{\n    let x = mouseX;\n    let y = mouseY;\n\n    if (x==0 && y==0)\n    {\n        x = window.innerWidth/2;\n        y = window.innerHeight/2;\n    }\n\n    const entity = new Entity(x, y, 50, 5, 10);\n\n    entities.push(entity);\n\n    if (entities.length > 75)\n        entities.shift();\n\n    const dt = deltaTime/1000;\n\n    offset += dt * 100;\n\n    background(0);\n    noFill();\n\n    for (var idx in entities)\n    {\n        const ent = entities[idx];\n        ent.render(offset);\n        ent.next(dt);\n    }\n}\n</code>","tags":["codeart","interactive","procedural","generative","generativeart","realtime","p5js","p5func"],"symbol":"OBJKT","artifactUri":"ipfs://QmR4QgZPe4APjS3bzktgAZrWsaYS82w7JH7UATYYstdEzN","displayUri":"ipfs://QmXarW4XVZZjAAkrdnBGBnHcaefhbTLzoD682WAiniJez1","thumbnailUri":"ipfs://QmNrhZHUaEqxhyLfqoq1mtHSipkWHeT31LNHb1QEbDHgnc","creators":["tz1Ys42frYhgxHxXtqoY42GiuRPZ9ykbP86Y"],"formats":[{"uri":"ipfs://QmR4QgZPe4APjS3bzktgAZrWsaYS82w7JH7UATYYstdEzN","mimeType":"application/x-directory"}],"decimals":0,"isBooleanAmount":false,"shouldPreferSymbol":false}