Skip to content

Commit 802e418

Browse files
committed
More project docs + cleanup
1 parent e6878f7 commit 802e418

File tree

8 files changed

+47
-112
lines changed

8 files changed

+47
-112
lines changed

docs/controls.rst

+3-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ Basic Keyboard Controls
88
- ``ESC`` to exit
99
- ``SPACE`` to pause the current time (tells the configured timer to pause)
1010
- ``X`` for taking a screenshot (output path is configurable in :doc:`settings`)
11+
- ``R`` reload shader programs (Needs configuration)
12+
- ``LEFT`` jump 10 seconds back in time
13+
- ``RIGHT`` jump 10 seconds forward in time
1114

1215
Camera Controls
1316
^^^^^^^^^^^^^^^
@@ -23,7 +26,6 @@ Simply apply the ``view_matrix`` of the camera to your transformations.
2326
- ``D`` strafe right
2427
- ``Q`` down the y axis
2528
- ``E`` up the y axis
26-
- ``R`` reload shader programs (Needs configuration)
2729

2830
**Mouse Controls**
2931

docs/settings.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ You can create your own class handling this logic.
167167
More info in the :doc:`/user_guide/timeline` section.
168168

169169
PROGRAM_DIRS/PROGRAM_FINDERS
170-
-------------------
170+
----------------------------
171171

172172
``PROGRAM_DIRS`` contains absolute paths the ``FileSystemFinder`` will
173173
look for shaders programs.
@@ -281,7 +281,7 @@ The default scene loaders are:
281281
)
282282
283283
DATA_DIRS/DATA_FINDERS
284-
------------------------
284+
----------------------
285285

286286
Same principle as ``PROGRAM_DIRS`` and ``PROGRAM_FINDERS``.
287287
This is where the system looks for data files. These are

docs/user_guide/index.rst

-3
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,5 @@ User Guide
88
effects
99
project
1010
geometry
11-
timers
12-
timeline
13-
pyrrmath
1411
performance
1512
audio

docs/user_guide/project.rst

+42
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,48 @@ The created effect instances can then be used by a timeline class deciding what
7474
effects should be rendered at any given point in time.
7575
The default timeline configured just grabs the first runnable effect it finds and render only that one.
7676

77+
Timers
78+
------
79+
80+
Timers are classes responsible for controlling the current time.
81+
It simply reports the number of seconds as a float since effect rendering started.
82+
Timers also need to support pausing and time seeking so we can
83+
freely move around in the timeline.
84+
85+
This time value is passed through the configured timeline class and forwarded
86+
to each active effect through their ```draw()`` method.
87+
We should assume time can move in any direction at any speed and suddenly
88+
jump forward and backwards in time.
89+
90+
The default timer if not specified in settings:
91+
92+
.. code-block:: shell
93+
94+
TIMER = 'demosys.timers.clock.Timer'
95+
96+
Standard Timers
97+
^^^^^^^^^^^^^^^
98+
99+
- :py:class:`demosys.timers.clock.Timer`: Default timer just tracking time in seconds using pythons ``time`` module.
100+
- :py:class:`demosys.timers.music.Timer`: Timer playing music reporting duration in the song
101+
- :py:class:`demosys.timers.rocket.Timer`: Timer using the rocket sync system
102+
- :py:class:`demosys.timers.rocketmusic.Timer`: Timer using the rocket sync system with
103+
music playback
104+
105+
You create a custom timer by extending :py:class:`demosys.timers.base.BaseTimer`.
106+
107+
Timelines
108+
---------
109+
110+
A timeline is a project responsible for knowing exactly when an effect instance
111+
is active based on the reported time from a timer.
112+
113+
The current standard timelines are:
114+
115+
* :py:class:`demosys.timeline.single.Timeline`: Grabs a the single effect instance from your project rendering it
116+
* :py:class:`demosys.timeline.rocket.Timeline`: The active status of each effect is decided by rocket
117+
118+
New timeline classes can be created by extending :py:class:`demosys.timeline.base.BaseTimeline`.
77119

78120
Effects Package Organization
79121
----------------------------

docs/user_guide/pyrrmath.rst

-61
This file was deleted.

docs/user_guide/resources.rst

-6
This file was deleted.

docs/user_guide/timeline.rst

-5
This file was deleted.

docs/user_guide/timers.rst

-34
This file was deleted.

0 commit comments

Comments
 (0)