Procházet zdrojové kódy

Some light helpers had default type of "Object3D" | this PR gives them their own types (#24159)

* added types for helpers that were missing them

* added types for helpers that were missing them

* typo fix for spotlight helper type
Heaust Azure před 2 roky
rodič
revize
348e624ff5

+ 2 - 0
src/helpers/DirectionalLightHelper.js

@@ -23,6 +23,8 @@ class DirectionalLightHelper extends Object3D {
 
 
 		this.color = color;
 		this.color = color;
 
 
+		this.type = 'DirectionalLightHelper';
+
 		if ( size === undefined ) size = 1;
 		if ( size === undefined ) size = 1;
 
 
 		let geometry = new BufferGeometry();
 		let geometry = new BufferGeometry();

+ 2 - 0
src/helpers/HemisphereLightHelper.js

@@ -24,6 +24,8 @@ class HemisphereLightHelper extends Object3D {
 
 
 		this.color = color;
 		this.color = color;
 
 
+		this.type = 'HemisphereLightHelper';
+
 		const geometry = new OctahedronGeometry( size );
 		const geometry = new OctahedronGeometry( size );
 		geometry.rotateY( Math.PI * 0.5 );
 		geometry.rotateY( Math.PI * 0.5 );
 
 

+ 2 - 0
src/helpers/SpotLightHelper.js

@@ -21,6 +21,8 @@ class SpotLightHelper extends Object3D {
 
 
 		this.color = color;
 		this.color = color;
 
 
+		this.type = 'SpotLightHelper';
+
 		const geometry = new BufferGeometry();
 		const geometry = new BufferGeometry();
 
 
 		const positions = [
 		const positions = [