Insert the following code inside "AB.world.newRun". (Remember the program structure.)
const texturefile = '/uploads/starter/earth.1.jpg'; var loader = new THREE.TextureLoader(); loader.load ( texturefile, function ( thetexture ) // this defines a function to be called whenever the file is loaded { thetexture.minFilter = THREE.LinearFilter; theobject.material = new THREE.MeshBasicMaterial ( { map: thetexture } ); });
You will now get something like the following: