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

Box3.copy()

该方法用于将一个 Box3 对象的值赋给另一个对象。

语法

box.copy( boxToCopy );

参数

  • boxToCopy (Box3):要复制的 Box3 对象。

使用

var box1 = new THREE.Box3(new THREE.Vector3(0, 0, 0), new THREE.Vector3(1, 1, 1));
var box2 = new THREE.Box3();
box2.copy(box1);

在上述示例中,box2 的值将被复制为 box1

返回值

该方法没有任何返回值。

示例

请参考以下代码示例,该示例使用 Box3.copy() 方法将一个 Box3 对象的值复制到另一个对象中:

var box1 = new THREE.Box3(new THREE.Vector3(0, 0, 0), new THREE.Vector3(1, 1, 1));
var box2 = new THREE.Box3();
box2.copy(box1);

console.log(box2.min); // 输出 Vector3 { x: 0, y: 0, z: 0 }
console.log(box2.max); // 输出 Vector3 { x: 1, y: 1, z: 1 }

参考