Skip to content

[p5.strands] Reenabling and implementing FES in strands #7899

Description

@lukeplowden

Increasing access

FES is a core part of making p5.js approachable, but it is currently disabled in p5.strands

Most appropriate sub-area of p5.js?

  • Accessibility
  • Color
  • Core/Environment/Rendering
  • Data
  • DOM
  • Events
  • Image
  • IO
  • Math
  • Typography
  • Utilities
  • WebGL
  • Build process
  • Unit testing
  • Internationalization
  • Friendly errors
  • Other (specify if possible)

Feature enhancement details

p5.strands disables FES entirely whilst it compiles the user's code to GLSL. This is because there are some functions with shared scope and name clashes, in p5.strands and the core p5.js library... see #7849. This causes two types of false negatives, to my knowledge:

  1. FES prints a lot of warnings about overriding p5.js variables.
  2. FES will also give warnings coming from _validateParameters, since it expects the core function signature. For example, if you use sin(10) in strands, it will be converted to sin(dynamicNode(10)), and the actual received arg will not be of type Number. FES will therefore warn that sin expects a number. This is also the case for atan() which GLSL allows 1 or 2 arguments for, whereas p5.js only allows one.

Activity

  1. moved this to Open for Discussion in p5.js 2.x 🌱🌳on Jun 10, 2025
  2. added this to the 2.x Anytime milestone on Jun 10, 2025
  3. Satish-Medar commented on Aug 24, 2025

    @Satish-Medar

    @lukeplowden I’d like to work on this issue. Could you please assign it to me?

  4. lukeplowden commented on Aug 29, 2025

    @lukeplowden
    MemberAuthor

    Hi @Satish-Medar, thank you for being interested. I have been away this month hence the slow reply.

    I am just finishing up a refactor in #8009 which is pertinent to this issue. You can see here I've started a small file to handle FES.

    Here, in the new main strands file, you can see FES is disabled/ re-enabled when strands is initialised.

    One good approach for now is to identify all of the places where FES will be used in strands. You could start by looking at all my references to FES in that branch and taking inventory, also cross referencing with this document and making sure the style aligns.

  5. Ayush4958 commented on Aug 2, 2026

    @Ayush4958

    Hi @lukeplowden , @ksen0 ,

    I would like to work on this issue, First I had planned to go

    • through p5 strands module and create inventory where FES is disabled or needs to implement. I will also follow the style with FES contribution guide.

    I will paste the inventory list here in this thread, after a review, I can implement
    FES handlers to correctly bypass or validate the dynamic GLSL nodes

    If this approach sounds good, I can start this
    could you assign this to me ??

  6. Ayush4958 commented on Aug 2, 2026

    @Ayush4958

    I just go through the strandNode which exposes typeinfo. so I am thinking to update the FES validators
    So when they receive argument for strandNode being true. they will be dynamically validate against base type of typeinfo

  7. ksen0 commented on Aug 4, 2026

    @ksen0
    Member

    Hi @Ayush4958 I've noticed you have been making many comments on multiple open issues. Please don't do too many requests for assignment and feedback, this kind of behavior results in many notifications and slower times to respond/review. We appreciate the interest but right now the bottleneck is responding to comments and reviewing. If you want, helping to review open PRs by testing them or providing informed feedback would be very helpful to improve overall efficiency. Thanks for understanding!

  8. Ayush4958 commented on Aug 5, 2026

    @Ayush4958

    Sorry for commenting on multiple issues
    I will try to review the opened pr
    And will provide informed feedback

    Thanks ...

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

Metadata

Metadata

Assignees

Type

No type

Projects

Relationships

None yet

Development

No branches or pull requests

Issue actions