SkyDome()
Syntax
Result = SkyDome(TextureID, SkyColor, RiseColor [, NbCloudLayers, Height.f, SpeedX.f, SpeedZ.f])Description
Creates a new SkyDome which is a curved moving sky displayed using the specified cloud texture.
Parameters
TextureID The cloud texture id to use. TextureID() can be used to get a valid value. SkyColor The sky color as RGBA(). RiseColor The sun rising color as RGBA(). NbCloudLayers (optional) The number of clouds layer, starting from 1. Height (optional) The clouds height in world unit. SpeedX, SpeedZ (optional) The clouds moving speed
Return value
Returns non-zero if the SkyDome has been successfully created.
Example
#EndDistance = 1024*4 InitEngine3D() : InitSprite() : InitKeyboard() ExamineDesktops() : dx = DesktopWidth(0)*0.9 : dy = DesktopHeight(0)*0.9 OpenWindow(0, 0, 0, DesktopUnscaledX(dx), DesktopUnscaledY(dy), "SkyDome - Press ESC to quit", #PB_Window_ScreenCentered) OpenWindowedScreen(WindowID(0), 0, 0, dx, dy, 0, 0, 0) Add3DArchive(#PB_Compiler_Home + "examples/3d/Data/Textures", #PB_3DArchive_FileSystem) Parse3DScripts() ; Camera CreateCamera(0, 0, 0, 100, 100) MoveCamera(0,0,5,0) CameraLookAt(0,2,5,10) ; Sky TextureSky = LoadTexture(#PB_Any,"sky.png") SkyDome(TextureID(TextureSky), $cc6600, $0088ff, 3, 400, -0.5, 0) ; Sun CreateLight(0, $ff88ff, 20000, 40000, 20000) AmbientColor($010101) Fog($554488,1, 0, #EndDistance) Repeat While WindowEvent() : Wend ExamineKeyboard() RenderWorld() FlipBuffers() Until KeyboardReleased(#PB_Key_Escape)
See Also
SkyBox()
Supported OS
All