Why is my three.js object not working??

Hey guys. 

Im fairly new to three.js and html in general, but i think i get how it works. Well… apparently i dont… 

here’s my code: 

<!doctype html>
<html lang=“en”>
<head>
<title>yesyesyash</title>
<meta charset=“utf-8”>
</head>
<body style=“margin: 0;”>

<script src=“js/three.min.js”></script>
<script src=“js/OrbitControls.js”></script>
<script src=“js/MTLLoader.js”></script>
<script src=“js/OBJLoader.js”></script>

<script>

// Set up the scene, camera, and renderer as global variables.
var scene, camera, renderer;

init();
animate();

// Sets up the scene.
function init() {

// Create the scene and set the scene size.
scene = new THREE.Scene();
var WIDTH = window.innerWidth,
HEIGHT = window.innerHeight;

// Create a renderer and add it to the DOM.
renderer = new THREE.WebGLRenderer({antialias:true});
renderer.setSize(WIDTH, HEIGHT);
document.body.appendChild(renderer.domElement);

// Create a camera, zoom it out from the model a bit, and add it to the scene.
camera = new THREE.PerspectiveCamera(45, WIDTH / HEIGHT, 0.1, 20000);
camera.position.set(0,6,0);
scene.add(camera);

// Create an event listener that resizes the renderer with the browser window.
window.addEventListener(‘resize’, function() {
var WIDTH = window.innerWidth,
HEIGHT = window.innerHeight;
renderer.setSize(WIDTH, HEIGHT);
camera.aspect = WIDTH / HEIGHT;
camera.updateProjectionMatrix();
});

// Set the background color of the scene.
renderer.setClearColorHex(0x333F47, 1);

// Create a light, set its position, and add it to the scene.
var light = new THREE.PointLight(0xffffff);
light.position.set(-100,200,100);
scene.add(light);

// Load in the mesh and add it to the scene.
var mtlLoader = new THREE.MTLLoader();
mtlLoader.setTexturePath(’/Users/student/Downloads/threejs_logo_example/’);
mtlLoader.setPath(’/Users/student/Downloads/threejs_logo_example/’);
mtlLoader.load(‘Yash.mtl’, function (materials) {

materials.preload();

var objLoader = new THREE.OBJLoader();
objLoader.setMaterials(materials);
objLoader.setPath(’/Users/student/Downloads/threejs_logo_example/’);
objLoader.load(‘Yash.obj’, function (object) {

scene.add(object);
object.position.y -= 60;

});

});

// Add OrbitControls so that we can pan around with the mouse.
controls = new THREE.OrbitControls(camera, renderer.domElement);

}

// Renders the scene and updates the render as needed.
function animate() {

// Read more about requestAnimationFrame at http://www.paulirish.com/2011/requestanimationframe-for-smart-animating/
requestAnimationFrame(animate);

// Render the scene.
renderer.render(scene, camera);
controls.update();

}

</script>

</body>
</html>

I have linked everything correctly and the material and object export is fine aswell… where is my mistake. If you need anything else, let me know, i will be looking here often, since i need to keep my deadline… 

Thanks a lot for your help! I really appreciate any time you put into this!

  1. How does it “fail”?

  2. What error messages do you see from the browser or diagnostic tools?

  3. Which browser?