“NoisePlanet_Mountain Stone” by Siqi Li
https://openprocessing.org/sketch/2407895
License CreativeCommons Attribution NonCommercial ShareAlike
https://creativecommons.org/licenses/by-nc-sa/3.0
{{filePath}}
{{width}} x {{height}}
Report Sketch
Oh, that naughty sketch! Please let us know what the issue is below.
Apply Template
Applying this template will reset your sketch and remove all your changes. Are you sure you would like to continue?
Report Sketch
Report Comment
Please confirm that you would like to report the comment below.
We will review your submission and take any actions necessary per our Community Guidelines. In addition to reporting this comment, you can also block the user to prevent any future interactions.
Please report comments only when necessary. Unnecessary or abusive use of this tool may result in your own account being suspended.
Are you sure you want to delete your sketch?
Any files uploaded will be deleted as well.
Delete Comment?
This will also delete all the replies to this comment.
Delete this tab? Any code in it will be deleted as well.
Select a collection to submit your sketch
We Need Your Support
Since 2008, OpenProcessing has provided tools for creative coders to learn, create, and share over a million open source projects in a friendly environment.
Niche websites like ours need your continued support for future development and maintenance, while keeping it an ad-free platform that respects your data and privacy!
Please consider subscribing below to show your support with a "Plus" badge on your profile and get access to many other features!
press "s" or "S" to save picture as a png file
A fork of NoisePlanet_Mountain Stone by dzarch
CC Attribution NonCommercial ShareAlike
NoisePlanet_Mountain Stone
Li
xxxxxxxxxx
// by SamuelYAN
// more works //
// https://twitter.com/SamuelAnn0924
// https://www.instagram.com/samuel_yan_1990/
var seed = Math.random() * 1000;
var particles = [];
var particles_2 = [];
var particles_wave = [];
var mySize, margin;
var parNum;
var parNum_wave;
var color_ver;
let color1, color2, alpha1, alpha2;
let colorGrass1, colorGrass2;
let color_bg = "3f4442-5c5358-202020-161426".split("-").map((a) => "#" + a);
let ver; // try to make more version
let theShader;
let webGLCanvas;
let waveGraphics;
let bgGraphics;
let originalGraphics;
function preload() {
theShader = new p5.Shader(this.renderer, vert, frag)
}
function setup() {
frameRate(25);
// pixelDensity(5)
randomSeed(seed);
// ver = 6;
ver = random([1, 2, 3, 4, 5, 6]);
mySize = 1920; //min(windowWidth, windowHeight);
margin = min(windowWidth, windowHeight) / 100;
createCanvas(mySize / 16 * 11, mySize);
webGLCanvas = createGraphics(width, height, WEBGL);
waveGraphics = createGraphics(width, height);
bgGraphics = createGraphics(width, height);
originalGraphics = createGraphics(width, height);
colorMode(RGB, 255, 255, 255, 100);
parNum = int(random(4, 2)) * int(random(10, 20) / 1);
parNum_wave = int(random(4, 2)) * int(random(10, 20) * 20);
for (let j = 0; j < 1; j++) {
for (let i = 0; i < int(parNum / 2 * 2); i++) {
particles.push(new Particle(random(-width * 0.1, width * 1.1), random(-height * 0.1, height * 1.1), ver));
}
for (let i = 0; i < int(parNum / 4); i++) {
particles_2.push(new Particle_2(random(-width * 0.1, width * 1.1), random(-height * 0.1, height * 1.1), ver));
}
for (let i = 0; i < parNum_wave; i++) {
particles_wave.push(new Particle_wave(random(-width * 0.1, width * 1.1), height / parNum_wave * i));
}
}
let filter1 = new makeFilter();
let bgcolor = random(color_bg)
bgGraphics.background(bgcolor);
color_ver = random([1]);
// color_ver = 9;
color_palette();
}
function draw() {
randomSeed(seed);
webGLCanvas.shader(theShader);
theShader.setUniform('u_resolution', [width / width, height / height]);
theShader.setUniform('u_time', millis() / 1000);
theShader.setUniform('u_mouse', [mouseX / width, mouseY / height]);
theShader.setUniform('u_tex', bgGraphics);
webGLCanvas.clear();
webGLCanvas.rect(-width / 2, -height / 2, width, height);
if (int(seed) % 2 == 0) {
for (let i = particles_wave.length - 1; i > 0; i--) {
if (i < particles_wave.length) {
particles_wave[i].update();
particles_wave[i].show(bgGraphics);
if (particles_wave[i].finished()) {
particles_wave.splice(i, 1);
}
}
}
}
for (let i = particles.length - 1; i > 0; i--) {
if (i < particles.length) {
particles[i].update();
particles[i].show(bgGraphics);
if (particles[i].finished()) {
particles.push(new Particle(random(-width * 0.1, width * 1.1), random(-height * 0.1, height * 1.1), ver));
particles.splice(i, 1);
}
}
}
blendMode(BLEND);
image(webGLCanvas, 0, 0);
image(overAllTexture, 0, 0);
blendMode(SCREEN);
for (let i = particles_2.length - 1; i > 0; i--) {
if (i < particles_2.length) {
particles_2[i].update();
particles_2[i].show(originalGraphics);
if (particles_2[i].finished()) {
particles_2.splice(i, 1);
}
}
}
image(originalGraphics, 0, 0);
if (frameCount == 250) {
noLoop();
blendMode(ADD);
strokeWeight(random(0.1, 0.05));
stroke("#ffffff0d");
noFill();
drawingContext.setLineDash([1, 2, 1, 3]);
drawOverPattern();
image(overAllTexture, 0, 0);
blendMode(BLEND);
noFill();
drawingContext.setLineDash([1, 1, 1, 1]);
stroke("#202020");
strokeWeight(margin);
rect(0, 0, width, height);
}
}
//save
function keyTyped() {
if (key === "s" || key === "S") {
saveCanvas("1017_NoisePlanet_Mountain Stone_2022", "png");
}
}
Examples: Play - Synthesis - Microphone
See More Shortcuts
Please verify your email to comment
Verify Email