CreateMirror.bb 856 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. ; CreateMirror Example
  2. ; --------------------
  3. Graphics3D 640,480
  4. SetBuffer BackBuffer()
  5. camera=CreateCamera()
  6. PositionEntity camera,0,1,-5
  7. light=CreateLight()
  8. RotateEntity light,90,0,0
  9. ; Create cone
  10. cone=CreateCone(32)
  11. PositionEntity cone,0,2,0
  12. ; Create plane
  13. plane=CreatePlane()
  14. grass_tex=LoadTexture( "media/chorme-2.bmp" )
  15. EntityTexture plane,grass_tex
  16. EntityAlpha plane,0.5
  17. ; Create mirror
  18. mirror=CreateMirror()
  19. While Not KeyDown( 1 )
  20. If KeyDown( 203 )=True Then MoveEntity cone,-0.1,0,0
  21. If KeyDown( 205 )=True Then MoveEntity cone,0.1,0,0
  22. If KeyDown( 208 )=True Then MoveEntity cone,0,-0.1,0
  23. If KeyDown( 200 )=True Then MoveEntity cone,0,0.1,0
  24. If KeyDown( 44 )=True Then MoveEntity cone,0,0,-0.1
  25. If KeyDown( 30 )=True Then MoveEntity cone,0,0,0.1
  26. RenderWorld
  27. Text 0,0,"Use cursor/A/Z keys to move cone above infinite mirror"
  28. Flip
  29. Wend
  30. End