Skip to content

Commit

Permalink
2.20.0
Browse files Browse the repository at this point in the history
  • Loading branch information
quinton-ashley committed Feb 5, 2025
1 parent f4fbdcd commit 8038b5f
Show file tree
Hide file tree
Showing 13 changed files with 400 additions and 114 deletions.
2 changes: 1 addition & 1 deletion deno.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@q5/q5",
"version": "2.19.2",
"version": "2.20.0",
"license": "LGPL-3.0",
"description": "A sequel to p5.js that's optimized for interactive art",
"author": "quinton-ashley",
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "q5",
"version": "2.19.4",
"version": "2.20.0",
"description": "A sequel to p5.js that's optimized for interactive art",
"author": "quinton-ashley",
"contributors": [
Expand Down
30 changes: 30 additions & 0 deletions q5.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1383,6 +1383,36 @@ createCanvas(200, 100);
*/
function createVideo(src: string): HTMLVideoElement;

/** 📑
* Creates a capture from a connected camera, such as a webcam.
*
* The capture can be displayed using the `image` function.
*
* Preload to ensure the capture is ready to use when your
* sketch starts.
*
* Requests the highest resolution available by default. The
* first parameter to this function can be used to specify
* the constraints for the capture. See [`getUserMedia`](https://developer.mozilla.org/docs/Web/API/MediaDevices/getUserMedia) for more info.
* @param {string} [type] type of capture, can be only `VIDEO` or only `AUDIO`, the default is to use both video and audio
* @param {boolean} [flipped] whether to mirror the video horizontally, true by default
* @param {(vid: HTMLVideoElement) => void} [cb] callback function after the capture is created
* @example
createCanvas(200, 0);
let cap = createCapture(VIDEO);
cap.size(200, 150);
* @example
createCanvas(200);
let cap = createCapture(VIDEO);
cap.hide();
function draw() {
image(cap, 0, 0, 200, 200);
filter(INVERT);
}
*/
function createCapture(type?: string, flipped?: boolean, cb?: (vid: HTMLVideoElement) => void): HTMLVideoElement;

/** 📑
* Finds the first element in the DOM that matches the given [CSS selector](https://developer.mozilla.org/docs/Learn_web_development/Core/Styling_basics/Basic_selectors).
* @param {string} selector
Expand Down
Loading

0 comments on commit 8038b5f

Please sign in to comment.