Преглед на файлове

fix(src/materials): use super methods.

linbingquan преди 4 години
родител
ревизия
433d706c9a

+ 1 - 1
src/materials/LineBasicMaterial.js

@@ -37,7 +37,7 @@ class LineBasicMaterial extends Material {
 
 	copy( source ) {
 
-		Material.prototype.copy.call( this, source );
+		super.copy( source );
 
 		this.color.copy( source.color );
 

+ 1 - 1
src/materials/MeshDepthMaterial.js

@@ -53,7 +53,7 @@ class MeshDepthMaterial extends Material {
 
 	copy( source ) {
 
-		Material.prototype.copy.call( this, source );
+		super.copy( source );
 
 		this.depthPacking = source.depthPacking;
 

+ 1 - 1
src/materials/MeshLambertMaterial.js

@@ -85,7 +85,7 @@ class MeshLambertMaterial extends Material {
 
 	copy( source ) {
 
-		Material.prototype.copy.call( this, source );
+		super.copy( source );
 
 		this.color.copy( source.color );
 

+ 1 - 1
src/materials/MeshPhongMaterial.js

@@ -116,7 +116,7 @@ class MeshPhongMaterial extends Material {
 
 	copy( source ) {
 
-		Material.prototype.copy.call( this, source );
+		super.copy( source );
 
 		this.color.copy( source.color );
 		this.specular.copy( source.specular );

+ 1 - 1
src/materials/MeshPhysicalMaterial.js

@@ -73,7 +73,7 @@ class MeshPhysicalMaterial extends MeshStandardMaterial {
 
 	copy( source ) {
 
-		MeshStandardMaterial.prototype.copy.call( this, source );
+		super.copy( source );
 
 		this.defines = {
 

+ 1 - 1
src/materials/MeshStandardMaterial.js

@@ -124,7 +124,7 @@ class MeshStandardMaterial extends Material {
 
 	copy( source ) {
 
-		Material.prototype.copy.call( this, source );
+		super.copy( source );
 
 		this.defines = { 'STANDARD': '' };
 

+ 1 - 1
src/materials/ShaderMaterial.js

@@ -92,7 +92,7 @@ class ShaderMaterial extends Material {
 
 	copy( source ) {
 
-		Material.prototype.copy.call( this, source );
+		super.copy( source );
 
 		this.fragmentShader = source.fragmentShader;
 		this.vertexShader = source.vertexShader;

+ 1 - 1
src/materials/SpriteMaterial.js

@@ -39,7 +39,7 @@ class SpriteMaterial extends Material {
 
 	copy( source ) {
 
-		Material.prototype.copy.call( this, source );
+		super.copy( source );
 
 		this.color.copy( source.color );