mrdoob/three.js — Issue #1290: SceneLoader does not work with renderer.shadowMapEnabled 
Author: powerslave
Created: 2012-02-09 19:43:58+00:00
State: open

There is an issue when trying to use the SceneLoader on a renderer that has shadowMapEnabled.

An error in THREE.WebGLRenderer.initMaterial() stops the SceneLoader from loading the scene.
the error is:
```Uncaught TypeError: Cannot read property 'receiveShadow' of undefined```

apparently an undefined object is passed into ```initMaterial = function ( material, lights, fog, object )``` which bails at

```
parameters = {
...
shadowMapEnabled: this.shadowMapEnabled && object.receiveShadow
...
}
```

I tested this with identical results on
* examples/webgl_loader_scene_blender.html
* examples/webgl_loader_scene_blender.html
* and the scene I am currently working on

### Reproduce
* in example scenes webgl_loader_scene_blender.html or webgl_loader_scene_blender.html
* add ```renderer.shadowMapEnabled = true;``` after renderer is created
* run example
* => stalls at loading bar, throws error as noted above