Quellcode durchsuchen

AmbientLight .clone()

Mr.doob vor 12 Jahren
Ursprung
Commit
374aa57809
1 geänderte Dateien mit 10 neuen und 0 gelöschten Zeilen
  1. 10 0
      src/lights/AmbientLight.js

+ 10 - 0
src/lights/AmbientLight.js

@@ -9,3 +9,13 @@ THREE.AmbientLight = function ( hex ) {
 };
 
 THREE.AmbientLight.prototype = Object.create( THREE.Light.prototype );
+
+THREE.AmbientLight.prototype.clone = function () {
+
+	var light = new THREE.AmbientLight();
+
+	THREE.Light.prototype.clone.call( this, light );
+
+	return light;
+
+};