FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fixes for particles algebra api in Python by tychedelia · Pull Request #251 · processing/libprocessing · GitHub

Repository navigation

Fixes for particles algebra api in Python - #251

Merged
catilac merged 1 commit into
dispatch-uniform-fixesfrom
vector-map-broadcast
Oct 5, 2026
Merged

catilac merged 1 commit into
dispatch-uniform-fixesfrom
vector-map-broadcast

Conversation

tychedelia commented Sep 29, 2026 •
edited
Loading

Copy link
Copy Markdown
Member

Working toward composing things like flocking from attribute math alone, without custom shaders, and two things were missing.

  • Vector length ops. MAP now has NORMALIZE (to length=) and LIMIT (min_length=/max_length=). Both work on the whole vector; zero stays zero.
  • Broadcasting. Like numpy's (N, 1) * (N, 3): a 1-component b in COMBINE now applies across every component, so you can scale by a per-particle value or multiply by a 0/1 mask.

p.apply(MAP, "velocity", op=LIMIT, max_length=10)
p.apply(COMBINE, "velocity", "speed", op=MUL)

Positional operands come in the next PR.

tychedelia added this pull request to stack #256 September 29, 2026 04:50
tychedelia removed this pull request from stack #256 September 29, 2026 05:06
tychedelia added this pull request to stack #258 September 29, 2026 05:06

github-actions Bot commented Sep 29, 2026 •
edited
Loading

Copy link
Copy Markdown

Visual regression: no changes across 43 cases

baseline f4e69a80d4 · adapter llvmpipe (LLVM 20.1.2, 256 bits) (Vulkan, Mesa 25.2.8-0ubuntu0.24.04.2 (LLVM 20.1.2))

Open the visual report · workflow run

catilac merged commit 496b5c8 into main Oct 5, 2026
5 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL