This code example shows how to create a sky plane. All the code and assets are in the projects Scripts directory. You can download the project using the link above.
// Turn on debug so that Chat.printDebug() and Chat.dump() work Chat.debugOutput = true; // Display the stats panel in the bottom left corner of screen Application.statsVisible = true; // Turn on collisions, but allow the user to turn it off Actor.setCollisionSetting( true, false ); // Turn on gravity, but allow the user to turn it off Actor.setGravitySetting( true, false ); // Hide the chat panel Application.chatPaneVisible = false; // Set ambient light for the scene Scene.ambientLightColor = Color(0.5, 0.5, 0.5, 0); // Create the floor var oGround = Scene.createGround( "MainFloor", "RustySteel", 3000.0, 3000.0, true ); // Create the SkyPlane oSkyPlane = Scene.createSkyPlane(); oSkyPlane.materialName = "SpaceSkyPlane"; oSkyPlane.scale = 10000; oSkyPlane.tiling = 3; oSkyPlane.drawFirst = true; oSkyPlane.distance = 5000; oSkyPlane.normal = Vector( 0, -1, 0 ); oSkyPlane.enable = true;