processing / processing/p5.js

add a paletteLerp equivalent for p5.strands

Open
#8,751 14 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Enhancement p5.js 2.0+ p5.strands
Dominant language
JavaScript
Stars
24k
Forks
3.8k
Avg merge
3d 16h
Merged PRs (30d)
25

Description

in regular p5, paletteLerp lets you blend across multiple color stops at given positions, which is super handy for gradients. there is no equivalent inside p5.strands shaders right now, so anyone wanting a multi stop gradient on the gpu has to chain mix() calls or write their own helper.

would be cool to have something with similar ergonomics that works inside strands callbacks. exact api is up for discussion since strands has its own way of expressing things, but the goal would be feature parity with the cpu paletteLerp.

came out of the same call. opening this so it doesn't get lost.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading the regular p5 paletteLerp behavior and the p5.strands shader callback model. Determine an API that fits strands while preserving multi-stop blending at specified positions, then confirm that the resulting helper provides feature parity for GPU gradients.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
computer-graphics
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.