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

LightShadow.copy()

LightShadow.copy(source : LightShadow) : LightShadow

该方法用于将一个 LightShadow 的属性值 copy 给当前实例。

参数

  • source:一个 LightShadow 类型的实例,包含需要 Copy 的属性。

返回值

  • 返回更新后的当前 LightShadow 实例。

示例

const lightShadow1 = new THREE.LightShadow(new THREE.PerspectiveCamera());
const lightShadow2 = new THREE.LightShadow(new THREE.PerspectiveCamera());

lightShadow1.mapSize.width = 1024;
lightShadow1.mapSize.height = 1024;
lightShadow1.bias = -0.0001;

lightShadow2.copy(lightShadow1);

console.log(lightShadow2.mapSize.width); // 1024
console.log(lightShadow2.mapSize.height); // 1024
console.log(lightShadow2.bias); // -0.0001

注意事项

  • 这个方法仅 copy LightShadow 自身属性,不会影响 Light 的其他属性。
  • lightShadow1lightShadow2 实例间的属性共享,并不是独立的。如果更改其中一个的属性,另一个也将受到影响。