A rendering Library made in python
Project description
PyRender
This is a Rendering engine made in Python by Arnav
Installing
You Can Install it either by running the command
git clone https://github.com/HotShot0901/PyRender
If you have git installed
OR
You can Download the latest ZIP or any release.
Run python test.py (in CMD) to check your Installation.
OR
You can use pip.
pip install hs-pyrender
If downloaded from GIT
You could paste the pyrender sub-folder in Python_Dir/Lib/site-packages to use it in your project.
Or, you could also make a sub-project in the main PyRender and use from pyrender import *.
Usage
To import: from pyrender import *
Making a Renderer: renderer=PyRender(dimension) dimension could be (640, 360)
Vector2's: They are very essencial to rendering. They tell the position and dimension of the shape.
Drawing: renderer.drawRect(posX, posY, dimX, dimY, Color(r, g, b), DrawMode.Top)
Frame loop:
for _ in range(180):
renderer.rotate(math.randins(_))
renderer.drawRect(posX, posY, dimX, dimY, Color(r, g, b), DrawMode.Top)
renderer.nextFrame(delCurr=True)
Rendering: renderer.render(renderPath, videoTitle)
You will get your video in renderPath/frames/videoTitle.mp4
Finally:
from pyrender import *
renderer=PyRender((640, 360))
for _ in range(180):
renderer.rotate(math.randins(_))
renderer.drawRect(posX, posY, dimX, dimY, Color(r, g, b), DrawMode.Top)
renderer.nextFrame(delCurr=True)
renderer.render("E:", "video")
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hs-pyrender-0.2.0.dev1.tar.gz.
File metadata
- Download URL: hs-pyrender-0.2.0.dev1.tar.gz
- Upload date:
- Size: 42.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.0 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
58b46d12c97bf626b7c49cf3c70551314697bf947cc31dd7a7cfa158dab5a81b
|
|
| MD5 |
9d45b2bd7caf1eb08e204d523bab5da9
|
|
| BLAKE2b-256 |
e225b0514ca41afe3373431c05f94099699f74053983722080979d2742a1c61c
|
File details
Details for the file hs_pyrender-0.2.0.dev1-py3-none-win32.whl.
File metadata
- Download URL: hs_pyrender-0.2.0.dev1-py3-none-win32.whl
- Upload date:
- Size: 44.3 kB
- Tags: Python 3, Windows x86
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/51.1.0 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.8.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a77e4dca9ca36468e65dd314dd3079004c3dd786cde8dc0b18f8dfe4c6e9bd71
|
|
| MD5 |
4d170aec6460af968f89b89ab8e59979
|
|
| BLAKE2b-256 |
fe5ad44285695c30b4125fd863246eb4007f6aa5e791536c54514df7b132ac44
|