home *** CD-ROM | disk | FTP | other *** search
/ 3D Game Programming for Teens (2nd Edition) / 3DGPFT2E.iso / Source / Chapter07 / demo07-08.bb < prev    next >
Text File  |  2009-01-20  |  514b  |  28 lines

  1. ;demo07-08.bb - Lights and Cameras
  2. ; ------------------
  3. Graphics3D 640,480 
  4. SetBuffer BackBuffer()
  5.  
  6. Const ESC_KEY = 1
  7.  
  8. ; Create camera
  9. camera=CreateCamera()
  10.  
  11. ; Create a light
  12. light=CreateLight(3)
  13. LightRange light, 50
  14.  
  15.  
  16. ; This is the code for creating the sphere
  17. sphere=CreateSphere()
  18. PositionEntity sphere,0,0,9
  19. ScaleEntity sphere, .5, .5, .5
  20. EntityColor sphere, 0, 26, 125
  21.  
  22. ; This following code deals with cameras and cylinders 
  23. While Not KeyDown(ESC_KEY)
  24.  
  25.     RenderWorld 
  26.     Flip
  27. Wend
  28. End