BufferGeometry
Object3D
Raycaster
Camera
CubeCamera
PerspectiveCamera
OrthographicCamera
StereoCamera
Clock
Curve
CurvePath
Path
Shape
ShapePath
ArrowHelper
AxesHelper
BoxHelper
Box3Helper
CameraHelper
DirectionalLightHelper
GridHelper
PolarGridHelper
HemisphereLightHelper
PlaneHelper
PointLightHelper
SkeletonHelper
SpotLightHelper
Light
PointLight
RectAreaLight
SpotLight
DirectionalLight
HemisphereLight
LightShadow
PointLightShadow
AnimationLoader
AudioLoader
BufferGeometryLoader
CompressedTextureLoader
CubeTextureLoader
DataTextureLoader
FileLoader
ImageBitmapLoader
ImageLoader
Loader
LoaderUtils
MaterialLoader
ObjectLoader
TextureLoader
LoadingManager
Material
Box2
Box3
Color
Cylindrical
Euler
Frustum
Interpolant
Line3
MathUtils
Matrix3
Matrix4
Plane
Quaternion
AnimationAction
AnimationClip
AnimationMixer
AnimationObjectGroup
AnimationUtils
keyframeTrack
PropertyBinding
PropertyMixer
BooleanKeyframeTrack
QuaternionKeyframeTrack
StringKeyframeTrack
Audio
AudioAnalyser
AudioContext
AudioListener
PositionalAudio

SpotLightHelper.dispose()

函数说明:

用于释放SpotLightHelper对象包括其中相关的属性和内存。

语法:

spotLightHelper.dispose();

返回值:

无返回值。

参数:

无参数。

使用示例:

var spotlight = new THREE.SpotLight(0xffffff);
var spotLightHelper = new THREE.SpotLightHelper(spotlight);
scene.add(spotlight);
scene.add(spotLightHelper);

// 释放`SpotLightHelper`对象的内存
spotLightHelper.dispose();

说明:

dispose方法可以用于释放SpotLightHelper对象相关的内存,使其脱离使用状态被浏览器内存回收。同时,该方法会释放SpotLightHelper对象及其相关的属性等资源,以便于及时回收内存,持续提升浏览器的运行性能。在使用完SpotLightHelper对象后,需要及时调用该方法进行清理,避免内存泄漏和资源浪费。