2
0

multicam.bb 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. Graphics3D 640,480
  2. tex=CreateTexture( 64,64 )
  3. SetBuffer TextureBuffer( tex )
  4. Color 255,0,0:Rect 0,0,32,32:Rect 32,32,32,32
  5. Color 255,128,0:Rect 32,0,32,32:Rect 0,32,32,32
  6. SetBuffer BackBuffer()
  7. Color 255,255,255
  8. cone=CreateCone(20)
  9. EntityTexture cone,tex
  10. sphere=CreateSphere(10)
  11. PositionEntity sphere,2,0,0
  12. EntityTexture sphere,tex
  13. cylinder=CreateCylinder(20)
  14. PositionEntity cylinder,-2,0,0
  15. EntityTexture cylinder,tex
  16. light=CreateLight()
  17. TurnEntity light,45,45,0
  18. pivot=CreatePivot()
  19. z_cam=CreateCamera( pivot )
  20. CameraViewport z_cam,0,0,320,240
  21. PositionEntity z_cam,0,0,-5
  22. y_cam=CreateCamera( pivot )
  23. CameraViewport y_cam,320,0,320,240
  24. PositionEntity y_cam,0,5,0
  25. TurnEntity y_cam,90,0,0
  26. x_cam=CreateCamera( pivot )
  27. CameraViewport x_cam,0,240,320,240
  28. TurnEntity x_cam,0,-90,0
  29. PositionEntity x_cam,-5,0,0
  30. While Not KeyHit(1)
  31. If KeyDown(203) MoveEntity pivot,-.1,0,0
  32. If KeyDown(205) MoveEntity pivot,.1,0,0
  33. If KeyDown(200) MoveEntity pivot,0,.1,0
  34. If KeyDown(208) MoveEntity pivot,0,-.1,0
  35. If KeyDown(30) MoveEntity pivot,0,0,.1
  36. If KeyDown(44) MoveEntity pivot,0,0,-.1
  37. UpdateWorld
  38. RenderWorld
  39. Text 0,0,"Front"
  40. Text 320,0,"Top"
  41. Text 0,240,"Left"
  42. Flip
  43. Wend
  44. End