File: texturecubes.py

package info (click to toggle)
vedo 2025.5.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 10,404 kB
  • sloc: python: 64,792; javascript: 1,932; xml: 437; sh: 139; makefile: 6
file content (18 lines) | stat: -rw-r--r-- 504 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
"""
Show a cube for each available texture name.
Any jpg file can be used as texture.
"""
from vedo import dataurl, show, Cube

textures_path = dataurl+'textures/'

print(__doc__)
print('example textures:', textures_path)

cubes = []
cubes.append(Cube().texture(textures_path+'leather.jpg'))
cubes.append(Cube().texture(textures_path+'paper2.jpg'))
cubes.append(Cube().texture(textures_path+'wood1.jpg'))
cubes.append(Cube().texture(textures_path+'wood2.jpg'))

show(cubes, N=4, bg2='lightblue').close()