123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- <!DOCTYPE html>
- <html lang="zh">
- <head>
- <meta charset="utf-8" />
- <base href="../../../../" />
- <script src="page.js"></script>
- <link type="text/css" rel="stylesheet" href="page.css" />
- </head>
- <body>
- [page:Curve] →
- <h1>椭圆曲线([name])</h1>
- <p class="desc">
- 创建一个形状为椭圆的曲线。
- 将[page:Number xRadius]与[page:Number yRadius]设为相等的值它将会成为一个圆。
- </p>
- <h2>代码示例</h2>
- <code>
- const curve = new THREE.EllipseCurve(
- 0, 0, // ax, aY
- 10, 10, // xRadius, yRadius
- 0, 2 * Math.PI, // aStartAngle, aEndAngle
- false, // aClockwise
- 0 // aRotation
- );
- const points = curve.getPoints( 50 );
- const geometry = new THREE.BufferGeometry().setFromPoints( points );
- const material = new THREE.LineBasicMaterial( { color: 0xff0000 } );
- // Create the final object to add to the scene
- const ellipse = new THREE.Line( geometry, material );
- </code>
- <h2>构造函数</h2>
- <h3>[name]( [param:Float aX], [param:Float aY], [param:Float xRadius], [param:Float yRadius], [param:Radians aStartAngle], [param:Radians aEndAngle], [param:Boolean aClockwise], [param:Radians aRotation] )</h3>
- <p>
- [page:Float aX] – 椭圆的中心的X坐标,默认值为*0*。<br/>
- [page:Float aY] – 椭圆的中心的Y坐标,默认值为*0*。<br/>
- [page:Float xRadius] – X轴向上椭圆的半径,默认值为*1*。<br/>
- [page:Float yRadius] – Y轴向上椭圆的半径,默认值为*1*。<br/>
- [page:Radians aStartAngle] – 以弧度来表示,从正X轴算起曲线开始的角度,默认值为*0*。<br/>
- [page:Radians aEndAngle] – 以弧度来表示,从正X轴算起曲线终止的角度,默认值为*2 x Math.PI*。<br/>
- [page:Boolean aClockwise] – 椭圆是否按照顺时针方向来绘制,默认值为*false*。<br/>
- [page:Radians aRotation] – 以弧度表示,椭圆从X轴正方向逆时针的旋转角度(可选),默认值为*0*。<br/><br/>
- </p>
- <h2>属性</h2>
- <p>共有属性请参见其基类[page:Curve]。</p>
- <h3>[property:Float aX]</h3>
- <p>椭圆的中心的X坐标。</p>
- <h3>[property:Float aY]</h3>
- <p>椭圆的中心的Y坐标。</p>
- <h3>[property:Radians xRadius]</h3>
- <p>X轴向上椭圆的半径。</p>
- <h3>[property:Radians yRadius]</h3>
- <p>Y轴向上椭圆的半径。</p>
- <h3>[property:Float aStartAngle]</h3>
- <p>以弧度来表示,从正右侧算起曲线开始的角度。</p>
- <h3>[property:Float aEndAngle]</h3>
- <p>以弧度来表示,从正右侧算起曲线终止的角度。</p>
- <h3>[property:Boolean aClockwise]</h3>
- <p>椭圆是否按照顺时针方向来绘制。</p>
- <h3>[property:Float aRotation]</h3>
- <p>以弧度表示,椭圆在X轴正方向逆时针的旋转角度(可选),默认值为*0*。</p>
- <h2>方法</h2>
- <p>共有方法请参见其基类[page:Curve]。</p>
- <h2>源代码</h2>
- <p>
- [link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
- </p>
- </body>
- </html>
|