Skip to content

Add p5.strands bloom filter example to filter() reference#917

Closed
LalitNarayanYadav wants to merge 1 commit intoprocessing:2.0from
LalitNarayanYadav:patch-1
Closed

Add p5.strands bloom filter example to filter() reference#917
LalitNarayanYadav wants to merge 1 commit intoprocessing:2.0from
LalitNarayanYadav:patch-1

Conversation

@LalitNarayanYadav
Copy link
Copy Markdown

Added Example: Bloom Effect on a Rotating 3D Cube using p5.strands

Description

This PR adds a new code example under the filter() reference that demonstrates how to apply a bloom (glow) effect using the p5.strands library. The example showcases a rotating 3D cube rendered in WEBGL mode with a subtle post-processing effect.

Code Summary

let strands;

function setup() {
  createCanvas(400, 400, WEBGL);
  strands = new Strands();
  strands.filter(bloom);
}

function draw() {
  strands.draw(() => {
    rotateY(millis() / 1000);
    normalMaterial();
    box(150);
  });
}

function bloom(input) {
  return input.blur(8).brighten(1.5).blend(input, ADD);
}

describe('A rotating 3D cube with a glow (bloom) effect using p5.strands.');

@LalitNarayanYadav
Copy link
Copy Markdown
Author

fixes #7898

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant