CreatePlane.bb 633 B

1234567891011121314151617181920212223242526272829303132333435
  1. ; CreatePlane Example
  2. ; -------------------
  3. Graphics3D 640,480
  4. SetBuffer BackBuffer()
  5. camera=CreateCamera()
  6. PositionEntity camera,0,1,0
  7. light=CreateLight()
  8. RotateEntity light,90,0,0
  9. ; Create plane
  10. plane=CreatePlane()
  11. grass_tex=LoadTexture( "media/mossyground.bmp" )
  12. EntityTexture plane,grass_tex
  13. While Not KeyDown( 1 )
  14. If KeyDown( 205 )=True Then TurnEntity camera,0,-1,0
  15. If KeyDown( 203 )=True Then TurnEntity camera,0,1,0
  16. If KeyDown( 208 )=True Then MoveEntity camera,0,0,-0.05
  17. If KeyDown( 200 )=True Then MoveEntity camera,0,0,0.05
  18. RenderWorld
  19. Text 0,0,"Use cursor keys to move about the infinite plane"
  20. Flip
  21. Wend
  22. End