Created
March 1, 2021 22:33
-
-
Save BABAK0T0/bebfe378476ea19bb4bcceb2a6dbc90c to your computer and use it in GitHub Desktop.
Revisions
-
BABAK0T0 created this gist
Mar 1, 2021 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,22 @@ /** * The environment map is like an image of what's surrounding the scene. * You can use it to add reflection or refraction to your objects. * It can also be used as lighting information. **/ const material = new THREE.MeshStandardMaterial(); material.metalness = 0.7; material.roughness = 0.2; const cubeTextureLoader = new THREE.CubeTextureLoader(); const environmentMapTexture = cubeTextureLoader.load([ '/textures/environmentMaps/0/px.jpg', '/textures/environmentMaps/0/nx.jpg', '/textures/environmentMaps/0/py.jpg', '/textures/environmentMaps/0/ny.jpg', '/textures/environmentMaps/0/pz.jpg', '/textures/environmentMaps/0/nz.jpg' ]); material.envMap = environmentMapTexture;