Last active
March 2, 2018 10:37
-
-
Save Surgeon/ec1915e3e310f54fa647d1f083ed04d0 to your computer and use it in GitHub Desktop.
THREE.TextureLoader
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 characters
| // instantiate a loader | |
| var loader = new THREE.TextureLoader(); | |
| //allow cross origin loading | |
| loader.crossOrigin = ''; | |
| // load a resource | |
| loader.load('textures/land_ocean_ice_cloud_2048.jpg', | |
| // Function when resource is loaded | |
| function ( texture ) {}, | |
| // Function called when download progresses | |
| function ( xhr ) {}, | |
| // Function called when download errors | |
| function ( xhr ) {} | |
| ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment