From ddef051273ea53a9918877790643d8b3d43bfea1 Mon Sep 17 00:00:00 2001 From: Lalit Narayan Yadav <162928571+LalitNarayanYadav@users.noreply.github.com> Date: Thu, 24 Jul 2025 22:57:25 +0530 Subject: [PATCH] Add p5.strands bloom filter example to filter() reference --- src/content/reference/en/p5/filter.mdx | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/content/reference/en/p5/filter.mdx b/src/content/reference/en/p5/filter.mdx index 2eacb35940..4c860fb5b9 100644 --- a/src/content/reference/en/p5/filter.mdx +++ b/src/content/reference/en/p5/filter.mdx @@ -264,6 +264,32 @@ example: } +
+ 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.');
+
+