LoadSprite.htm 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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>LoadSprite ( tex_file$[,tex_flag][,parent] )</h1>
  8. <h1>Parameters</h1>
  9. <table>
  10. <tr>
  11. <td>
  12. text_file$ - filename of image file to be used as sprite <br />
  13. <br />
  14. tex_flag (optional) - texture flag: <br />
  15. 1: Color <br />
  16. 2: Alpha <br />
  17. 4: Masked <br />
  18. 8: Mipmapped <br />
  19. 16: Clamp U <br />
  20. 32: Clamp V <br />
  21. 64: Spherical reflection map <br />
  22. <br />
  23. parent - parent of entity
  24. </td>
  25. </tr>
  26. </table>
  27. <h1>Description</h1>
  28. <table>
  29. <tr>
  30. <td>
  31. Creates a sprite entity, and assigns a texture to it.
  32. <br>
  33. <br>
  34. See also: <a class=small href=LoadSprite.htm>LoadSprite</a>, <a class=small href=RotateSprite.htm>RotateSprite</a>, <a class=small href=ScaleSprite.htm>ScaleSprite</a>, <a class=small href=HandleSprite.htm>HandleSprite</a>, <a class=small href=SpriteViewMode.htm>SpriteViewMode</a>, <a class=small href=PositionEntity.htm>PositionEntity</a>, <a class=small href=MoveEntity.htm>MoveEntity</a>, <a class=small href=TranslateEntity.htm>TranslateEntity</a>, <a class=small href=EntityAlpha.htm>EntityAlpha</a>, <a class=small href=FreeEntity.htm>FreeEntity</a>.
  35. </td>
  36. </tr>
  37. </table>
  38. <h1><a href=../3d_examples/LoadSprite.bb>Example</a></h1>
  39. <table>
  40. <tr>
  41. <td>
  42. Graphics3D 640,480 <br />
  43. <br />
  44. campivot = CreatePivot() <br />
  45. cam = CreateCamera(campivot) <br />
  46. MoveEntity cam,0,0,-5 <br />
  47. <br />
  48. sp = LoadSprite("grass.bmp") <br />
  49. SpriteViewMode sp,4 <br />
  50. <br />
  51. While Not KeyDown(1) <br />
  52. RenderWorld:Flip <br />
  53. TurnEntity campivot,1,1,3 <br />
  54. Wend <br />
  55. End
  56. </td>
  57. </tr>
  58. </table>
  59. <br>
  60. <a target=_top href=../index.htm>Index</a><br>
  61. <br>
  62. Click <a href=http://www.blitzbasic.co.nz/b3ddocs/command.php?name=LoadSprite&ref=comments target=_blank>here</a> to view the latest version of this page online</body>
  63. </html>