{"name":"dev_PARTY #005","description":"Interactive NFT by @andriibakulin\n\n<code>\nlet entities = [];\nlet global_x, global_y, global_s;\n\nclass Entity\n{\n    constructor(index)\n    {\n        this.index = index;\n        this.color = 0;\n        this.offset = 0;\n    }\n\n    next(dt)\n    {\n        this.offset += dt;\n        this.color += dt * 128;\n    }\n\n    render(index)\n    {\n        const c0 = Mathf_Repeat(this.color/3 + index * 5, 255);\n\n        let x = global_x * 10 * index + Math.sin(this.offset*0.33) * 50;\n        let y = global_y * 10 * index - Math.cos(this.offset*0.33) * 50;\n        let w = Math.sin(this.offset + this.index * global_x * 0.1) * global_s * (1 - index * 0.01);\n        let h = Math.cos(this.offset + this.index * global_y * 0.2) * global_s * (1 - index * 0.01);\n\n        fill(c0, 255, 128, 12);\n        stroke(c0, 255, 255);\n        strokeWeight(1);\n\n        resetMatrix();\n        translate(window.innerWidth / 2, window.innerHeight / 2);\n        ellipse(x, y, w, h);\n    }\n}\n\nfunction setup()\n{\n    global_x = -0.25;\n    global_y = +0.25;\n    global_s = Math.min(window.innerWidth, window.innerHeight) * 0.8;\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    for (let index=0; index<35; index++)\n    {\n        entities.push(new Entity(index));\n    }\n}\n\nfunction windowResized()\n{\n    resizeCanvas(window.innerWidth, window.innerHeight);\n}\n\nfunction draw()\n{\n    const dt = deltaTime/1000;\n\n    if (mouseIsPressed)\n    {\n        global_x = (mouseX / window.innerWidth  - 0.5) * 2;\n        global_y = (mouseY / window.innerHeight - 0.5) * 2;\n        global_s = Math.min(window.innerWidth, window.innerHeight) * 0.8;\n    }\n\n    background(0);\n\n    for (var idx in entities)\n    {\n        const ent = entities[idx];\n        ent.render(idx);\n        ent.next(dt);\n    }\n}\n</code>","tags":["codeart","interactive","procedural","generative","generativeart","realtime","p5js","p5func"],"symbol":"OBJKT","artifactUri":"ipfs://QmXhYN7mosJeDX7zo4Azk6miqJJyvBH2NZrEvsQ6ebu537","displayUri":"ipfs://QmVxPEBbi5P4ioG1bGA63ohGQaouFobtBL2z6YggG9bGU2","thumbnailUri":"ipfs://QmNrhZHUaEqxhyLfqoq1mtHSipkWHeT31LNHb1QEbDHgnc","creators":["tz1Ys42frYhgxHxXtqoY42GiuRPZ9ykbP86Y"],"formats":[{"uri":"ipfs://QmXhYN7mosJeDX7zo4Azk6miqJJyvBH2NZrEvsQ6ebu537","mimeType":"application/x-directory"}],"decimals":0,"isBooleanAmount":false,"shouldPreferSymbol":false}