OSDN Git Service

three.jsをThirdPartyに追加
[webglgame/webgl_framework.git] / webglFramework / Thirdparty / three.js-master / src / lights / HemisphereLight.js
diff --git a/webglFramework/Thirdparty/three.js-master/src/lights/HemisphereLight.js b/webglFramework/Thirdparty/three.js-master/src/lights/HemisphereLight.js
new file mode 100644 (file)
index 0000000..fdd5f19
--- /dev/null
@@ -0,0 +1,43 @@
+import { Light } from './Light';
+import { Color } from '../math/Color';
+import { Object3D } from '../core/Object3D';
+
+/**
+ * @author alteredq / http://alteredqualia.com/
+ */
+
+function HemisphereLight( skyColor, groundColor, intensity ) {
+
+       Light.call( this, skyColor, intensity );
+
+       this.type = 'HemisphereLight';
+
+       this.castShadow = undefined;
+
+       this.position.copy( Object3D.DefaultUp );
+       this.updateMatrix();
+
+       this.groundColor = new Color( groundColor );
+
+}
+
+HemisphereLight.prototype = Object.assign( Object.create( Light.prototype ), {
+
+       constructor: HemisphereLight,
+
+       isHemisphereLight: true,
+
+       copy: function ( source ) {
+
+               Light.prototype.copy.call( this, source );
+
+               this.groundColor.copy( source.groundColor );
+
+               return this;
+
+       }
+
+} );
+
+
+export { HemisphereLight };