q5 4.4.0 → 4.4.2
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 -22
- package/q5.js +206 -386
- package/q5.min.js +1 -1
package/deno.json
CHANGED
package/package.json
CHANGED
package/q5.d.ts
CHANGED
|
@@ -1876,10 +1876,20 @@ declare global {
|
|
|
1876
1876
|
function strokeCap(val: CanvasLineCap): void;
|
|
1877
1877
|
|
|
1878
1878
|
/** 💅
|
|
1879
|
-
* Set the line join style to `ROUND
|
|
1879
|
+
* Set the line join style to `ROUND` or `MITER`.
|
|
1880
1880
|
*
|
|
1881
|
-
*
|
|
1881
|
+
* The default is `MITER`.
|
|
1882
1882
|
* @param {CanvasLineJoin} val line join style
|
|
1883
|
+
* @example
|
|
1884
|
+
* await Canvas(200);
|
|
1885
|
+
* background(0.8);
|
|
1886
|
+
* strokeWeight(10);
|
|
1887
|
+
*
|
|
1888
|
+
* strokeJoin(ROUND);
|
|
1889
|
+
* triangle(-50, -30, 50, -30, -50, 20);
|
|
1890
|
+
*
|
|
1891
|
+
* strokeJoin(MITER);
|
|
1892
|
+
* triangle(50, 0, -50, 50, 50, 50);
|
|
1883
1893
|
*/
|
|
1884
1894
|
function strokeJoin(val: CanvasLineJoin): void;
|
|
1885
1895
|
|
|
@@ -3836,26 +3846,11 @@ declare global {
|
|
|
3836
3846
|
* Specifies a vertex in a shape.
|
|
3837
3847
|
*
|
|
3838
3848
|
* 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
3849
|
* @param {number} x x-coordinate
|
|
3842
3850
|
* @param {number} y y-coordinate
|
|
3843
3851
|
* @example
|
|
3844
3852
|
* await Canvas(200);
|
|
3845
3853
|
*
|
|
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
3854
|
* stroke(1, 0.5);
|
|
3860
3855
|
* strokeWeight(20);
|
|
3861
3856
|
*
|
|
@@ -3951,11 +3946,7 @@ declare global {
|
|
|
3951
3946
|
/** ⚡
|
|
3952
3947
|
* Creates a shader that q5's WebGPU renderer can use.
|
|
3953
3948
|
*
|
|
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
|
|
3955
|
-
*
|
|
3956
|
-
* `triangle`, `quad`, `plane`,
|
|
3957
|
-
* `curve`, `bezier`, `beginShape`/`endShape`,
|
|
3958
|
-
* and `background` (unless an image is used).
|
|
3949
|
+
* 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` (only for shapes drawn without a stroke).
|
|
3959
3950
|
*
|
|
3960
3951
|
* For more information on the vertex and fragment function
|
|
3961
3952
|
* input parameters, data, and helper functions made available for use
|