Three.js API手册

动画
AnimationAction AnimationClip AnimationMixer AnimationObjectGroup AnimationUtils KeyframeTrack PropertyBinding PropertyMixer
动画 / 轨道
BooleanKeyframeTrack ColorKeyframeTrack NumberKeyframeTrack QuaternionKeyframeTrack StringKeyframeTrack VectorKeyframeTrack
音频
Audio AudioAnalyser AudioContext AudioListener PositionalAudio
摄像机
ArrayCamera Camera CubeCamera OrthographicCamera PerspectiveCamera StereoCamera
常量
Animation Core CustomBlendingEquation DrawModes Materials Renderer Textures
核心
BufferAttribute BufferGeometry Clock DirectGeometry EventDispatcher Face3 Geometry InstancedBufferAttribute InstancedBufferGeometry InstancedInterleavedBuffer InterleavedBuffer InterleavedBufferAttribute Layers Object3D Raycaster Uniform
核心 / BufferAttributes
BufferAttribute_Types
弃用列表
DeprecatedList
附件
Earcut ShapeUtils
附件 / 核心
Curve CurvePath Font Interpolations Path Shape ShapePath
附件 / 曲线
ArcCurve CatmullRomCurve3 CubicBezierCurve CubicBezierCurve3 EllipseCurve LineCurve LineCurve3 QuadraticBezierCurve QuadraticBezierCurve3 SplineCurve
附件 / 物体
ImmediateRenderObject
几何体
BoxBufferGeometry BoxGeometry CircleBufferGeometry CircleGeometry ConeBufferGeometry ConeGeometry CylinderBufferGeometry CylinderGeometry DodecahedronBufferGeometry DodecahedronGeometry EdgesGeometry ExtrudeBufferGeometry ExtrudeGeometry IcosahedronBufferGeometry IcosahedronGeometry LatheBufferGeometry LatheGeometry OctahedronBufferGeometry OctahedronGeometry ParametricBufferGeometry ParametricGeometry PlaneBufferGeometry PlaneGeometry PolyhedronBufferGeometry PolyhedronGeometry RingBufferGeometry RingGeometry ShapeBufferGeometry ShapeGeometry SphereBufferGeometry SphereGeometry TetrahedronBufferGeometry TetrahedronGeometry TextBufferGeometry TextGeometry TorusBufferGeometry TorusGeometry TorusKnotBufferGeometry TorusKnotGeometry TubeBufferGeometry TubeGeometry WireframeGeometry
辅助对象
ArrowHelper AxesHelper BoxHelper Box3Helper CameraHelper DirectionalLightHelper FaceNormalsHelper GridHelper PolarGridHelper PositionalAudioHelper HemisphereLightHelper PlaneHelper PointLightHelper RectAreaLightHelper SkeletonHelper SpotLightHelper VertexNormalsHelper
灯光
AmbientLight DirectionalLight HemisphereLight Light PointLight RectAreaLight SpotLight
灯光 / 阴影
DirectionalLightShadow LightShadow SpotLightShadow
加载器
AnimationLoader AudioLoader BufferGeometryLoader Cache CompressedTextureLoader CubeTextureLoader DataTextureLoader FileLoader FontLoader ImageBitmapLoader ImageLoader Loader LoaderUtils MaterialLoader ObjectLoader TextureLoader
加载器 / 管理器
DefaultLoadingManager LoadingManager
材质
LineBasicMaterial LineDashedMaterial Material MeshBasicMaterial MeshDepthMaterial MeshDistanceMaterial MeshLambertMaterial MeshMatcapMaterial MeshNormalMaterial MeshPhongMaterial MeshPhysicalMaterial MeshStandardMaterial MeshToonMaterial PointsMaterial RawShaderMaterial ShaderMaterial ShadowMaterial SpriteMaterial
数学库
Box2 Box3 Color Cylindrical Euler Frustum Interpolant Line3 Math Matrix3 Matrix4 Plane Quaternion Ray Sphere Spherical Triangle Vector2 Vector3 Vector4
数学库 / 插值
CubicInterpolant DiscreteInterpolant LinearInterpolant QuaternionLinearInterpolant
物体
Bone Group Line LineLoop LineSegments LOD Mesh Points Skeleton SkinnedMesh Sprite
渲染器
WebGLMultisampleRenderTarget WebGLRenderer WebGLRenderTarget WebGLRenderTargetCube
渲染器 / 着色器
ShaderChunk ShaderLib UniformsLib UniformsUtils
场景
Fog FogExp2 Scene
纹理贴图
CanvasTexture CompressedTexture CubeTexture DataTexture DataTexture3D DepthTexture Texture VideoTexture

椭圆曲线(EllipseCurve)

创建一个形状为椭圆的曲线。 将xRadius与yRadius设为相等的值它将会成为一个圆。

示例

var curve = new THREE.EllipseCurve( 0, 0, // ax, aY 10, 10, // xRadius, yRadius 0, 2 * Math.PI, // aStartAngle, aEndAngle false, // aClockwise 0 // aRotation ); 
var points = curve.getPoints( 50 ); 
var geometry = new THREE.BufferGeometry().setFromPoints( points ); 
var material = new THREE.LineBasicMaterial( { color : 0xff0000 } ); 
// Create the final object to add to the scene 
var ellipse = new THREE.Line( geometry, material );

构造函数

EllipseCurve( aX : Float, aY : Float, xRadius : Float, yRadius : Float, aStartAngle : Radians, aEndAngle : Radians, aClockwise : Boolean, aRotation : Radians )

aX – 椭圆的中心的X坐标,默认值为0
aY – 椭圆的中心的Y坐标,默认值为0
xRadius – X轴向上椭圆的半径,默认值为1
yRadius – Y轴向上椭圆的半径,默认值为1
aStartAngle – 以弧度来表示,从正右侧算起曲线开始的角度,默认值为0
aEndAngle – 以弧度来表示,从正右侧算起曲线终止的角度,默认值为2 x Math.PI
aClockwise – 椭圆是否按照顺时针方向来绘制,默认值为false
aRotation – 以弧度表示,椭圆从X轴正方向逆时针的旋转角度(可选),默认值为0

请注意: 当使用顺时针的时候,最好将起始角度角度设为(Math.PI * 2),并向着更小的数字运行。

属性

请参阅其基类Curve来了解共有属性。

# .isEllipseCurve : Boolean

用于检查该类或者其派生类是否为EllipseCurves。默认值为true

你不应当更改这个属性,它在内部使用,以用于优化。

# .aX : Float

椭圆的中心的X坐标。

# .aY : Float

椭圆的中心的Y坐标。

# .xRadius : Radians

X轴向上椭圆的半径。

# .yRadius : Radians

Y轴向上椭圆的半径。

# .aStartAngle : Float

以弧度来表示,从正右侧算起曲线开始的角度。

# .aEndAngle : Float

以弧度来表示,从正右侧算起曲线终止的角度。

# .aClockwise : Boolean

椭圆是否按照顺时针方向来绘制。

# .aRotation : Float

以弧度表示,椭圆在X轴正方向逆时针的旋转角度(可选),默认值为0

方法

请参阅其基类Curve来了解共有方法。

源代码

src/extras/curves/EllipseCurve.js