Last active
November 6, 2016 21:27
-
-
Save evejweinberg/19bb53872d274f9eaa146c4659beb415 to your computer and use it in GitHub Desktop.
3js texture loader
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
var loader2 = new THREE.TextureLoader(loadingManager); | |
loader2.load('img/Floor.jpg', onTextureLoaded2); | |
function onTextureLoaded2(texture) { | |
var geometry = new THREE.PlaneGeometry(512, 512); | |
var material = new THREE.MeshPhongMaterial({ | |
roughness: .64, | |
metalness: .81, | |
transparent: false, | |
opacity: 1, | |
color: pink, | |
map: texture, | |
// emissive: pink, | |
// bumpMap: loader2, | |
bumpScale: 12, | |
side: THREE.DoubleSide | |
}); | |
plane = new THREE.Mesh(geometry, material); | |
scene.add(plane); | |
plane.receiveShadow = true; | |
plane.castShadow = true; | |
// plane.position.y = 1.57; | |
plane.rotation.x = 1.57; | |
} //////////DONE LOADING FLOOR ////////// | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment