3d modelling library
Project description
Pyglet Helper
=============
.. image:: doc/examples/all_objects.gif
.. image:: https://travis-ci.org/CatherineH/pyglet_helper.svg?branch=master
:target: https://travis-ci.org/CatherineH/pyglet_helper
.. image:: https://coveralls.io/repos/github/CatherineH/pyglet_helper/badge.svg?branch=master
:target: https://coveralls.io/github/CatherineH/pyglet_helper?branch=master
The goal of this project is to make pyglet_ usable to people with no OpenGL experience by
reproducing the functionality of VPython_ for drawing geometric primitives.
.. _pyglet: http://www.pyglet.org/
.. _VPython: https://github.com/BruceSherwood/vpython-wx
Installation
------------
To Install this project, either pull it from the PyPI:
::
pip install -i https://testpypi.python.org/pypi PygletHelper
or clone it and build from source:
::
git clone https://github.com/CatherineH/pyglet_helper
cd pyglet_helper
python setup.py install
Usage
-----
The following example will show how to create a window with a sphere:
.. image:: doc/examples/sphere.png
First, create a pyglet window to draw the shapes to:
::
from pyglet.window import Window
window = Window()
Then, create a pyglet_helper view:
::
from pyglet_helper.objects.renderable import View
scene = View()
Create a gl light:
::
_light = Light()
_light.render(scene)
Geometric objects can be added to scene. For example, to define a red sphere in the center of the view:
::
from pyglet_helper.util import color
_ball = Sphere(pos=(1, 1, 0), radius=0.5, color=color.red)
Finally, render the object, and run the pyglet window:
::
_ball.render(scene)
pyglet.app.run()
Documentation
-------------
The documentation is available on my `github page`_.
.. _github page: http://catherineh.github.io/pyglet_helper/
=============
.. image:: doc/examples/all_objects.gif
.. image:: https://travis-ci.org/CatherineH/pyglet_helper.svg?branch=master
:target: https://travis-ci.org/CatherineH/pyglet_helper
.. image:: https://coveralls.io/repos/github/CatherineH/pyglet_helper/badge.svg?branch=master
:target: https://coveralls.io/github/CatherineH/pyglet_helper?branch=master
The goal of this project is to make pyglet_ usable to people with no OpenGL experience by
reproducing the functionality of VPython_ for drawing geometric primitives.
.. _pyglet: http://www.pyglet.org/
.. _VPython: https://github.com/BruceSherwood/vpython-wx
Installation
------------
To Install this project, either pull it from the PyPI:
::
pip install -i https://testpypi.python.org/pypi PygletHelper
or clone it and build from source:
::
git clone https://github.com/CatherineH/pyglet_helper
cd pyglet_helper
python setup.py install
Usage
-----
The following example will show how to create a window with a sphere:
.. image:: doc/examples/sphere.png
First, create a pyglet window to draw the shapes to:
::
from pyglet.window import Window
window = Window()
Then, create a pyglet_helper view:
::
from pyglet_helper.objects.renderable import View
scene = View()
Create a gl light:
::
_light = Light()
_light.render(scene)
Geometric objects can be added to scene. For example, to define a red sphere in the center of the view:
::
from pyglet_helper.util import color
_ball = Sphere(pos=(1, 1, 0), radius=0.5, color=color.red)
Finally, render the object, and run the pyglet window:
::
_ball.render(scene)
pyglet.app.run()
Documentation
-------------
The documentation is available on my `github page`_.
.. _github page: http://catherineh.github.io/pyglet_helper/
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pyglet_helper-0.0.1.tar.gz
(35.3 kB
view details)
File details
Details for the file pyglet_helper-0.0.1.tar.gz
.
File metadata
- Download URL: pyglet_helper-0.0.1.tar.gz
- Upload date:
- Size: 35.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c4d10ef2fee006c29ad85232ba87d07d5bb4e8e1c351fbb3833d409dc64730e5 |
|
MD5 | d21cff55e3787a5d95ba7ef6df5a9ae7 |
|
BLAKE2b-256 | f01c8a7a1279839dd08fd2627a8367e92f9f71576ce54b26078ecec31bfd5e11 |