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

HemisphereLightHelper.dispose()

HemisphereLightHelper.dispose()方法用于释放HemisphereLightHelper对象及其所使用的内存。

语法

helper.dispose();

参数

该方法没有参数。

返回值

该方法没有返回值。

示例代码

const hemisphereLightHelper = new THREE.HemisphereLightHelper(hemisphereLight, 1);
scene.add(hemisphereLightHelper);

// dispose the helper
hemisphereLightHelper.dispose();

以上示例代码创建了一个HemisphereLightHelper对象,然后将其添加到场景中。最后,使用dispose()方法释放该对象及其所占用的内存。

需要注意的是,该方法只会释放由HemisphereLightHelper对象所占用的内存,而不会影响被其所关联的光源对象及其它对象。如果要删除光源对象,需要使用THREE.Object3D.remove()方法将其从场景中移除。