NSEV3D
A new, stable and efficient 3D game engine built on vpython.
Installation
pip install NSEV3D
Quick Start
from NSEV3D import create_scene, Sphere, Box, Color, Camera
# Create scene (use fullscreen=True for borderless)
scene = create_scene(width=900, height=600, title="My Game")
scene.set_background(Color.rgb(0.1, 0.1, 0.15))
# Create 3D objects
ground = Box(size=(30, 0.2, 30), pos=(0, -1, 0), color=Color.rgb(0.2, 0.2, 0.2))
player = Sphere(radius=0.5, pos=(0, 0.5, 0), color=Color.red)
# Create camera (parent must be an Object3D)
# mode: "first_person" or "third_person"
# invert_x / invert_y: flip mouse axis
cam = Camera(player, scene.scene, mode="third_person", invert_x=False, invert_y=False)
# Toggle camera mode at runtime: cam.toggle_mode()
def update(dt):
cam.update(dt)
scene.run(60, on_update=update)
Controls
| Action | First-Person | Third-Person |
|---|---|---|
| Move | W A S D | (follows parent) |
| Look | Mouse drag | Mouse drag |
| Toggle mode | cam.toggle_mode() |
cam.toggle_mode() |
API
Scene
create_scene(width, height, title, fullscreen=False)set_background(color)set_title(title)set_size(width, height)run(FPS, on_update=None)
Colors (Color)
- Constants:
red,green,blue,yellow,orange,purple,cyan,magenta,white,black,gray Color.rgb(r, g, b)— values 0.0–1.0Color.rgb255(r, g, b)— values 0–255
3D Objects (all inherit Node)
Sphere(radius, pos, color, opacity)Box(size, pos, color, opacity)Cylinder(radius, length, pos, axis, color, opacity)Cone(radius, length, pos, axis, color, opacity)Arrow(pos, axis, color, opacity)- Methods:
show(),hide(),add_child(),remove_child()
Camera
Camera(parent, scene, mode, invert_x, invert_y, sensitivity, move_speed, third_distance, third_height, crosshair)update(dt)— call every frametoggle_mode()— switch first/third personis_pressed(key)— check if a key is held
Node (scene graph)
Node(parent=None)add_child(child)remove_child(child)update(dt)
Metadata
Release files for NSEV3D 0.4.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| nsev3d-0.4.3.1.tar.gz | 6.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| nsev3d-0.4.3.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.3 kB
Release files / nsev3d-0.4.3.1.tar.gz
| Download URL | nsev3d-0.4.3.1.tar.gz |
|---|---|
| Size | 6.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6dc079aca94c85a4b329677b73c6da65d1c64897d8445b919e08c544add1039a
|
|
BLAKE2b-256 checksum How to use checksums |
6ac70d65aff3a4fc8b9bc5429a1bfb2a2417c9003f3814cefb8e211afba1bfee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.3
|
Release files / nsev3d-0.4.3.1-py3-none-any.whl
| Download URL | nsev3d-0.4.3.1-py3-none-any.whl |
|---|---|
| Size | 8.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6e495be03e3ab7af68202b5be6fe1e4d26cb205eb572db323e8bb0804504c213
|
|
BLAKE2b-256 checksum How to use checksums |
24ae89f7e137e1af91e8ac3df4db711467fc3f5437f909b2ef8166fc7aea3485
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.3
|