| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384 |
- <html>
- <head>
- <title>Blitz3D Docs</title>
- <link rel=stylesheet href=../css/commands.css type=text/css>
- </head>
- <body>
- <h1>RotateTexture texture,angle#</h1>
- <h1>Parameters</h1>
- <table>
- <tr>
- <td>
- texture - texture handle
<br />
- angle# - absolute angle of texture rotation
- </td>
- </tr>
- </table>
- <h1>Description</h1>
- <table>
- <tr>
- <td>
- Rotates a texture.
<br />
-
<br />
- This will have an immediate effect on all instances of the texture being used.
<br />
-
<br />
- Rotating a texture is useful for performing swirling texture effects, such as for smoke etc.
- </td>
- </tr>
- </table>
- <h1><a href=../3d_examples/RotateTexture.bb>Example</a></h1>
- <table>
- <tr>
- <td>
- ; RotateTexture Example
<br />
- ; ---------------------
<br />
-
<br />
- Graphics3D 640,480
<br />
- SetBuffer BackBuffer()
<br />
-
<br />
- camera=CreateCamera()
<br />
-
<br />
- light=CreateLight()
<br />
- RotateEntity light,90,0,0
<br />
-
<br />
- cube=CreateCube()
<br />
- PositionEntity cube,0,0,5
<br />
-
<br />
- ; Load texture
<br />
- tex=LoadTexture( "media/b3dlogo.jpg" )
<br />
-
<br />
- ; Texture cube
<br />
- EntityTexture cube,tex
<br />
-
<br />
- ; Set initial texture angle value
<br />
- angle#=1
<br />
-
<br />
- While Not KeyDown( 1 )
<br />
-
<br />
- ; Change texture angle value depending on key pressed
<br />
- If KeyDown( 205 )=True Then angle#=angle#-1
<br />
- If KeyDown( 203 )=True Then angle#=angle#+1
<br />
-
<br />
- ; Rotate texture
<br />
- RotateTexture tex,angle#
<br />
-
<br />
- TurnEntity cube,0.1,0.1,0.1
<br />
-
<br />
- RenderWorld
<br />
-
<br />
- Text 0,0,"Use left and right cursor keys to change texture angle value"
<br />
- Text 0,20,"angle#="+angle#
<br />
-
<br />
- Flip
<br />
-
<br />
- Wend
<br />
-
<br />
- End
- </td>
- </tr>
- </table>
- <br>
- <a target=_top href=../index.htm>Index</a><br>
- <br>
- Click <a href=http://www.blitzbasic.co.nz/b3ddocs/command.php?name=RotateTexture&ref=comments target=_blank>here</a> to view the latest version of this page online</body>
- </html>
|