2 |
PEG gfxdemos_framework--tjl: |
PEG gfxdemos_framework--tjl: |
3 |
============================================================= |
============================================================= |
4 |
|
|
5 |
:Author: Tuomas J. Lukka |
:Author: Tuomas J. Lukka, Janne V. Kujala |
6 |
:Last-Modified: $Date$ |
:Last-Modified: $Date$ |
7 |
:Revision: $Revision$ |
:Revision: $Revision$ |
8 |
:Status: Incomplete |
:Status: Incomplete |
55 |
Change the file/directory structure of the demos so that |
Change the file/directory structure of the demos so that |
56 |
one file shall contain at most **one** scene object, |
one file shall contain at most **one** scene object, |
57 |
and the name of that object will be ``Scene``. |
and the name of that object will be ``Scene``. |
58 |
|
The scene files should be importable as modules, |
59 |
|
independent of the ``gldemo.py`` wrapper. |
60 |
If several scenes move around a common theme, |
If several scenes move around a common theme, |
61 |
they should be placed in their own directory (python |
they should be placed in their own directory (python |
62 |
module). |
module). |
67 |
|
|
68 |
The ``gldemo.py`` wrapper should then be changed to |
The ``gldemo.py`` wrapper should then be changed to |
69 |
accept one or more file or directory names. |
accept one or more file or directory names. |
70 |
|
The global window variable ``w`` should be moved |
71 |
|
to its own module. |
72 |
|
|
73 |
Scene objects |
Scene objects |
74 |
------------- |
------------- |
87 |
misses the point entirely. The reader, unfamiliar with |
misses the point entirely. The reader, unfamiliar with |
88 |
the idea, does **not** understand why this is something |
the idea, does **not** understand why this is something |
89 |
she'd like to see. Demos not fulfilling this requirement |
she'd like to see. Demos not fulfilling this requirement |
90 |
shall be relegated to the directory ``gfx/demo/pointless''. |
shall be relegated to the directory ``gfx/demo/pointless``. |
91 |
|
|
92 |
Instead of the current ``key(self, k)'' mechanism where |
Instead of the current ``key(self, k)`` mechanism where |
93 |
key presses are decoded in a sequence of if statements, |
key presses are decoded in a sequence of if statements, |
94 |
each Scene class shall contain a table ``keys'':: |
each Scene class shall contain a table ``keys``:: |
95 |
|
|
96 |
keys = [ |
keys = [ |
97 |
Toggle("fillets", 0, "Filleting", "f"), |
Toggle("fillets", 0, "Filleting", "f"), |
100 |
... |
... |
101 |
] |
] |
102 |
|
|
103 |
where the ``Toggle'' and others come from XXX. |
where the ``Toggle`` and others come from XXX. |
104 |
|
|
105 |
The scene mechanism :: |
The scene mechanism :: |
106 |
|
|