EntityTexture.bb 633 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. ; EntityTexture Example
  2. ; ---------------------
  3. Graphics3D 640,480
  4. SetBuffer BackBuffer()
  5. camera=CreateCamera()
  6. light=CreateLight()
  7. RotateEntity light,90,0,0
  8. cube=CreateCube()
  9. PositionEntity cube,0,0,5
  10. ; Load texture
  11. tex=LoadTexture( "media/b3dlogo.jpg" )
  12. ; Texture entity
  13. EntityTexture cube,tex
  14. While Not KeyDown( 1 )
  15. pitch#=0
  16. yaw#=0
  17. roll#=0
  18. If KeyDown( 208 )=True Then pitch#=-1
  19. If KeyDown( 200 )=True Then pitch#=1
  20. If KeyDown( 203 )=True Then yaw#=-1
  21. If KeyDown( 205 )=True Then yaw#=1
  22. If KeyDown( 45 )=True Then roll#=-1
  23. If KeyDown( 44 )=True Then roll#=1
  24. TurnEntity cube,pitch#,yaw#,roll#
  25. RenderWorld
  26. Flip
  27. Wend
  28. End