texturecubes.py 504 B

123456789101112131415161718
  1. """
  2. Show a cube for each available texture name.
  3. Any jpg file can be used as texture.
  4. """
  5. from vedo import dataurl, show, Cube
  6. textures_path = dataurl+'textures/'
  7. print(__doc__)
  8. print('example textures:', textures_path)
  9. cubes = []
  10. cubes.append(Cube().texture(textures_path+'leather.jpg'))
  11. cubes.append(Cube().texture(textures_path+'paper2.jpg'))
  12. cubes.append(Cube().texture(textures_path+'wood1.jpg'))
  13. cubes.append(Cube().texture(textures_path+'wood2.jpg'))
  14. show(cubes, N=4, bg2='lightblue').close()