浏览代码

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 = [