Try my new website:
www.urcho.com
- the new SIMPLE social network
Sign up
|
287
members |
114
snippets
Search for:
ALL
POPULAR
File Controls
Multiplayer Code
2D Effects
3D Effects
Oldskool demos
Basic Functions
Maths/Physics
Sound
Tutorials
Misc
Username:
Password:
Sign up
fade inout by Ben(t)
[
back
]
Author:
Archive
| Viewed:
486
times | Language:
BlitzBasic 3D
| Category:
3D Effects
Graphics3D 640,480,32,2 pivot=CreatePivot() cam=CreateCamera(pivot) PositionEntity cam,0,5,-10,1 fade=CreateSprite(cam) ScaleSprite fade,2,2 PositionEntity fade,0,0,1.1 EntityColor fade,0,0,0 cube=CreateCube() ScaleEntity cube,5,.1,5 EntityColor cube,255,0,0 ball=CreateSphere(32) MoveEntity ball,1,0,1 EntityColor ball,0,0,255 light=CreateLight() MoveEntity light,5,8,5 While Not KeyHit(1) PointEntity cam,cube TurnEntity pivot,0,1,0 EntityAlpha fade,alpha# If KeyDown(13) Then alpha#=alpha#+.01 If KeyDown(12) Then alpha#=alpha#-.01 If alpha#<0 Then alpha#=0 If alpha#>1 Then alpha#=1 RenderWorld Text 0,0,alpha# Text 0,10,"+ to increase dark and - to decrease" Flip Wend End
Author Comments:
a simple sprite that can be used to fade in and out
Login or
create an account
to comment on this snippet