Procházet zdrojové kódy

Added light objects

Nicolas Garcia Belmonte před 15 roky
rodič
revize
d342239c4a

+ 8 - 0
src/lights/AmbientLight.js

@@ -0,0 +1,8 @@
+THREE.AmbientLight = function(color) {
+  
+  THREE.Light.call(this, color);
+
+};
+
+THREE.AmbientLight.prototype = new THREE.Light();
+THREE.AmbientLight.prototype.constructor = THREE.AmbientLight; 

+ 10 - 0
src/lights/DirectionalLight.js

@@ -0,0 +1,10 @@
+THREE.DirectionalLight = function(color, direction) {
+  
+  THREE.Light.call(this, color);
+  
+  this.direction = direction || new Vector3(1, 1, 1);
+
+};
+
+THREE.DirectionalLight.prototype = new THREE.Light();
+THREE.DirectionalLight.prototype.constructor = THREE.DirectionalLight; 

+ 5 - 0
src/lights/Light.js

@@ -0,0 +1,5 @@
+THREE.Light = function(color) {
+
+  this.color = color;
+
+};