Skip to content

Add logging for experimental features - #9109

Open
davepagurek wants to merge 8 commits into
mainfrom
experimental-features
Open

Add logging for experimental features#9109
davepagurek wants to merge 8 commits into
mainfrom
experimental-features

Conversation

@davepagurek

@davepagurek davepagurek commented Aug 23, 2026

Copy link
Copy Markdown
Contributor

Resolves #9108

Changes:

  • Adds a decorator system for marking experimental functionality in p5
  • Sets up strands and webgpu entrypoints as experimental
  • Updates the contributor docs for strands and webgpu to be better landing pages for users coming from those experimental function warnings

Live example: https://editor.p5js.org/davepagurek/sketches/p1c5jvRAf

image

PR Checklist

@Vaivaswat2244 Vaivaswat2244 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hi @davepagurek , I had a few thoughts on this.

Comment thread src/webgl/material.js
fn.buildMaterialShader = function (cb, scope) {
return this.baseMaterialShader().modify(cb, scope);
};
p5.registerDecorator('p5.prototype.buildMaterialShader', markExperimental('p5.strands', p5));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

buildNormalShader also has beta tag, that should also be here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yep, good catch!

Comment thread src/core/p5.Renderer3D.js
}
return this._renderer.createStorage(dataOrCount);
};
p5.registerDecorator('p5.prototype.createStorage', markExperimental('webgpu', p5));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

baseComputeShader() (L2379) and compute() (L2725) are @beta and live on Renderer3D, so they are reachable in WEBGL mode where the RendererWebGPU constructor warning never fires...

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Compute shaders only actually work in WebGPU mode and will throw an error in WebGL mode so I figured that path was less critical to flag.

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.

Better labelling of usage of experimental functionality

2 participants