提交 3d4ed98c 编写于 作者: M Mr.doob

Docs: Clean up.

上级 22f782ea
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta charset="utf-8" />
<base href="../../" />
<script src="list.js"></script>
<script src="page.js"></script>
......
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta charset="utf-8" />
<base href="../../" />
<script src="list.js"></script>
<script src="page.js"></script>
......
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta charset="utf-8" />
<base href="../../" />
<script src="list.js"></script>
<script src="page.js"></script>
......
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta charset="utf-8" />
<base href="../../" />
<script src="list.js"></script>
<script src="page.js"></script>
......
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta charset="utf-8" />
<base href="../../" />
<script src="list.js"></script>
<script src="page.js"></script>
......@@ -72,7 +72,7 @@
</div>
Returns true if both line's start and end points are equal.
</div>
<h3>[method:Float distanceSq]()</h3>
<div>
Returns the line segment's length squared.
......@@ -94,7 +94,7 @@
<div>
Return a vector at a certain position along the line. When t = 0, it returns the start vector, and when t=1 it returns the end vector.
</div>
<h3>[method:Vector3 center]([page:Vector3 optionalTarget])</h3>
<div>
optionalTarget -- [page:Vector3] Optional target to set the result.
......
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta charset="utf-8" />
<base href="../../" />
<script src="list.js"></script>
<script src="page.js"></script>
......
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta charset="utf-8" />
<base href="../../" />
<script src="list.js"></script>
<script src="page.js"></script>
......
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta charset="utf-8" />
<base href="../../" />
<script src="list.js"></script>
<script src="page.js"></script>
......@@ -170,8 +170,8 @@
// rotate a mesh towards a target quaternion
mesh.quaternion.slerp( endQuaternion, 0.01 );
</code>
<h2>Static Methods</h2>
<h3>[method:Quaternion slerp]( [page:Quaternion qStart], [page:Quaternion qEnd], [page:Quaternion qTarget], [page:Float t] )</h3>
......@@ -195,7 +195,7 @@
t = ( t + 0.01 ) % 1; // constant angular momentum
THREE.Quaternion.slerp( startQuaternion, endQuaternion, mesh.quaternion, t );
</code>
<!-- Note: Do not add non-static methods to the bottom of this page. Put them above the <h2>Static Methods</h2> -->
<h2>Source</h2>
......
<!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 ray that emits from an origin in a certain direction.</div>
<h2>Constructor</h2>
<h3>[name]([page:Vector3 origin], [page:Vector3 direction])</h3>
<div>
origin -- [page:Vector3] The origin of the [page:Ray].<br />
direction -- [page:Vector3] The direction of the [page:Ray]. This must be normalized (with [page:Vector3].normalize) for the methods to operate properly.
</div>
<div>
Initialises the origin and direction properties to the provided values.
</div>
<h2>Properties</h2>
<h3>[property:Vector3 origin]</h3>
<div>
The origin of the [page:Ray].
</div>
<h3>[property:Vector3 direction]</h3>
<div>
The direction of the [page:Ray]. This must be normalized (with [page:Vector3].normalize) for the methods to operate properly.
</div>
<h2>Methods</h2>
<h3>[method:Ray applyMatrix4]([page:Matrix4 matrix4])</h3>
<div>
matrix4 -- [page:Matrix4] The [page:Matrix4] to transform this [page:Ray] by.
</div>
<div>
Transform this [page:Ray] by the [page:Matrix4].
</div>
<h3>.at([page:Float t], [page:Vector3 optionalTarget] = null) [page:Vector3]</h3>
<div>
t -- [page:Float] The distance along the [page:Ray] to retrieve a position for.<br />
optionalTarget -- [page:Vector3] Receives the position along the [page:Ray] if passed; otherwise a new [page:Vector3] is created.
</div>
<div>
Get a [page:Vector3] that is a given distance along this [page:Ray].
</div>
<h3>[method:Ray clone]()</h3>
<div>
Create a clone of this [page:Ray].
</div>
<h3>[method:Vector3 closestPointToPoint]([page:Vector3 point], [page:Vector3 optionalTarget])</h3>
<div>
point -- [page:Vector3] The point to get the closest approach to. <br />
optionalTarget -- [page:Vector3] Receives the return value if passed; otherwise a new [page:Vector3] is created.
</div>
<div>
Get the point along this [page:Ray] that is closest to the [page:Vector3] provided.
</div>
<h3>[method:Ray copy]([page:Ray ray])</h3>
<div>
ray -- [page:Ray] The [page:Ray] to copy values from.
</div>
<div>
Copy the properties of the provided [page:Ray], then return this [page:Ray].
</div>
<h3>.distanceSqToSegment([page:Vector3 v0], [page:Vector3 v1], [page:Vector3 optionalPointOnRay] = null, [page:Vector3 optionalPointOnSegment] = null) [page:Float]</h3>
<div>
v0 -- [page:Vector3] The start of the line segment.
v1 -- [page:Vector3] The end of the line segment.
optionalPointOnRay -- [page:Vector3] If this is provided, it receives the point on this [page:Ray] that is closest to the segment.
optionalPointOnSegment -- [page:Vector3] If this is provided, it receives the point on the line segment that is closest to this [page:Ray].
</div>
<div>
Get the squared distance between this [page:Ray] and a line segment.
</div>
<h3>[method:Float distanceToPlane]([page:Plane plane])</h3>
<div>
plane -- [page:Plane] The [page:Plane] to get the distance to.
</div>
<div>
Get the distance from the origin to the [page:Plane], or *null* if the [page:Ray] doesn't intersect the [page:Plane].
</div>
<h3>[method:Float distanceToPoint]([page:Vector3 point])</h3>
<div>
point -- [page:Vector3] The [page:Vector3] to compute a distance to.
</div>
<div>
Get the distance of the closest approach between the [page:Ray] and the [page:Vector3].
</div>
<h3>[method:Float distanceSqToPoint]([page:Vector3 point])</h3>
<div>
point -- [page:Vector3] The [page:Vector3] to compute a distance to.
</div>
<div>
Get the squared distance of the closest approach between the [page:Ray] and the [page:Vector3].
</div>
<h3>[method:Boolean equals]([page:Ray ray])</h3>
<div>
ray -- [page:Ray] The [page:Ray] to compare to.
</div>
<div>
Return whether this and the other [page:Ray] have equal offsets and directions.
</div>
<h3>.intersectBox([page:Box3 box], [page:Vector3 optionalTarget] = null) [page:Vector3]?</h3>
<div>
box -- [page:Box3] The [page:Box3] to intersect with.<br />
optionalTarget -- [page:Vector3] The [page:Vector3] to store the result in, or *null* to create a new [page:Vector3].
</div>
<div>
Intersect this [page:Ray] with a [page:Box3], returning the intersection point or *null* if there is no intersection.
</div>
<h3>.intersectPlane([page:Plane plane], [page:Vector3 optionalTarget] = null) [page:Vector3]?</h3>
<div>
plane -- [page:Plane] The [page:Plane] to intersect with.<br />
optionalTarget -- [page:Vector3] The [page:Vector3] to store the result in, or *null* to create a new [page:Vector3].
</div>
<div>
Intersect this [page:Ray] with a [page:Plane], returning the intersection point or *null* if there is no intersection.
</div>
function ( a, b, c, backfaceCulling, optionalTarget )
<h3>.intersectTriangle([page:Vector3 a], [page:Vector3 b], [page:Vector3 c], [page:Boolean backfaceCulling], [page:Vector3 optionalTarget] = null) [page:Vector3]?</h3>
<div>
a, b, c -- [page:Vector3] The [page:Vector3] points on the triangle.<br />
backfaceCulling -- [page:Boolean] Whether to use backface culling.<br />
optionalTarget -- [page:Vector3] The [page:Vector3] to store the result in, or *null* to create a new [page:Vector3].
</div>
<div>
Intersect this [page:Ray] with a triangle, returning the intersection point or *null* if there is no intersection.
</div>
<h3>[method:Boolean intersectsBox]([page:Box3 box])</h3>
<div>
box -- [page:Box3] The [page:Box3] to intersect with.
</div>
<div>
Return whether or not this [page:Ray] intersects with the [page:Box3].
</div>
<h3>[method:Boolean intersectsPlane]([page:Plane plane])</h3>
<div>
plane -- [page:Plane] The [page:Plane] to intersect with.
</div>
<div>
Return whether or not this [page:Ray] intersects with the [page:Plane].
</div>
<h3>[method:Boolean intersectsSphere]([page:Sphere sphere])</h3>
<div>
sphere -- [page:Sphere] The [page:Sphere] to intersect with.
</div>
<div>
Return whether or not this [page:Ray] intersects with the [page:Sphere].
</div>
<h3>[method:Ray recast]([page:Float t])</h3>
<div>
t -- The distance along the [page:Ray] to interpolate.
</div>
<div>
Shift the origin of this [page:Ray] along its direction by the distance given.
</div>
<h3>[method:Ray set]([page:Vector3 origin], [page:Vector3 direction])</h3>
<div>
origin -- [page:Vector3] The origin of the [page:Ray].<br />
direction -- [page:Vector3] The direction of the [page:Ray]. This must be normalized (with [page:Vector3].normalize) for the methods to operate properly.
</div>
<div>
Copy the parameters to the origin and direction properties.
</div>
<h3>[method:Ray lookAt]([page:Vector3 v])</h3>
<div>
v -- [page:Vector3] The vector to look at.
</div>
<div>
Adjusts the direction of the ray to point at the vector in world coordinates.
</div>
<h2>Source</h2>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
</body>
</html>
<!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 ray that emits from an origin in a certain direction.</div>
<h2>Constructor</h2>
<h3>[name]([page:Vector3 origin], [page:Vector3 direction])</h3>
<div>
origin -- [page:Vector3] The origin of the [page:Ray].<br />
direction -- [page:Vector3] The direction of the [page:Ray]. This must be normalized (with [page:Vector3].normalize) for the methods to operate properly.
</div>
<div>
Initialises the origin and direction properties to the provided values.
</div>
<h2>Properties</h2>
<h3>[property:Vector3 origin]</h3>
<div>
The origin of the [page:Ray].
</div>
<h3>[property:Vector3 direction]</h3>
<div>
The direction of the [page:Ray]. This must be normalized (with [page:Vector3].normalize) for the methods to operate properly.
</div>
<h2>Methods</h2>
<h3>[method:Ray applyMatrix4]([page:Matrix4 matrix4])</h3>
<div>
matrix4 -- [page:Matrix4] The [page:Matrix4] to transform this [page:Ray] by.
</div>
<div>
Transform this [page:Ray] by the [page:Matrix4].
</div>
<h3>.at([page:Float t], [page:Vector3 optionalTarget] = null) [page:Vector3]</h3>
<div>
t -- [page:Float] The distance along the [page:Ray] to retrieve a position for.<br />
optionalTarget -- [page:Vector3] Receives the position along the [page:Ray] if passed; otherwise a new [page:Vector3] is created.
</div>
<div>
Get a [page:Vector3] that is a given distance along this [page:Ray].
</div>
<h3>[method:Ray clone]()</h3>
<div>
Create a clone of this [page:Ray].
</div>
<h3>[method:Vector3 closestPointToPoint]([page:Vector3 point], [page:Vector3 optionalTarget])</h3>
<div>
point -- [page:Vector3] The point to get the closest approach to. <br />
optionalTarget -- [page:Vector3] Receives the return value if passed; otherwise a new [page:Vector3] is created.
</div>
<div>
Get the point along this [page:Ray] that is closest to the [page:Vector3] provided.
</div>
<h3>[method:Ray copy]([page:Ray ray])</h3>
<div>
ray -- [page:Ray] The [page:Ray] to copy values from.
</div>
<div>
Copy the properties of the provided [page:Ray], then return this [page:Ray].
</div>
<h3>.distanceSqToSegment([page:Vector3 v0], [page:Vector3 v1], [page:Vector3 optionalPointOnRay] = null, [page:Vector3 optionalPointOnSegment] = null) [page:Float]</h3>
<div>
v0 -- [page:Vector3] The start of the line segment.
v1 -- [page:Vector3] The end of the line segment.
optionalPointOnRay -- [page:Vector3] If this is provided, it receives the point on this [page:Ray] that is closest to the segment.
optionalPointOnSegment -- [page:Vector3] If this is provided, it receives the point on the line segment that is closest to this [page:Ray].
</div>
<div>
Get the squared distance between this [page:Ray] and a line segment.
</div>
<h3>[method:Float distanceToPlane]([page:Plane plane])</h3>
<div>
plane -- [page:Plane] The [page:Plane] to get the distance to.
</div>
<div>
Get the distance from the origin to the [page:Plane], or *null* if the [page:Ray] doesn't intersect the [page:Plane].
</div>
<h3>[method:Float distanceToPoint]([page:Vector3 point])</h3>
<div>
point -- [page:Vector3] The [page:Vector3] to compute a distance to.
</div>
<div>
Get the distance of the closest approach between the [page:Ray] and the [page:Vector3].
</div>
<h3>[method:Float distanceSqToPoint]([page:Vector3 point])</h3>
<div>
point -- [page:Vector3] The [page:Vector3] to compute a distance to.
</div>
<div>
Get the squared distance of the closest approach between the [page:Ray] and the [page:Vector3].
</div>
<h3>[method:Boolean equals]([page:Ray ray])</h3>
<div>
ray -- [page:Ray] The [page:Ray] to compare to.
</div>
<div>
Return whether this and the other [page:Ray] have equal offsets and directions.
</div>
<h3>.intersectBox([page:Box3 box], [page:Vector3 optionalTarget] = null) [page:Vector3]?</h3>
<div>
box -- [page:Box3] The [page:Box3] to intersect with.<br />
optionalTarget -- [page:Vector3] The [page:Vector3] to store the result in, or *null* to create a new [page:Vector3].
</div>
<div>
Intersect this [page:Ray] with a [page:Box3], returning the intersection point or *null* if there is no intersection.
</div>
<h3>.intersectPlane([page:Plane plane], [page:Vector3 optionalTarget] = null) [page:Vector3]?</h3>
<div>
plane -- [page:Plane] The [page:Plane] to intersect with.<br />
optionalTarget -- [page:Vector3] The [page:Vector3] to store the result in, or *null* to create a new [page:Vector3].
</div>
<div>
Intersect this [page:Ray] with a [page:Plane], returning the intersection point or *null* if there is no intersection.
</div>
function ( a, b, c, backfaceCulling, optionalTarget )
<h3>.intersectTriangle([page:Vector3 a], [page:Vector3 b], [page:Vector3 c], [page:Boolean backfaceCulling], [page:Vector3 optionalTarget] = null) [page:Vector3]?</h3>
<div>
a, b, c -- [page:Vector3] The [page:Vector3] points on the triangle.<br />
backfaceCulling -- [page:Boolean] Whether to use backface culling.<br />
optionalTarget -- [page:Vector3] The [page:Vector3] to store the result in, or *null* to create a new [page:Vector3].
</div>
<div>
Intersect this [page:Ray] with a triangle, returning the intersection point or *null* if there is no intersection.
</div>
<h3>[method:Boolean intersectsBox]([page:Box3 box])</h3>
<div>
box -- [page:Box3] The [page:Box3] to intersect with.
</div>
<div>
Return whether or not this [page:Ray] intersects with the [page:Box3].
</div>
<h3>[method:Boolean intersectsPlane]([page:Plane plane])</h3>
<div>
plane -- [page:Plane] The [page:Plane] to intersect with.
</div>
<div>
Return whether or not this [page:Ray] intersects with the [page:Plane].
</div>
<h3>[method:Boolean intersectsSphere]([page:Sphere sphere])</h3>
<div>
sphere -- [page:Sphere] The [page:Sphere] to intersect with.
</div>
<div>
Return whether or not this [page:Ray] intersects with the [page:Sphere].
</div>
<h3>[method:Ray recast]([page:Float t])</h3>
<div>
t -- The distance along the [page:Ray] to interpolate.
</div>
<div>
Shift the origin of this [page:Ray] along its direction by the distance given.
</div>
<h3>[method:Ray set]([page:Vector3 origin], [page:Vector3 direction])</h3>
<div>
origin -- [page:Vector3] The origin of the [page:Ray].<br />
direction -- [page:Vector3] The direction of the [page:Ray]. This must be normalized (with [page:Vector3].normalize) for the methods to operate properly.
</div>
<div>
Copy the parameters to the origin and direction properties.
</div>
<h3>[method:Ray lookAt]([page:Vector3 v])</h3>
<div>
v -- [page:Vector3] The vector to look at.
</div>
<div>
Adjusts the direction of the ray to point at the vector in world coordinates.
</div>
<h2>Source</h2>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
</body>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta charset="utf-8" />
<base href="../../" />
<script src="list.js"></script>
<script src="page.js"></script>
......@@ -21,16 +21,16 @@
center -- [page:Vector3] <br />
radius -- [page:Float]
</div>
<h2>Properties</h2>
<h3>[property:Vector3 center]</h3>
<h3>[property:Float radius]</h3>
<h2>Methods</h2>
......@@ -84,7 +84,7 @@
<h3>[method:Sphere setFromPoints]([page:Array points], [page:Vector3 optionalCenter]) [page:Sphere this]</h3>
<div>
points -- [page:Array] of [page:Vector3] positions.<br />
points -- [page:Array] of [page:Vector3] positions.<br />
optionalCenter -- Optional [page:Vector3] position for the sphere's center.<br />
</div>
<div>
......
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta charset="utf-8" />
<base href="../../" />
<script src="list.js"></script>
<script src="page.js"></script>
......@@ -17,7 +17,7 @@
<h3>[name]( [page:Array points] )</h3>
<div>Initialises the spline with *points*, which are the places through which the spline will go.</div>
......@@ -40,11 +40,11 @@
k — point index
</div>
<div>Return the interpolated point at *k*.</div>
<h3>[method:Array getControlPointsArray]( )</h3>
<div>Returns an array with triplets of x, y, z coordinates that correspond to the current control points.
</div>
<h3>[method:Object getLength]( [page:Integer nSubDivisions] )</h3>
<div>
nSubDivisions — number of subdivisions between control points. Default is *100*.
......@@ -54,7 +54,7 @@
the length of the spline when using nSubDivisions. The property .[page:Array chunkLength]
contains an array with the total length from the beginning of the spline to the end of that chunk.
</div>
<h3>[method:null reparametrizeByArcLength]( [page:Float samplingCoef] )</h3>
<div>
samplingCoef — how many intermediate values to use between spline points
......
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta charset="utf-8" />
<base href="../../" />
<script src="list.js"></script>
<script src="page.js"></script>
......@@ -35,7 +35,7 @@
<div>
The first [page:Vector3] of the triangle.
</div>
<h3>[property:Vector3 b]</h3>
<div>
The second [page:Vector3] of the triangle.
......@@ -120,7 +120,7 @@
optionalTarget -- Optional [page:Plane] target to set the result.
</div>
<div>
Return a [page:Plane plane] based on the triangle. Optionally sets a target plane.
Return a [page:Plane plane] based on the triangle. Optionally sets a target plane.
</div>
<h3>[method:Boolean containsPoint]([page:Vector3 point])</h3>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册