|
@@ -361,7 +361,9 @@ THREE.SceneLoader.prototype = {
|
|
|
|
|
|
// lights
|
|
|
|
|
|
- } else if (objJSON.type === "PointLight" || objJSON.type === "AmbientLight" || objJSON.type === "SpotLight" || objJSON.type === "HemisphereLight" || objJSON.type === "AreaLight") {
|
|
|
+ } else if ( objJSON.type === "AmbientLight" || objJSON.type === "PointLight" ||
|
|
|
+ objJSON.type === "DirectionalLight" || objJSON.type === "SpotLight" ||
|
|
|
+ objJSON.type === "HemisphereLight" || objJSON.type === "AreaLight" ) {
|
|
|
|
|
|
var color = objJSON.color;
|
|
|
var intensity = objJSON.intensity;
|
|
@@ -380,6 +382,11 @@ THREE.SceneLoader.prototype = {
|
|
|
light.position.fromArray( position );
|
|
|
break;
|
|
|
|
|
|
+ case 'DirectionalLight':
|
|
|
+ light = new THREE.DirectionalLight( color, intensity );
|
|
|
+ light.position.fromArray( objJSON.direction );
|
|
|
+ break;
|
|
|
+
|
|
|
case 'SpotLight':
|
|
|
light = new THREE.SpotLight( color, intensity, distance, 1 );
|
|
|
light.angle = objJSON.angle;
|