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

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 преди 2 години
родител
ревизия
348e624ff5
променени са 3 файла, в които са добавени 6 реда и са изтрити 0 реда
  1. 2 0
      src/helpers/DirectionalLightHelper.js
  2. 2 0
      src/helpers/HemisphereLightHelper.js
  3. 2 0
      src/helpers/SpotLightHelper.js

+ 2 - 0
src/helpers/DirectionalLightHelper.js

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

+ 2 - 0
src/helpers/HemisphereLightHelper.js

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

+ 2 - 0
src/helpers/SpotLightHelper.js

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