LightConeAngles.htm 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <html>
  2. <head>
  3. <title>Blitz3D Docs</title>
  4. <link rel=stylesheet href=../css/commands.css type=text/css>
  5. </head>
  6. <body>
  7. <h1>LightConeAngles light,inner_angle#,outer_angle#</h1>
  8. <h1>Parameters</h1>
  9. <table>
  10. <tr>
  11. <td>
  12. light - light handle <br />
  13. inner_angle# - inner angle of cone <br />
  14. outer_angle# - outer angle of cone
  15. </td>
  16. </tr>
  17. </table>
  18. <h1>Description</h1>
  19. <table>
  20. <tr>
  21. <td>
  22. Sets the 'cone' angle for a 'spot' light. <br />
  23. <br />
  24. The default light cone angles setting is 0,90.
  25. <br>
  26. <br>
  27. See also: <a class=small href=CreateLight.htm>CreateLight</a>, <a class=small href=LightRange.htm>LightRange</a>, <a class=small href=LightColor.htm>LightColor</a>.
  28. </td>
  29. </tr>
  30. </table>
  31. <h1><a href=../3d_examples/LightConeAngles.bb>Example</a></h1>
  32. <table>
  33. <tr>
  34. <td>
  35. Graphics3D 640,480 <br />
  36. <br />
  37. camera = CreateCamera() <br />
  38. MoveEntity camera,0,0,-40 <br />
  39. <br />
  40. flat = CreatePlane(10) <br />
  41. TurnEntity flat,-90,0,0 <br />
  42. <br />
  43. lite = CreateLight(3) ; try different lights 1 to 3 <br />
  44. MoveEntity lite,0,0,-15 <br />
  45. <br />
  46. While Not KeyDown(1) <br />
  47. RenderWorld:Flip <br />
  48. If KeyHit(57) Then ; press SPACEBAR to randomly change the 'cone' of light <br />
  49. LightConeAngles lite, Rand(120),Rand(120) <br />
  50. EndIf <br />
  51. Wend <br />
  52. End
  53. </td>
  54. </tr>
  55. </table>
  56. <br>
  57. <a target=_top href=../index.htm>Index</a><br>
  58. <br>
  59. Click <a href=http://www.blitzbasic.co.nz/b3ddocs/command.php?name=LightConeAngles&ref=comments target=_blank>here</a> to view the latest version of this page online</body>
  60. </html>