Skip to content

[p5.strands] Add methods that are shortcuts to a base shader's .modify() function to simplify creation #7993

@davepagurek

Description

@davepagurek

Right now, to create a shader with p5.strands, we have a lot of brackets, e.g. baseMaterialShader().modify(() => { ... }). It may not be obvious to users that baseMaterialShader() is a function (that's actually more an artifact of its implementation, it probably doesn't need to be) and it's easy to forget the brackets, as I do often! We can maybe make new methods for each base shader that skips that step, e.g. modifyMaterialShader(() => { ... }), modifyFilterShader(() => { ... }), etc.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions