What’s on our mind?

Collection of articles, design, site, and resources made by designers and publisher @Menu View

P5.js 5건이 검색되었습니다.

점점..

index2 const g = { w: window.innerWidth, h: window.innerHeight, s: Math.min(window.innerWidth, window.innerHeighth), }; function setup() { g.w = window.innerWidth; g.h = window.innerHeight; g.s = min(g.w, g.h); g.cx = g.w * 0.5; g.cy = g.h * 0.5; createCanvas(g.w, g.h); } let n = 0; function draw() { background(0); n += 0.5; drawStars(); drawPlanet( g.s * (-noise(12) + 0.5), g.s * (-noise(312) *..

더 보기

너 싫어

index1 var scketch = function (p) { var particleNum = 100; var particle; var particles = []; var pixels = []; var img; var Particle = function (pos, v, d, c) { this.p = pos; this.temp_p = this.p.copy(); this.defaultPos = this.p.copy(); this.v = v; this.a = p.createVector(0, 0); this.d = d; this.r = d / 2; this.color = c; this.mass = this.r; this.noise_x = p.random(1000); this.noise_y = p.random(..

더 보기

Sine wave

var angle = 0.0; var y = []; var x; function setup() { createCanvas(windowWidth, windowHeight); stroke(255); strokeWeight(3); } function draw() { background( '#1d0808' ); angle += 0.02; x = angle; for ( var i = 0; i < width; i++ ) { y[i] = sin(x); y[i] = y[i] * 200; x += 1; } for ( var i = 0; i < width; i++ ) { stroke(abs(y[i] * 1.4), 0, 0); point(i * 5, height/2 + y[i] ); } }

더 보기

Cursor trails

var al = []; function setup() { createCanvas(windowWidth, windowHeight); } function draw() { background('#fff'); //닷 stroke('rgb(237, 34, 93)'); strokeWeight(2); for(var i=0; i

더 보기

Casual Bubbles

* const bgColor = 'hotpink'; const inkColor = 'white'; function setup() { createCanvas(windowWidth, windowHeight); stroke(inkColor); strokeWeight(2); fill(bgColor); frameRate(1); } function draw() { background(bgColor); const count = round(windowWidth/12); for (let i = 0; i < count; i++) { const x = random(10, width); const y = random(10, height); const d = random(10, 250); circle(x, y, d); } }

더 보기