← Back to Documentation Index

🌌 Skybox API

Beautiful space backgrounds with stars, nebulae, and procedural effects

📋 Overview

The Skybox API creates stunning space backgrounds with procedural star fields, colorful nebulae, galaxy spirals, and atmospheric fog perfect for space games.

💡 Key Features
  • Procedural Stars - Thousands of stars with depth and twinkling
  • Nebula Effects - Colorful cloud gradients
  • Galaxy Spirals - Rotating galaxy arms
  • Fog System - Distance-based atmospheric effects
  • Performance - Optimized rendering for smooth 60 FPS

🌟 Skybox Functions

createSpaceSkybox(options)

Creates a complete space environment.

options.starCount number - Number of stars (default: 5000)
options.nebulaColor hex - Nebula color tint
options.galaxySpiral boolean - Include galaxy spiral (default: false)
Returns: object - Skybox object
Example:
createSpaceSkybox({ starCount: 10000, nebulaColor: 0x8800ff });
setSkyboxRotation(x, y, z)

Rotates the skybox (animated background).

x, y, z number - Rotation in radians
Returns: void - No return value
Example:
setSkyboxRotation(0, time * 0.001, 0);