mirror of
https://github.com/Doodle3D/Doodle3D-Slicer.git
synced 2024-11-30 09:24:57 +01:00
55 lines
2.1 KiB
HTML
Executable File
55 lines
2.1 KiB
HTML
Executable File
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="utf-8" />
|
|
<script src="../../../list.js"></script>
|
|
<script src="../../../page.js"></script>
|
|
<link type="text/css" rel="stylesheet" href="../../../page.css" />
|
|
</head>
|
|
<body>
|
|
[page:Geometry] →
|
|
|
|
<h1>[name]</h1>
|
|
|
|
<div class="desc">A class for generating sphere geometries</div>
|
|
|
|
<h2>Example</h2>
|
|
|
|
<code>var geometry = new THREE.SphereGeometry( 5, 32, 32 );
|
|
var material = new THREE.MeshBasicMaterial( {color: 0xffff00} );
|
|
var sphere = new THREE.Mesh( geometry, material );
|
|
scene.add( sphere );
|
|
</code>
|
|
|
|
<h2>Constructor</h2>
|
|
|
|
|
|
<h3>[name]([page:Float radius], [page:Integer widthSegments], [page:Integer heightSegments], [page:Float phiStart], [page:Float phiLength], [page:Float thetaStart], [page:Float thetaLength])</h3>
|
|
|
|
<div>
|
|
radius — sphere radius. Default is 50.<br />
|
|
widthSegments — number of horizontal segments. Minimum value is 3, and the default is 8.<br />
|
|
heightSegments — number of vertical segments. Minimum value is 2, and the default is 6.<br />
|
|
phiStart — specify horizontal starting angle. Default is 0.<br />
|
|
phiLength — specify horizontal sweep angle size. Default is Math.PI * 2.<br />
|
|
thetaStart — specify vertical starting angle. Default is 0.<br />
|
|
thetaLength — specify vertical sweep angle size. Default is Math.PI.<br />
|
|
</div>
|
|
|
|
<div>
|
|
The geometry is created by sweeping and calculating vertexes around the Y axis (horizontal sweep) and the Z axis (vertical sweep). Thus, incomplete spheres (akin to <em>'sphere slices'</em>) can be created through the use of different values of phiStart, phiLength, thetaStart and thetaLength, in order to define the points in which we start (or end) calculating those vertices.
|
|
</div>
|
|
|
|
|
|
<h2>Properties</h2>
|
|
|
|
<div>
|
|
Each of the contructor parameters is accessible as a property of the same name. Any modification of these properties after instantiation does not change the geometry.
|
|
</div>
|
|
|
|
<h2>Source</h2>
|
|
|
|
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
|
|
</body>
|
|
</html>
|