Skip to content

Lait-au-Cafe/py3dviewer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

py3dviewer - A pretty simple python module to visualize 3D model data.

Installation

$ pip install -e git://github.com/Lait-au-Cafe/py3dviewer.git@master#egg=py3dviewer

How to Use

A minimum code to display a simple square plane is like below.

import py3dviewer


model_vertices = [
	 10,  10, 0., 
	-10,  10, 0., 
	 10, -10, 0., 
	-10, -10, 0.]

model_indices = [
	0, 1, 2, 
	3, 2, 1]

model_uvmap = [
	1.0, 1.0, 
	0.0, 1.0, 
	1.0, 0.0, 
	0.0, 0.0]

viewer = py3dviewer.Viewer(
	"Test Simple", 		# The name of window
	model_vertices, 	# The vertex buffer of model
	model_indices, 		# The index buffer of model
	model_uvmap, 		# The uv map of model
	"img/invader.png")	# The path to the texture file

while True:
	if not viewer.update():
		print("Exit. ")
		break

About

A python module to visualize 3D model data.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published