Skip to content

Conversation

@Piyushrathoree
Copy link

Resolves #8344
This Resolves the issue of filter not working with WEBGPU with CDN.
Problem - the instanceof in StrandsNode is not working properly with p5.webgpu.js.
fix - introduced duck typing with isStrandsNode property.

Tested locally with built lib/p5.js + lib/p5.webgpu.js:

  • Before: filter(BLUR) has no effect + type error
  • After: Blur applies correctly to canvas.

Changes:

before:
image

after:
Screenshot 2025-12-19 161303
getting something like this.

PR Checklist

…rocessing#8344)

- Added isStrandsNode in node constructor
- Replaced instanceof check with property check to handle duplicate modules in p5.js + p5.webgpu.js
- Tested locally: filter(BLUR) now applies correctly in WEBGPU mode
Copy link
Contributor

@davepagurek davepagurek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thanks!

@davepagurek davepagurek merged commit f19664a into processing:dev-2.0 Dec 19, 2025
2 checks passed
@davepagurek
Copy link
Contributor

@all-contributors please add @Piyushrathoree for code

@allcontributors
Copy link
Contributor

@davepagurek

I've put up a pull request to add @Piyushrathoree! 🎉

@Piyushrathoree Piyushrathoree deleted the fix-webgpu-filter-cdn branch December 19, 2025 18:33
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.

2 participants