lightvolume
This package provides the module lightvolume, which offers a CFFI binding to trylock/visibility. This, in turn, is a C++ implementation of the visibility algorithm documented in detail (with awesome interactive demos) on the Red Blob Games website.
API
First, import lightvolume:
import lightvolume
Then, we can create a number of shadow-casting bodies:
objects = [
lightvolume.rect(0, 0, 500, 500), # outer bounds - this is needed
lightvolume.rect(20, 30, 10, 20),
lightvolume.rect(290, 300, 100, 300),
]
Finally, we can render the lit area cast by a light in this scene (an OpenGL context must already have been created and appropriate GL state set):
light = 90, 200 lightvolume.draw_light(light, objects)
This module is intended to be used with appropriate shaders to provide attenuation, surface interactions such as bump mapping, and so on.
Metadata
Release files for lightvolume 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| lightvolume-0.1.3.tar.gz | 166.9 kB | Without provenance | Details |
Release files / lightvolume-0.1.3.tar.gz
| Download URL | lightvolume-0.1.3.tar.gz |
|---|---|
| Size | 166.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f334172839d8218bb44ee74b4a924c7990074d13381a48a97da1635aa455c65b
|
|
BLAKE2b-256 checksum How to use checksums |
c7677e0a2f92ce5bc2294dc4fcb5bad9ff359114be080e5b0b148864e368ef27
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for lightvolume 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.