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

Plane.normalize()

The Plane.normalize() method is a function that normalizes the values of this Plane object. Normalization here means scaling the vector of this Plane object to a length of 1.

Syntax

plane.normalize();

Parameters

This function doesn’t take any parameters.

Return Value

This function doesn’t return any value.

Description

The Plane.normalize() function is used to normalize the vector of the Plane object. The normalization process scales the vector of this Plane object to a length of 1. This is useful when we want to ensure that a particular vector has the same direction as before but is only scaled in length to 1.

The length of the vector of the Plane object can be calculated using the Plane.distanceToPoint() or Plane.distanceToSphere() method.

Examples

Let's consider a plane defined by a normal vector (1, 1, 1) and a distance value of 2. We create an instance of the Plane object as follows:

const normal = new THREE.Vector3( 1, 1, 1 ).normalize();
const plane = new THREE.Plane( normal, 2 );

The normalize() method can then be used to normalize the vector of the Plane object:

plane.normalize();

After normalizing the vector of the plane object, the resulting vector has a length of 1.

References