q5 4.4.1 → 4.4.3
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/deno.json +1 -1
- package/package.json +1 -1
- package/q5.d.ts +13 -19
- package/q5.js +216 -412
- package/q5.min.js +1 -1
package/deno.json
CHANGED
package/package.json
CHANGED
package/q5.d.ts
CHANGED
|
@@ -25,7 +25,6 @@ declare global {
|
|
|
25
25
|
* @param {object} [opt] [options](https://developer.mozilla.org/en-US/docs/Web/API/CanvasRenderingContext2D/getContextAttributes)
|
|
26
26
|
* @returns {Promise<HTMLCanvasElement>} canvas element
|
|
27
27
|
* @example
|
|
28
|
-
* // WebGPU
|
|
29
28
|
* await Canvas(200, 100);
|
|
30
29
|
* background('silver');
|
|
31
30
|
* circle(0, 0, 80);
|
|
@@ -1876,10 +1875,20 @@ declare global {
|
|
|
1876
1875
|
function strokeCap(val: CanvasLineCap): void;
|
|
1877
1876
|
|
|
1878
1877
|
/** 💅
|
|
1879
|
-
* Set the line join style to `ROUND
|
|
1878
|
+
* Set the line join style to `ROUND` or `MITER`.
|
|
1880
1879
|
*
|
|
1881
|
-
*
|
|
1880
|
+
* The default is `MITER`.
|
|
1882
1881
|
* @param {CanvasLineJoin} val line join style
|
|
1882
|
+
* @example
|
|
1883
|
+
* await Canvas(200);
|
|
1884
|
+
* background(0.8);
|
|
1885
|
+
* strokeWeight(10);
|
|
1886
|
+
*
|
|
1887
|
+
* strokeJoin(ROUND);
|
|
1888
|
+
* triangle(-50, -30, 50, -30, -50, 20);
|
|
1889
|
+
*
|
|
1890
|
+
* strokeJoin(MITER);
|
|
1891
|
+
* triangle(50, 0, -50, 50, 50, 50);
|
|
1883
1892
|
*/
|
|
1884
1893
|
function strokeJoin(val: CanvasLineJoin): void;
|
|
1885
1894
|
|
|
@@ -3836,26 +3845,11 @@ declare global {
|
|
|
3836
3845
|
* Specifies a vertex in a shape.
|
|
3837
3846
|
*
|
|
3838
3847
|
* Each vertex can have its own fill color. Useful for creating gradients.
|
|
3839
|
-
*
|
|
3840
|
-
* Note that shapes without a stroke will be drawn using the shapes shader. Stroked shapes will be drawn using the more complex stroked shapes shader.
|
|
3841
3848
|
* @param {number} x x-coordinate
|
|
3842
3849
|
* @param {number} y y-coordinate
|
|
3843
3850
|
* @example
|
|
3844
3851
|
* await Canvas(200);
|
|
3845
3852
|
*
|
|
3846
|
-
* noStroke();
|
|
3847
|
-
*
|
|
3848
|
-
* beginShape();
|
|
3849
|
-
* fill(1, 0, 0);
|
|
3850
|
-
* vertex(-80, -80);
|
|
3851
|
-
* vertex(40, -60);
|
|
3852
|
-
* fill(0, 0, 1);
|
|
3853
|
-
* vertex(80, 60);
|
|
3854
|
-
* vertex(-60, 80);
|
|
3855
|
-
* endShape(true);
|
|
3856
|
-
* @example
|
|
3857
|
-
* await Canvas(200);
|
|
3858
|
-
*
|
|
3859
3853
|
* stroke(1, 0.5);
|
|
3860
3854
|
* strokeWeight(20);
|
|
3861
3855
|
*
|
|
@@ -3951,7 +3945,7 @@ declare global {
|
|
|
3951
3945
|
/** ⚡
|
|
3952
3946
|
* Creates a shader that q5's WebGPU renderer can use.
|
|
3953
3947
|
*
|
|
3954
|
-
* If `type` is not specified, this function customizes a copy of the [default shapes shader](https://github.com/q5js/q5.js/blob/main/src/shaders/shapes.wgsl), which affects these functions: `plane`, `line`, and `endShape
|
|
3948
|
+
* If `type` is not specified, this function customizes a copy of the [default shapes shader](https://github.com/q5js/q5.js/blob/main/src/shaders/shapes.wgsl), which affects these functions: `plane`, `line`, and `endShape`.
|
|
3955
3949
|
*
|
|
3956
3950
|
* For more information on the vertex and fragment function
|
|
3957
3951
|
* input parameters, data, and helper functions made available for use
|