Skip to content

Processing core functions for Python. - #273

Merged
tychedelia merged 5 commits into
mainfrom
py-core-functions
Nov 23, 2026
Merged

tychedelia merged 5 commits into
mainfrom
py-core-functions

Conversation

@tychedelia

@tychedelia tychedelia commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

Fills in a pile of the core Processing functions that were missing from Python.

  • noise, noise_detail, noise_seed. this is a port of Processing's actual Perlin noise (cos lookup table and
    all) so sketches look the same as the originals. lives in processing_core so the other frontends can use it too. i ant to do a more comprehensive re-evaluation of noise in the future, including adding more noise types that are useful for creative coding but this is just a compatability start.
  • random, random_gaussian, random_seed
  • bezier_point, bezier_tangent, curve_point, curve_tangent
  • color getters: red, green, blue, alpha, hue, saturation, brightness. they respect the current
    color_mode ranges
  • lerp_color, which interpolates in the current color mode space like Processing does
  • cursor(kind) / no_cursor() with ARROW, CROSS, HAND, MOVE, TEXT, WAIT
  • frame_rate() returns the measured fps (smoothed the same way Processing does it), frame_rate(fps) caps how
    fast run() draws
  • millis()
  • exit_sketch(), which is Processing's exit() but renamed so we don't shadow the Python builtin

Also fixes delta time to span the whole Processing frame, before it only covered the last app.update() of the
frame.

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Visual regression: 1 changed of 43 cases

case status detail
py_flocking_gpu ❌ changed 8.09% of pixels differ

If these changes are intentional, add the deliberate-rendering-change label.

baseline 4d846e6c2b · adapter llvmpipe (LLVM 20.1.2, 256 bits) (Vulkan, Mesa 25.2.8-0ubuntu0.24.04.5 (LLVM 20.1.2))

Open the visual report · workflow run

@tychedelia
tychedelia requested a review from catilac November 17, 2026 21:54
@tychedelia
tychedelia marked this pull request as ready for review November 17, 2026 21:54
Base automatically changed from py-input to main November 23, 2026 17:07
@tychedelia
tychedelia merged commit 9a9fb9c into main Nov 23, 2026
4 of 5 checks passed
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