Bladeren bron

Docs spherical (#9971)

* initial spherical docs

* Add the new page

* add Vector3.setFromSpherical docs

* adjust language and formatting
aardgoose 8 jaren geleden
bovenliggende
commit
d82fcacce9
3 gewijzigde bestanden met toevoegingen van 76 en 0 verwijderingen
  1. 70 0
      docs/api/math/Spherical.html
  2. 5 0
      docs/api/math/Vector3.html
  3. 1 0
      docs/list.js

+ 70 - 0
docs/api/math/Spherical.html

@@ -0,0 +1,70 @@
+<!DOCTYPE html>
+<html lang="en">
+	<head>
+		<meta charset="utf-8" />
+		<base href="../../" />
+		<script src="list.js"></script>
+		<script src="page.js"></script>
+		<link type="text/css" rel="stylesheet" href="page.css" />
+	</head>
+	<body>
+		<h1>[name]</h1>
+
+		<div class="desc">A point's spherical coordinates.</div>
+
+
+		<h2>Constructor</h2>
+
+
+		<h3>[name]( [page:Float radius], [page:Float phi], [page:Float theta] )</h3>
+		<div>
+		radius -- [page:Float] the radius<br />
+		phi -- [page:Float] polar angle from the y (up) axis<br />
+		theta -- [page:Float] equator angle around the y (up) axis
+		</div>
+		<div>
+		The poles (phi) are at the positive and negative y axis. The equator (theta) starts at positive z.
+		</div>
+
+
+		<h2>Properties</h2>
+
+		<h3>[property:Float radius]</h3>
+
+		<h3>[property:Float phi]</h3>
+
+		<h3>[property:Float theta]</h3>
+
+
+		<h2>Methods</h2>
+
+		<h3>[method:Spherical set]( [page:Float radius], [page:Float phi], [page:Float theta] ) [page:Spherical this]</h3>
+		<div>
+		Sets values of this spherical's component coordinates.
+		</div>
+
+		<h3>[method:Spherical copy]( [page:Spherical s] ) [page:Spherical this]</h3>
+		<div>
+		Copies value of *s* to this spherical.
+		</div>
+
+		<h3>[method:Spherical clone]() [page:Spherical this]</h3>
+		<div>
+		Clones this spherical.
+		</div>
+
+		<h3>[method:Spherical makeSafe]() [page:Spherical this]</h3>
+		<div>
+		Restricts the polar angle phi to be between 0.000001 and pi - 0.000001.
+		</div>
+
+		<h3>[method:Spherical setFromVector3]( [page:Vector3 v] ) [page:Spherical this]</h3>
+		<div>
+		Sets this object from the vector *v*.
+		</div>
+
+		<h2>Source</h2>
+
+		[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
+	</body>
+</html>

+ 5 - 0
docs/api/math/Vector3.html

@@ -197,6 +197,11 @@
 		Sets this vector extracting scale from matrix transform.
 		</div>
 
+		<h3>[method:Vector3 setFromSpherical]( [page:Spherical s] ) [page:Vector3 this]</h3>
+		<div>
+		Sets this vector from the spherical coordinates *s*.
+		</div>
+
 		<h3>[method:Vector3 clamp]( [page:Vector3 min], [page:Vector3 max] ) [page:Vector3 this]</h3>
 		<div>
 		min -- [page:Vector3] <br />

+ 1 - 0
docs/list.js

@@ -143,6 +143,7 @@ var list = {
 			[ "Quaternion", "api/math/Quaternion" ],
 			[ "Ray", "api/math/Ray" ],
 			[ "Sphere", "api/math/Sphere" ],
+			[ "Spherical", "api/math/Spherical" ],
 			[ "Spline", "api/math/Spline" ],
 			[ "Triangle", "api/math/Triangle" ],
 			[ "Vector2", "api/math/Vector2" ],