Code viewer for World: One Cube World (Three.js) ...
// Cloned by Joseph Adedayo on 29 Nov 2022 from World "One Cube World (Three.js)" by Starter user 
// Please leave this clone trail here.
 

const bg         = 'Black';           
const startRadius   = 1000;                 // distance cam
const maxRadius     = startRadius * 10;     // maximum distance from camera we render 

AB.world.newRun = function() 
{
    // start a 3D scene: 
    ABWorld.init3d ( startRadius, maxRadius, bg ); 
   	const scene = new THREE.Scene();
			const camera = new THREE.PerspectiveCamera( 75, window.innerWidth / window.innerHeight, 0.1, 1000 );

			const renderer = new THREE.WebGLRenderer();
			renderer.setSize( window.innerWidth, window.innerHeight );
			document.body.appendChild( renderer.domElement );

			const geometry = new THREE.SphereGeometry();
			const material = new THREE.MeshBasicMaterial( { color: "white" } );
			const cube = new THREE.Mesh( geometry, material );
			scene.add( cube );

			camera.position.z = 20;

			function animate() {
				requestAnimationFrame( animate );

				cube.rotation.x += 0.01;
				cube.rotation.y += 0.01;

				renderer.render( scene, camera );
			};

			animate();

};