Canonical source:
plugins_default/classicskybox/README.md- edit that file, not this page (this page is built live from it, nothing here is a tracked copy).
Classic Skybox
Readds the skyboxes from Shell Shockers' earliest versions, built in code from the original game's own source: classic (0.1.0 - sky, clouds, dark ocean and hazy mountains) and classic-alpha (0.0.4 - the same sky without the mountains, over a bright blue ocean that fades pale toward the horizon). Client-only in practice; the server side just merges its two models.
Using it
A map picks one by setting its skybox to classic or classic-alpha (see Maps) - both names are added to the map editor's skybox dropdown. TimeMachine's "Map Skybox" setting can also put either one on every map for that player, by setting ClassicSkyboxPlugin.override.
What it actually does
- Ships
sky.babylonandmountains.babylon(models/), merged into the build like any content pack (prepareBabylonBefore/prepareBabylon- see Content Packs), and adds both to the game scene's model list ongame:afterBullshit. - Splices Babylon's old
SkyMaterial,WaterMaterialandCloudProceduralTexture(src/babylonExtensions.js, from the 2017babylon.custom.js- seesrc/references.txt) into the browser bundle atafter, since the bundled Babylon doesn't have them. - On
game:onMapComplete, if the map's skybox (or the override) is one of its variants, it hides the map's cubemap skybox, raises the camera's far plane to 2000 and builds the scene: aSkyMaterialbox, a procedural cloud dome on theskymesh, the ocean plane and, forclassic, three rings ofmountainsdrawn with the map shader so the map's fog hazes them the way it did when they were part of the map. Everything it made is disposed on the next map load. - On
client:doReplacements, adds every variant name to the editor'sLEGACYSHELLSKYBOXESlist.
test.js is the original 0.1.0 code this was rebuilt from, kept for reference - it isn't loaded.
Adding a variant
Add a function to ClassicSkyboxPlugin.variants in shared.js, keyed by the skybox name. It gets (gameScene, centreX, centreZ), should pass every mesh it makes through this.add(mesh) so it's cleaned up on the next map, and the name shows up in the editor automatically.
