import { TextureLoader , SphereGeometry , MeshLambertMaterial , Mesh , } from "three" ; import earthTexture from "../img/earth.png" ; export const createEarthImageMesh = ( radius ) => { var textureLoader = new TextureLoader ( ) ; var texture = textureLoader . load ( earthTexture ) ; var geometry = new SphereGeometry ( radius , 96 , 96 ) ; var material = new MeshLambertMaterial ( { map : texture , } ) ; var mesh = new Mesh ( geometry , material ) ; return mesh ; } ;