q5 3.7.5 → 3.7.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/defs/q5-c2d-es.d.ts +3223 -52
- package/defs/q5-c2d.d.ts +10 -26
- package/defs/q5-es.d.ts +3472 -59
- package/deno.json +1 -1
- package/package.json +1 -1
- package/q5.d.ts +10 -26
- package/q5.js +286 -7
- package/q5.min.js +1 -1
package/defs/q5-c2d.d.ts
CHANGED
|
@@ -729,9 +729,6 @@ declare global {
|
|
|
729
729
|
*
|
|
730
730
|
* If no fonts are loaded, the default sans-serif font is used.
|
|
731
731
|
*
|
|
732
|
-
* In q5 WebGPU, fonts in [MSDF format](https://github.com/q5js/q5.js/wiki/q5-WebGPU-renderer#text-rendering)
|
|
733
|
-
* with the file ending "-msdf.json" can be used for high performance text rendering. Make your own using the [MSDF font converter](https://msdf-bmfont.donmccurdy.com/).
|
|
734
|
-
*
|
|
735
732
|
* By default, assets are loaded in parallel before q5 runs `draw`. Use `await` to wait for a font to load.
|
|
736
733
|
* @param {string} url URL of the font to load
|
|
737
734
|
* @returns {FontFace & PromiseLike<FontFace>} font
|
|
@@ -1392,14 +1389,14 @@ declare global {
|
|
|
1392
1389
|
* Creates a new `Color` object, which is primarily useful for storing
|
|
1393
1390
|
* a color that your sketch will reuse or modify later.
|
|
1394
1391
|
*
|
|
1395
|
-
* With the default
|
|
1396
|
-
*
|
|
1397
|
-
*
|
|
1398
|
-
* In q5 WebGPU, the default color mode is RGB in float format, so
|
|
1399
|
-
* set color components to values between 0 and 1.
|
|
1392
|
+
* With the default color mode, RGB, colors have `r`/`red`, `g`/`green`,
|
|
1393
|
+
* `b`/`blue`, and `a`/`alpha` components.
|
|
1400
1394
|
*
|
|
1401
|
-
* The [`fill`](https://q5js.org/learn/#fill), [`stroke`](https://q5js.org/learn/#stroke), and [`background`](https://q5js.org/learn/#background)
|
|
1402
|
-
* accept the same wide range of color representations as this function.
|
|
1395
|
+
* The [`fill`](https://q5js.org/learn/#fill), [`stroke`](https://q5js.org/learn/#stroke), and [`background`](https://q5js.org/learn/#background)
|
|
1396
|
+
* functions accept the same wide range of color representations as this function.
|
|
1397
|
+
*
|
|
1398
|
+
* The default color format is "integer",
|
|
1399
|
+
* so set components to values between 0 and 255.
|
|
1403
1400
|
*
|
|
1404
1401
|
* Here are some examples of valid use:
|
|
1405
1402
|
*
|
|
@@ -1452,11 +1449,9 @@ declare global {
|
|
|
1452
1449
|
* Sets the color mode for the sketch, which changes how colors are
|
|
1453
1450
|
* interpreted and displayed.
|
|
1454
1451
|
*
|
|
1455
|
-
* The default color mode is RGB in legacy integer format.
|
|
1456
|
-
*
|
|
1457
|
-
* In WebGPU, the default is RGB in float format (best performance).
|
|
1458
|
-
*
|
|
1459
1452
|
* Color gamut is 'display-p3' by default, if the device supports HDR.
|
|
1453
|
+
*
|
|
1454
|
+
* The default color mode is RGB in legacy integer format.
|
|
1460
1455
|
* @param {'rgb' | 'oklch' | 'hsl' | 'hsb'} mode color mode
|
|
1461
1456
|
* @param {1 | 255} format color format (1 for float, 255 for integer)
|
|
1462
1457
|
* @param {'srgb' | 'display-p3'} [gamut] color gamut
|
|
@@ -1983,13 +1978,6 @@ declare global {
|
|
|
1983
1978
|
*
|
|
1984
1979
|
* #### webgpu
|
|
1985
1980
|
* @example
|
|
1986
|
-
* await createCanvas(200, { alpha: true });
|
|
1987
|
-
*
|
|
1988
|
-
* q5.draw = function () {
|
|
1989
|
-
* clear();
|
|
1990
|
-
* circle((frameCount % 200) - 100, 0, 80);
|
|
1991
|
-
* };
|
|
1992
|
-
* @example
|
|
1993
1981
|
* createCanvas(200, 200, { alpha: true });
|
|
1994
1982
|
*
|
|
1995
1983
|
* function draw() {
|
|
@@ -2099,11 +2087,7 @@ declare global {
|
|
|
2099
2087
|
/** 🦋
|
|
2100
2088
|
* Applies a transformation matrix.
|
|
2101
2089
|
*
|
|
2102
|
-
* Accepts a 3x3
|
|
2103
|
-
*
|
|
2104
|
-
* Note that in q5 WebGPU, the identity matrix (default)
|
|
2105
|
-
* has a negative y scale to flip the y-axis to match
|
|
2106
|
-
* the Canvas2D renderer.
|
|
2090
|
+
* Accepts a 3x3 matrix as either an array or multiple arguments.
|
|
2107
2091
|
* @param {number} a
|
|
2108
2092
|
* @param {number} b
|
|
2109
2093
|
* @param {number} c
|