const startRadius = 150; // distance from centre we start the camera at
const maxRadius = startRadius * 20; // maximum distance from camera we render things
// can load skybox of other user:
const SKYBOX_ARRAY = [
"/uploads/dg/1663672411.png",
"/uploads/dg/1663672411.png",
"/uploads/dg/1663672411.png",
"/uploads/dg/1663672411.png",
"/uploads/dg/1663672411.png"
];
const mixers = [];
const clock = new THREE.Clock();
// AB customisations
// Select text and "Code Help" to see what these mean:
ABHandler.MAXCAMERAPOS = maxRadius;
ABWorld.drawCameraControls = false;
AB.drawRunControls = false;
AB.world.newRun = function()
{
// ABWorld.renderer = new THREE.WebGLRenderer ( { antialias: true } );
// custom renderer args - uncomment if need this - otherwise init3d makes the renderer
var color = new THREE.Color (); // renderer color is not used - there is a skybox
ABWorld.init3d ( startRadius, maxRadius, color );
initLights();
loadModels();
// skybox:
ABWorld.scene.background = new THREE.CubeTextureLoader().load ( SKYBOX_ARRAY );
};
AB.world.nextStep = function()
{
const delta = clock.getDelta();
mixers.forEach( ( mixer ) => { mixer.update( delta ); } );
};