Skip to content

Release 1.2.0 - #2

Merged
shakeelmohamed merged 33 commits into
mainfrom
next
Apr 16, 2026
Merged

Release 1.2.0#2
shakeelmohamed merged 33 commits into
mainfrom
next

Conversation

@shakeelmohamed

Copy link
Copy Markdown
Member

[1.2.0]

Breaking Changes

  • stop() now pauses the sketch (noLoop()); call run() to resume
  • remove() / clear() fully tears down the p5 instance and frees resources

New Features

  • loadImage() — local files and HTTP URLs, works in preload with image() in draw
  • loadJSON() — local and remote JSON files
  • loadStrings() — local text files as array of lines
  • loadTable() — CSV/TSV/SSV files as p5.Table with optional header parsing
  • drawingContext — direct Canvas 2D API access after createCanvas()
  • Math constants and functions (PI, TWO_PI, abs, sin, cos, etc.) explicitly bound
  • p5.js constants (CORNER, CENTER, RGB, HSB, blend modes, key codes, etc.) explicitly bound
  • Accessibility, save, audio, and input event functions stubbed to prevent crashes

Performance

  • ~2× faster frame reads when sketch canvas dimensions match p5b output dimensions
  • Fixed memory leak in stop()/run() cycles by reusing the sketch canvas

Bug Fixes

  • Fixed p5.js initialization crashes (parentNode, mediaDevices, navigator)
  • loadFont() now throws a descriptive error on missing files
  • WEBGL mode now throws a clear unsupported error instead of crashing

@shakeelmohamed
shakeelmohamed merged commit fc6146a into main Apr 16, 2026
1 check 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.

1 participant