Skip to content

Commit 0e801f6

Browse files
committed
docs
1 parent f506c4b commit 0e801f6

File tree

2 files changed

+11
-8
lines changed

2 files changed

+11
-8
lines changed

docs/programmers_reference_guide/graphics-3d.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -461,7 +461,8 @@ prepare the required input from the audio system output. For example:
461461
st.set_channel(0, *get_shadertoy_audio())
462462
463463
Finally, you can chain shaders by setting one shader as the input of another
464-
and even create cycles to produce interesting effects. For an example see the
465-
audio visualization shader by Alban Fichet in the
466-
`examples/14-piano.ipynb <https://github.com/nir/jupylet/blob/master/examples/14-piano.ipynb>`_
464+
and even create cycles to produce interesting effects. For a basic example
465+
of displaying a shadertoy see the `examples/16-shadertoy-demo.ipynb <https://github.com/nir/jupylet/blob/master/examples/16-shadertoy-demo.ipynb>`_
466+
notebook. For a more advanced example see the audio visualization shader by
467+
Alban Fichet in the `examples/14-piano.ipynb <https://github.com/nir/jupylet/blob/master/examples/14-piano.ipynb>`_
467468
notebook.

jupylet/shadertoy.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,8 @@ class Shadertoy(Node):
139139
"""A Shadertoy canvas.
140140
141141
Args:
142+
width (float): The width of the shadertoy canvas.
143+
height (float): The height of the shadertoy canvas.
142144
x (float): The x position for the shadertoy canvas.
143145
y (float): The y position for the shadertoy canvas.
144146
angle (float): clockwise rotation of the shadertoy canvas in degrees.
@@ -364,12 +366,12 @@ def angle(self, angle):
364366
self.rotation = aa2q(glm.radians(angle))
365367

366368
def set_anchor(self, ax=None, ay=None):
367-
"""Set the anchor point of the sprite.
369+
"""Set the anchor point of the shadertoy canvas.
368370
369-
The anchor is a point in the sprite that is used for rotation and
370-
positioning. Imagine a pin going through the sprite and that you use
371-
this pin to position the sprite on the canvas and to rotate it. The
372-
point at which the pin goes through the texture is the anchor point.
371+
The anchor is a point in the shadertoy canvas that is used for
372+
rotation and positioning. Imagine a pin going through the canvas and
373+
that you use this pin to position the canvas and to rotate it. The
374+
point at which the pin goes through the canvas is the anchor point.
373375
374376
The anchor point is set separately for the x axis, and for the y axis.
375377

0 commit comments

Comments
 (0)