Skip to content

Commit c109a73

Browse files
committed
fix problem with PShader.set signature
1 parent 70b6cdc commit c109a73

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

generator/reference.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
PY5_SKIP_RETURN_TYPES = set()
2727

2828
PARAM_TYPE_OVERRIDES = {
29+
"boolean[]": "Iterator[bool]",
2930
"char[]": "list[chr]",
3031
"java.lang.String[]": "list[str]",
3132
"float[]": "Iterator[float]",

py5_docs/Reference/api_en/Py5Shader_set.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ pclass = PShader
77
processing_name = set
88

99
@@ signatures
10-
set(name: str, boolvec: JArray(JBoolean), ncoords: int, /) -> None
10+
set(name: str, boolvec: Iterator[bool], ncoords: int, /) -> None
1111
set(name: str, mat: npt.NDArray[np.floating], /) -> None
1212
set(name: str, mat: npt.NDArray[np.floating], use3x3: bool, /) -> None
1313
set(name: str, tex: Py5Image, /) -> None
14+
set(name: str, vec: Iterator[bool], /) -> None
1415
set(name: str, vec: Iterator[float], /) -> None
1516
set(name: str, vec: Iterator[float], ncoords: int, /) -> None
1617
set(name: str, vec: Iterator[int], /) -> None
1718
set(name: str, vec: Iterator[int], ncoords: int, /) -> None
18-
set(name: str, vec: JArray(JBoolean), /) -> None
1919
set(name: str, vec: Py5Vector, /) -> None
2020
set(name: str, x: bool, /) -> None
2121
set(name: str, x: bool, y: bool, /) -> None
@@ -31,15 +31,15 @@ set(name: str, x: int, y: int, z: int, /) -> None
3131
set(name: str, x: int, y: int, z: int, w: int, /) -> None
3232

3333
@@ variables
34-
boolvec: JArray(JBoolean) - modifies all the components of an array/vector uniform variable
34+
boolvec: Iterator[bool] - modifies all the components of an array/vector uniform variable
3535
mat: npt.NDArray[np.floating] - 2D numpy array of values with shape 2x3 for 2D matrices or 4x4 for 3D matrices
3636
name: str - the name of the uniform variable to modify
3737
ncoords: int - number of coordinates per element, max 4
3838
tex: Py5Image - sets the sampler uniform variable to read from this image texture
3939
use3x3: bool - enforces the numpy array is 3 x 3
40+
vec: Iterator[bool] - modifies all the components of an array/vector uniform variable
4041
vec: Iterator[float] - 1D numpy array of values to modify all the components of an array/vector uniform variable
4142
vec: Iterator[int] - 1D numpy array of values to modify all the components of an array/vector uniform variable
42-
vec: JArray(JBoolean) - modifies all the components of an array/vector uniform variable
4343
vec: Py5Vector - vector of values to modify all the components of an array/vector uniform variable
4444
w: bool - fourth component of the variable to modify. The variable has to be declared with an array/vector type in the shader (i.e.: int[4], vec4)
4545
w: float - fourth component of the variable to modify. The variable has to be declared with an array/vector type in the shader (i.e.: int[4], vec4)

0 commit comments

Comments
 (0)