Skip to content

Commit 554fa7a

Browse files
committed
Clean up example structure
1 parent a0f0869 commit 554fa7a

20 files changed

+57
-18
lines changed

README.md

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -147,13 +147,10 @@ pywavefront.configure_logging(
147147
)
148148
```
149149

150-
### Example Scripts
150+
### Examples
151151

152-
The `example` directory contains some basic examples using the `visualization` module
153-
154-
* `pyglet_demo.py` : Simple textured globe
155-
* `pyglet_demo2.py` : Higher resolution textured globe
156-
* `pyglet_demo_boxes.py` : Boxes demonstrating supported vertex formats of the visualization module
152+
The [examples](https://github.com/pywavefront/PyWavefront/tree/master/example)
153+
directory contains some basic examples using the `visualization` module and further instructions on how to run them.
157154

158155
### Generating a Wavefront file with Blender
159156

@@ -183,7 +180,7 @@ pytest tests/test_parser.py
183180

184181
## Community
185182

186-
PyWavefront Discord server: https://discord.gg/nMNjbn
183+
PyWavefront Discord server : https://discord.gg/nMNjbn
187184

188185
## Owners & Maintainers
189186

@@ -195,9 +192,7 @@ PyWavefront Discord server: https://discord.gg/nMNjbn
195192
* ComFreek
196193
* Daniel Coelho
197194
* dav92lee
198-
* Einar Forselv
199195
* Jerek Shoemaker
200-
* Kurt Yoder
201196
* Marxlp
202197
* Mathieu Lamarre
203198
* Oliv4945
@@ -215,4 +210,4 @@ the PyWavefront Maintainers organization was created adding @einarf
215210
License
216211
-------
217212

218-
PyWavefront is BSD-licensed; see file `LICENSE`.
213+
PyWavefront is [BSD-licensed](https://github.com/pywavefront/PyWavefront/blob/master/LICENSE)

example/README.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
# Examples
2+
3+
## Requirements
4+
5+
```bash
6+
cd examples
7+
pip install -r requirements.txt
8+
9+
# Run an example
10+
python.exe pyglet_demo_boxes.py
11+
```
12+
13+
## Boxes
14+
15+
Loads and displays 6 different cubes of the folloing vertex formats:
16+
17+
* Only positions
18+
* With normals
19+
* With vertex color
20+
* With texture coordinates
21+
* With texture cooddinates and vertex color
22+
* With texture coordinates and normals
23+
24+
```
25+
python boxes.py
26+
```
27+
28+
## Globe Simple
29+
30+
Renders a simple low poly globe with texture coordinates and basic lighting.
31+
32+
```
33+
python globe_simple.py
34+
```
35+
36+
## Globe Complex
37+
38+
Renders a simple globe (higher resolution) with texture coordinates and basic lighting.
39+
40+
41+
```
42+
python globe_complex.py
43+
```
Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,12 @@
2424

2525
window = pyglet.window.Window(width=1280, height=720)
2626

27-
box1 = Wavefront('box/box-V3F.obj')
28-
box2 = Wavefront('box/box-C3F_V3F.obj')
29-
box3 = Wavefront('box/box-N3F_V3F.obj')
30-
box4 = Wavefront('box/box-T2F_V3F.obj')
31-
box5 = Wavefront('box/box-T2F_C3F_V3F.obj')
32-
box6 = Wavefront('box/box-T2F_N3F_V3F.obj')
27+
box1 = Wavefront('data/box/box-V3F.obj')
28+
box2 = Wavefront('data/box/box-C3F_V3F.obj')
29+
box3 = Wavefront('data/box/box-N3F_V3F.obj')
30+
box4 = Wavefront('data/box/box-T2F_V3F.obj')
31+
box5 = Wavefront('data/box/box-T2F_C3F_V3F.obj')
32+
box6 = Wavefront('data/box/box-T2F_N3F_V3F.obj')
3333

3434
rotation = 0.0
3535
lightfv = ctypes.c_float * 4

0 commit comments

Comments
 (0)