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

r78

上级 05964c5f
此差异已折叠。
此差异已折叠。
......@@ -74,6 +74,25 @@ scene.add( camera );</code>
<h2>Methods</h2>
<h3>[method:null setViewOffset]( [page:Float fullWidth], [page:Float fullHeight], [page:Float x], [page:Float y], [page:Float width], [page:Float height] )</h3>
<div>
fullWidth — full width of multiview setup<br />
fullHeight — full height of multiview setup<br />
x — horizontal offset of subcamera<br />
y — vertical offset of subcamera<br />
width — width of subcamera<br />
height — height of subcamera
</div>
<div>
Sets an offset in a larger frustum. This is useful for multi-window or multi-monitor/multi-machine setups. For an example on how to use it see [page:PerspectiveCamera].
</div>
<h3>[method:null clearViewOffset]()</h3>
<div>
Removes any offset set by the .setViewOffset method.
</div>
<h3>[method:null updateProjectionMatrix]()</h3>
<div>
Updates the camera projection matrix. Must be called after change of parameters.
......
......@@ -17,11 +17,11 @@
<h2>Example</h2>
<div>[example:canvas_effects_stereo effects / stereo ]</div>
<div>[example:canvas_geometry_birds geometry / birds ]</div>
<div>[example:canvas_geometry_cube geometry / cube ]</div>
<div>[example:webgl_animation_skinning_blending animation / skinning / blending ]</div>
<div>[example:webgl_animation_skinning_morph animation / skinning / blending ]</div>
<div>[example:webgl_effects_stereo effects / stereo ]</div>
<div>[example:webgl_interactive_cubes interactive / cubes ]</div>
<div>[example:webgl_loader_collada_skinning loader / collada / skinning ]</div>
......@@ -88,7 +88,7 @@ scene.add( camera );</code>
<h3>[method:Float getFilmHeight]()</h3>
<div>
Returns the height of the image on the film. If .aspect is less than or equal to one (portrait format), the result equals .fimlGauge.
Returns the height of the image on the film. If .aspect is less than or equal to one (portrait format), the result equals .filmGauge.
</div>
<h3>[method:null setFocalLength]( [page:Float focalLength] )</h3>
......@@ -157,6 +157,11 @@ camera.setViewOffset( fullWidth, fullHeight, w * 2, h * 1, w, h );
Note there is no reason monitors have to be the same size or in a grid.
</div>
<h3>[method:null clearViewOffset]()</h3>
<div>
Removes any offset set by the .setViewOffset method.
</div>
<h3>[method:null updateProjectionMatrix]()</h3>
<div>
Updates the camera projection matrix. Must be called after change of parameters.
......
......@@ -175,6 +175,30 @@
Translates object along z axis by distance.
</div>
<h3>[method:null rotateX]( [page:Float rad] )</h3>
<div>
rad - the angle to rotate in radians.<br />
</div>
<div>
Rotates the object around x axis in local space.
</div>
<h3>[method:null rotateY]( [page:Float rad] )</h3>
<div>
rad - the angle to rotate in radians.<br />
</div>
<div>
Rotates the object around y axis in local space.
</div>
<h3>[method:null rotateZ]( [page:Float rad] )</h3>
<div>
rad - the angle to rotate in radians.<br />
</div>
<div>
Rotates the object around z axis in local space.
</div>
<h3>[method:Vector3 localToWorld]( [page:Vector3 vector] )</h3>
<div>
vector - A local vector.<br />
......@@ -250,9 +274,12 @@
Updates global transform of the object and its children.
</div>
<h3>[method:Object3D clone]()</h3>
<h3>[method:Object3D clone]( [page:Boolean recursive] )</h3>
<div>
recursive -- if true, descendants of the object are also cloned. Default is true.
</div>
<div>
Creates a new clone of this object and all descendants.
Returns a clone of this object and optionaly all descendants.
</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>
......@@ -16,7 +16,7 @@
<h2>Methods</h2>
<h3>[method:Object3D createMultiMaterialObject]([page:Geometry geometry], [page:Array materials])</h3>
<h3>[method:Object3D createMultiMaterialObject]( [page:Geometry geometry], [page:Array materials] )</h3>
<div>
geometry -- The geometry for the Object. <br />
materials -- The materials for the object.
......@@ -26,7 +26,7 @@
This is mostly useful for object that need a material and a wireframe implementation.
</div>
<h3>[method:null attach]([page:Object3D child], [page:Object3D scene], [page:Object3D parent])</h3>
<h3>[method:null attach]( [page:Object3D child], [page:Object3D scene], [page:Object3D parent] )</h3>
<div>
child -- The object to add to the parent <br />
scene -- The scene to detach the object on. <br />
......@@ -36,7 +36,7 @@
Attaches the object to the parent without the moving the object in the worldspace. Beware that to do this the matrixWorld needs to be updated, this can be done by calling the updateMatrixWorld method on the parent object.
</div>
<h3>[method:null detach]([page:Object3D child], [page:Object3D parent], [page:Object3D scene])</h3>
<h3>[method:null detach]( [page:Object3D child], [page:Object3D parent], [page:Object3D scene] )</h3>
<div>
child -- The object to remove from the parent <br />
scene -- The scene to attach the object on. <br />
......
<!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>
......@@ -48,7 +48,7 @@
<h2>Methods</h2>
<h3>[method:Array getWrapPoints]([page:Array vertices], [page:Curve curve])</h3>
<h3>[method:Array getWrapPoints]( [page:Array vertices], [page:Curve curve] )</h3>
<div>
vertices -- An array of [page:Vector2]s to modify<br />
curve -- An array of 2d [page:Curve]s
......@@ -59,7 +59,7 @@
modification.
</div>
<h3>[method:null addWrapPath]([page:Curve curve])</h3>
<h3>[method:null addWrapPath]( [page:Curve curve] )</h3>
<div>
curve -- A [page:Curve] or object with a similar interface.
</div>
......@@ -67,7 +67,7 @@
Pushes a curve onto the bends array.
</div>
<h3>[method:Geometry createGeometry]([page:Vector3 points])</h3>
<h3>[method:Geometry createGeometry]( [page:Vector3 points] )</h3>
<div>
points -- An array of [page:Vector3]s
</div>
......@@ -75,7 +75,7 @@
Creates a geometry from points
</div>
<h3>[method:Geometry createPointsGeometry]([page:Integer divisions])</h3>
<h3>[method:Geometry createPointsGeometry]( [page:Integer divisions] )</h3>
<div>
divisions -- How many segments to create with [page:Vector3]s. Defaults to 12.
</div>
......@@ -83,7 +83,7 @@
Creates a [page:Geometry] object comprised of [page:Vector3]s
</div>
<h3>[method:Geometry createSpacedPointsGeometry]([page:Integer divisions])</h3>
<h3>[method:Geometry createSpacedPointsGeometry]( [page:Integer divisions] )</h3>
<div>
divisions -- How many segments to create with [page:Vector3]s. Defaults to 12.
</div>
......@@ -92,7 +92,7 @@
</div>
<h3>[method:null add]([page:Curve curve])</h3>
<h3>[method:null add]( [page:Curve curve] )</h3>
<div>
curve -- The [page:Curve curve] to add
</div>
......@@ -115,7 +115,7 @@
Adds together the length of the curves
</div>
<h3>[method:Array getTransformedPoints]([page:Integer segments], [page:Array bends])</h3>
<h3>[method:Array getTransformedPoints]( [page:Integer segments], [page:Array bends] )</h3>
<div>
segments -- The number of segments to create using the getPoints()<br />
bends -- (optional) An array of [page:Curve]s used to transform the points. Defaults to this.bends if blank.
......@@ -125,7 +125,7 @@
array of [page:Vector2]s.
</div>
<h3>[method:Array getTransformedSpacedPoints]([page:Integer segments], [page:Array bends])</h3>
<h3>[method:Array getTransformedSpacedPoints]( [page:Integer segments], [page:Array bends] )</h3>
<div>
segments -- The number of segments to create using the getPoints()<br />
bends -- (optional) Defaults to this.bends if blank. An array of [page:Curve]s used to transform the 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>
......@@ -21,7 +21,7 @@
<h2>Constructor</h2>
<h3>[name]([page:Array points])</h3>
<h3>[name]( [page:Array points] )</h3>
<div>
points -- array of Vector2
</div>
......
......@@ -62,7 +62,7 @@
<h2>Methods</h2>
<h3>[method:ShapeGeometry makeGeometry]([page:Object options])</h3>
<h3>[method:ShapeGeometry makeGeometry]( [page:Object options] )</h3>
<div>
options -- This is passed as the second argument to [page:ShapeGeometry ShapeGeometry]
</div>
......@@ -70,7 +70,7 @@
Convenience method to return ShapeGeometry
</div>
<h3>[method:Array extractAllPoints]([page:Integer divisions])</h3>
<h3>[method:Array extractAllPoints]( [page:Integer divisions] )</h3>
<div>
divisions -- The number of divisions to create on the shape
</div>
......@@ -78,7 +78,7 @@
Get points of shape and holes (keypoints based on segments parameter)
</div>
<h3>[method:ExtrudeGeometry extrude]([page:Object options])</h3>
<h3>[method:ExtrudeGeometry extrude]( [page:Object options] )</h3>
<div>
options -- This is passed as the second argument to [page:ExtrudeGeometry ExtrudeGeometry]
</div>
......@@ -86,7 +86,7 @@
Convenience method to return ExtrudeGeometry
</div>
<h3>[method:Object extractPoints]([page:Integer divisions])</h3>
<h3>[method:Object extractPoints]( [page:Integer divisions] )</h3>
<div>
divisions -- The number of divisions to create on the shape
</div>
......@@ -94,7 +94,7 @@
Returns an object with a *shape* and *holes* property that each reference an array of [page:Vector2 Vector2s].
</div>
<h3>[method:Object extractAllSpacedPoints]([page:Integer divisions])</h3>
<h3>[method:Object extractAllSpacedPoints]( [page:Integer divisions] )</h3>
<div>
divisions -- The number of divisions to create on the shape
</div>
......@@ -103,7 +103,7 @@
points will all be equally spaced along the shape.
</div>
<h3>[method:Array getPointsHoles]([page:Integer divisions])</h3>
<h3>[method:Array getPointsHoles]( [page:Integer divisions] )</h3>
<div>
divisions -- The number of divisions to create on the shape
</div>
......@@ -111,7 +111,7 @@
Get an array of [page Vector2 Vector2s] that represent the holes in the shape.
</div>
<h3>[method:Array getSpacedPointsHoles]([page:Integer divisions])</h3>
<h3>[method:Array getSpacedPointsHoles]( [page:Integer divisions] )</h3>
<div>
divisions -- The number of divisions to create on the shape
</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>
......@@ -29,13 +29,13 @@
<h2>Constructor</h2>
<h3>[name]([page:Float radiusTop], [page:Float radiusBottom], [page:Float height], [page:Integer radiusSegments], [page:Integer heightSegments], [page:Boolean openEnded], [page:Float thetaStart], [page:Float thetaLength])</h3>
<h3>[name]([page:Float radius], [page:Float height], [page:Integer radiusSegments], [page:Integer heightSegments], [page:Boolean openEnded], [page:Float thetaStart], [page:Float thetaLength])</h3>
<div>
radius — Radius of the cone base. Default is 20.<br />
height — Height of the cone. Default is 100.<br />
radiusSegments — Number of segmented faces around the circumference of the cone. Default is 8<br />
heightSegments — Number of rows of faces along the height of the cone. Default is 1.<br />
openEnded — A Boolean indicating whether the ends of the cone are open or capped. Default is false, meaning capped.<br />
openEnded — A Boolean indicating whether the base of the cone is open or capped. Default is false, meaning capped.<br />
thetaStart — Start angle for first segment, default = 0 (three o'clock position).<br />
thetaLength — The central angle, often called theta, of the circular sector. The default is 2*Pi, which makes for a complete cone.
</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>
......@@ -29,13 +29,13 @@
<h2>Constructor</h2>
<h3>[name]([page:Float radiusTop], [page:Float radiusBottom], [page:Float height], [page:Integer radiusSegments], [page:Integer heightSegments], [page:Boolean openEnded], [page:Float thetaStart], [page:Float thetaLength])</h3>
<h3>[name]([page:Float radius], [page:Float height], [page:Integer radiusSegments], [page:Integer heightSegments], [page:Boolean openEnded], [page:Float thetaStart], [page:Float thetaLength])</h3>
<div>
radius — Radius of the cone at the base. Default is 20.<br />
height — Height of the cone. Default is 100.<br />
radiusSegments — Number of segmented faces around the circumference of the cone. Default is 8<br />
heightSegments — Number of rows of faces along the height of the cone. Default is 1.<br />
openEnded — A Boolean indicating whether the ends of the cone are open or capped. Default is false, meaning capped.<br />
openEnded — A Boolean indicating whether the base of the cone is open or capped. Default is false, meaning capped.<br />
thetaStart — Start angle for first segment, default = 0 (three o'clock position).<br />
thetaLength — The central angle, often called theta, of the circular sector. The default is 2*Pi, which makes for a complete cone.
</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>
......@@ -18,7 +18,7 @@
<h2>Example</h2>
<code>var sphere = new THREE.SphereGeometry();
var object = new THREE.Mesh( sphere, new THREE.MeshBasicMaterial(0xff0000) );
var object = new THREE.Mesh( sphere, new THREE.MeshBasicMaterial( 0xff0000 ) );
var box = new THREE.BoxHelper( object );
scene.add( box );
</code>
......@@ -26,7 +26,11 @@
<h2>Constructor</h2>
<h3>[name]( [page:Object3D object] )</h3>
<h3>[name]( [page:Object3D object], [page:Color color] )</h3>
<div>
object -- Object3D -- the object3D to show the world-axis-aligned boundingbox.<br />
color -- The color of the helper. This can be a [page:Color], a hexadecimal value and an CSS-Color name. Default is 0xffff00
</div>
<div>Creates a new wireframe box matching the size of the passed box.</div>
<h2>Properties</h2>
......
......@@ -69,11 +69,6 @@
Extract the base from the URL.
</div>
<h3>[method:DOMElement addStatusElement]()</h3>
<div>
Add a DOM element to indicate the progress and return the DOMElement
</div>
<h2>Source</h2>
......
......@@ -46,7 +46,7 @@
</div>
<div>
Parse an <em>obj</em> text structure and return an [page:Object3D].<br />
Found objects are converted to [page:Mesh] with a [page:BufferGeometry] and a default [page:MeshLambertMaterial].
Found objects are converted to [page:Mesh] with a [page:BufferGeometry] and a default [page:MeshPhongMaterial].
</div>
<h2>Example</h2>
......
<!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>
......@@ -18,7 +18,7 @@
<h2>Constructor</h2>
<h3>[name]([page:Object parameters])</h3>
<h3>[name]( [page:Object parameters] )</h3>
<div>parameters is an object with one or more properties defining the material's appearance.</div>
<div>
color — Line color in hexadecimal. Default is 0xffffff.<br />
......
......@@ -150,7 +150,7 @@
<h3>[page:EventDispatcher EventDispatcher] methods are available on this class.</h3>
<h3>[method:Material clone]([page:material material])</h3>
<h3>[method:Material clone]( [page:material material] )</h3>
<div>
material -- this material gets the cloned information (optional).
</div>
......@@ -163,7 +163,7 @@
This disposes the material. Textures of a material don't get disposed. These needs to be disposed by [page:Texture Texture].
</div>
<h3>[method:null setValues]([page:object values])</h3>
<h3>[method:null setValues]( [page:object values] )</h3>
<div>
values -- a container with parameters.
</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>
......@@ -19,7 +19,7 @@
<h2>Constructor</h2>
<h3>[name]([page:Object parameters])</h3>
<h3>[name]( [page:Object parameters] )</h3>
<div>
parameters is an object with one or more properties defining the material's appearance.
</div>
......
......@@ -19,7 +19,7 @@
<h2>Constructor</h2>
<h3>[name]([page:Object parameters])</h3>
<h3>[name]( [page:Object parameters] )</h3>
<div>
parameters -- parameters is an object with one or more properties defining the material's appearance.
</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>
......@@ -20,7 +20,7 @@
<h2>Constructor</h2>
<h3>[name]([page:Object parameters])</h3>
<h3>[name]( [page:Object parameters] )</h3>
<div>
parameters is an object with one or more properties defining the material's appearance.
</div>
......
......@@ -19,7 +19,7 @@
<h2>Constructor</h2>
<h3>[name]([page:Object parameters])</h3>
<h3>[name]( [page:Object parameters] )</h3>
<div>
parameters -- an object with one or more of the material's properties defining the material's appearance.
</div>
......@@ -36,7 +36,7 @@
emissiveMap — Set emissive map. Default is null.<br />
emissiveIntensity — Set emissive map intensity. Default is 1.<br />
bumpMap — Set bump map. Default is null.<br />
bumpMapScale — Set bump map scale. Default is 1.<br />
bumpScale — Set bump map scale. Default is 1.<br />
normalMap — Set normal map. Default is null.<br />
normalScale — Set normal map scale. Default is (1, 1).<br />
displacementMap — Set displacement map. Default is null.<br />
......
......@@ -19,7 +19,7 @@
<h2>Constructor</h2>
<h3>[name]([page:Object parameters])</h3>
<h3>[name]( [page:Object parameters] )</h3>
<div>
parameters -- an object with one or more of the material's properties defining the material's appearance.
</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>
......@@ -20,7 +20,7 @@
<h2>Constructor</h2>
<h3>[name]([page:Array materials])</h3>
<h3>[name]( [page:Array materials] )</h3>
<div>
materials -- The materials for the geometry.
</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>
......@@ -30,7 +30,7 @@
<h2>Constructor</h2>
<h3>[name]([page:SkinnedMesh skin])</h3>
<h3>[name]( [page:SkinnedMesh skin] )</h3>
<div>
skin — (optional) The [page:SkinnedMesh] to which the bone belongs.
</div>
......@@ -44,12 +44,9 @@
<h2>Methods</h2>
<h3>[method:Object3D clone]([page:Object3D object])</h3>
<h3>[method:Bone clone]()</h3>
<div>
object -- (optional) Object3D which needs to be cloned. If undefined, clone method will create a new cloned Bone Object.
</div>
<div>
Clone a Bone Object.
Returns a clone of this Bone object and its descendants.
</div>
<h2>Source</h2>
......
......@@ -84,14 +84,12 @@
Update the visiblility of the level of detail based on the distance from the camera.
</div>
<h3>[method:Object3D clone]( [page:Object3D object] )</h3>
<h3>[method:LOD clone]()</h3>
<div>
object -- (optional) Object3D which needs to be cloned. If undefined, clone method will create a new cloned LOD Object.
</div>
<div>
Clone a LOD Object.
Returns a clone of this LOD object and its associated distance specific objects.
</div>
<h2>Source</h2>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
......
......@@ -22,7 +22,7 @@
<h2>Constructor</h2>
<h3>[name]([page:Texture texture], [page:Float size], [page:Float distance], [page:Materials blending], [page:Color color])</h3>
<h3>[name]( [page:Texture texture], [page:Float size], [page:Float distance], [page:Materials blending], [page:Color color] )</h3>
<div>
texture -- THREE.Texture (optional) <br />
size -- size in pixels (-1 = use texture.width) <br />
......@@ -56,7 +56,7 @@
<h2>Methods</h2>
<h3>[method:null add]([page:Texture texture], [page:Float size], [page:Float distance], [page:Materials blending], [page:Color color])</h3>
<h3>[method:null add]( [page:Texture texture], [page:Float size], [page:Float distance], [page:Materials blending], [page:Color color] )</h3>
<div>
Adds a lens flare. See the constructor for details on the parameters.
</div>
......@@ -67,14 +67,12 @@
Updates the lens flare based on the [page:LensFlare.positionScreen positionScreen] property.
</div>
<h3>[method:Object3D clone]([page:Object3D object])</h3>
<h3>[method:Lens Flare clone]()</h3>
<div>
object -- (optional) Object3D which needs to be cloned. If undefined, clone method will create a new cloned LensFlare Object.
</div>
<div>
Clone a LensFlare Object.
Returns a clone of this LensFlare object and its descendants.
</div>
<h2>Source</h2>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
......
<!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>
......@@ -60,19 +60,17 @@
<h2>Methods</h2>
<h3>[method:Array raycast]([page:Raycaster raycaster], [page:Array intersects])</h3>
<h3>[method:Array raycast]( [page:Raycaster raycaster], [page:Array intersects] )</h3>
<div>
Get intersections between a casted ray and this Line. [page:Raycaster.intersectObject] will call this method.
</div>
<h3>[method:Object3D clone]([page:Object3D object])</h3>
<h3>[method:Line clone]()</h3>
<div>
object -- (optional) Object3D which needs to be cloned. If undefined, clone method will create a new cloned Line Object.
</div>
<div>
Clone a Line Object.
Returns a clone of this Line object and its descendants.
</div>
<h2>Source</h2>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
......
......@@ -42,20 +42,18 @@
<h2>Methods</h2>
<h3>[method:Array raycast]([page:Raycaster raycaster], [page:Array intersects])</h3>
<h3>[method:Array raycast]( [page:Raycaster raycaster], [page:Array intersects] )</h3>
<div>
Get intersections between a casted ray and this Line. [page:Raycaster.intersectObject] will call this method.
</div>
<h3>[method:Object3D clone]([page:Object3D object])</h3>
<h3>[method:LineSegments clone]()</h3>
<div>
object -- (optional) Object3D which needs to be cloned. If undefined, clone method will create a new cloned LineSegments Object.
</div>
<div>
Clone a LineSegments Object.
Returns a clone of this LineSegments object and its descendants.
</div>
<h2>Source</h2>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
......
<!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>
......@@ -86,20 +86,18 @@
[page:Mesh.morphTargetBase morphTargetBase] properties.
</div>
<h3>[method:Array raycast]([page:Raycaster raycaster], [page:Array intersects])</h3>
<h3>[method:Array raycast]( [page:Raycaster raycaster], [page:Array intersects] )</h3>
<div>
Get intersections between a casted ray and this mesh. [page:Raycaster.intersectObject] will call this method.
</div>
<h3>[method:Object3D clone]([page:Object3D object])</h3>
<h3>[method:Mesh clone]()</h3>
<div>
object -- (optional) Object3D which needs to be cloned. If undefined, clone method will create a new cloned Mesh Object.
</div>
<div>
Clone a Mesh Object.
Returns a clone of this Mesh object and its descendants.
</div>
<h2>Source</h2>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
......
<!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>
[page:Object3D] &rarr;
<h1>[name]</h1>
<div class="desc">Play a sequence of morphs in a smooth animation sequence.</div>
<h2>Examples</h2>
<div>
[example:webgl_lights_hemisphere lights / hemisphere ]<br/>
[example:webgl_morphtargets_md2 morphtargets / md2 ]<br/>
[example:webgl_loader_json_blender loader / json / blender ]
</div>
<code>
var meshAnim;
loader.load( "models/animated/flamingo.js", function( geometry ) {
meshAnim = new THREE.MorphAnimMesh( geometry, material );
meshAnim.duration = 1000;
scene.add( meshAnim );
}
function update() {
var delta = clock.getDelta();
meshAnim.updateAnimation( 1000 * delta );
}
</code>
<h2>Constructor</h2>
<h3>[name]([page:Geometry geometry], [page:Material material])</h3>
<div>
geometry — An instance of [page:Geometry].<br />
material — An instance of [page:Material] (optional).
</div>
<h2>Properties</h2>
<h3>[property:Boolean directionBackwards]</h3>
<div>
Animation is playing backwards
</div>
<h3>[property:Float direction]</h3>
<div>
1 if playing forward, -1 if playing backwards
</div>
<h3>[property:Integer startKeyframe]</h3>
<div>
The first keyframe (morph) of the sequence
</div>
<h3>[property:Integer endKeyframe]</h3>
<div>
The last keyframe (morph) of the sequence
</div>
<h3>[property:Boolean mirroredLoop]</h3>
<div>
Loop animation back and forth
</div>
<h3>[property:Integer lastKeyframe]</h3>
<div>
The index of the last keyframe played.
</div>
<h3>[property:Integer currentKeyframe]</h3>
<div>
The index of the current frame being played.
</div>
<h3>[property:Integer length]</h3>
<div>
The number of frames (morphs)
</div>
<h3>[property:Float time]</h3>
<div>
The current playback position of the animation in milliseconds.
</div>
<h3>[property:Float duration]</h3>
<div>
The length of the animation in milliseconds.
</div>
<h2>Methods</h2>
<h3>[method:null setDirectionForward]()</h3>
<div>
Sets the animation to play forwards
</div>
<h3>[method:null setDirectionBackward]()</h3>
<div>
Set the animation to play backwards.
</div>
<h3>[method:null playAnimation]([page:String label], [page:Float fps])</h3>
<div>
label -- The label of the animation <br />
fps -- The frames per second (in seconds)
</div>
<div>
Starts playing a labeled animation. Animations are defined by calling [page:MorphAnimMesh.parseAnimations parseAnimations].
</div>
<h3>[method:null setFrameRange]([page:Integer start], [page:Integer end])</h3>
<div>
start -- The starting frame (morph) index <br />
end -- The ending frame (morph) index
</div>
<div>
Sets the range of morphs to be played
</div>
<h3>[method:null parseAnimations]()</h3>
<div>
Goes through the geometry's morphTargets and generates animations based on the morphTargets' names (morph.name). Names
are of the form "walk_01", "walk_02", "walk_03", etc or "run001", "run002", "run003". The animation label is then
the part before the underscore and number, so "walk" or "run" in the examples.<br/><br/>
This function changes the underlying geometry object by adding the animations property to it. This property
is set to an object of key/pair values, with the key being the label and the value being an object with
a start and end property that represents the frame index.
</div>
<h3>[method:null updateAnimation]([page:Float delta])</h3>
<div>
delta -- The change in time in milliseconds
</div>
<div>
Update the morphTargetInfluences array on the MorphAnimMesh.
</div>
<h3>[method:null setAnimationLabel]([page:String label], [page:Integer start], [page:Integer end])</h3>
<div>
label -- The name of the animation <br />
start -- The starting frame index <br />
end -- The ending frame index
</div>
<div>
Defines an animation. Sets the geometry.animations[label] to be an object with the start and end properties.
</div>
<h3>[method:Object3D clone]([page:Object3D object])</h3>
<div>
object -- (optional) Object3D which needs to be cloned. If undefined, clone method will create a new cloned MorphAnimMesh Object.
</div>
<div>
Clone a MorphAnimMesh Object.
</div>
<h2>Source</h2>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
</body>
</html>
......@@ -38,24 +38,17 @@
<h2>Methods</h2>
<h3>[method:Points clone]()</h3>
<div>
This creates a clone of the particle system.
</div>
<h3>[method:Array raycast]([page:Raycaster raycaster], [page:Array intersects])</h3>
<h3>[method:Array raycast]( [page:Raycaster raycaster], [page:Array intersects] )</h3>
<div>
Get intersections between a casted ray and this Points. [page:Raycaster.intersectObject] will call this method.
</div>
<h3>[method:Object3D clone]([page:Object3D object])</h3>
<div>
object -- (optional) Object3D which needs to be cloned. If undefined, clone method will create a new cloned Points Object.
</div>
<h3>[method:Points clone]()</h3>
<div>
Clone a Points Object.
Returns a clone of this Points object and its descendants.
</div>
<h2>Source</h2>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
......
......@@ -123,8 +123,9 @@
<h3>[method:Skeleton clone]()</h3>
<div>
Clone a Skeleton Object.
Returns a clone of this Skeleton object.
</div>
<h2>Source</h2>
......
......@@ -53,7 +53,7 @@
<h2>Constructor</h2>
<h3>[name]([page:Geometry geometry], [page:Material material], [page:boolean useVertexTexture])</h3>
<h3>[name]( [page:Geometry geometry], [page:Material material], [page:boolean useVertexTexture] )</h3>
<div>
geometry — An instance of [page:Geometry]. [page:Geometry.skinIndices] and [page:Geometry.skinWeights] should be set.<br />
material — An instance of [page:Material] (optional).<br />
......@@ -102,7 +102,7 @@
<h2>Methods</h2>
<h3>[method:null bind]([page:Skeleton skeleton], [page:Matrix4 bindMatrix])</h3>
<h3>[method:null bind]( [page:Skeleton skeleton], [page:Matrix4 bindMatrix] )</h3>
<div>
skeleton — [page:Skeleton]<br/>
bindMatrix — [page:Matrix4] that represents the base transform of the skeleton
......@@ -122,7 +122,7 @@
This method sets the skinned mesh in the rest pose.
</div>
<h3>[method:Bone addBone]([page:Bone bone])</h3>
<h3>[method:Bone addBone]( [page:Bone bone] )</h3>
<div>
bone — This is the bone that needs to be added. (optional)
</div>
......@@ -130,13 +130,11 @@
This method adds the bone to the skinned mesh when it is provided. It creates a new bone and adds that when no bone is given.
</div>
<h3>[method:Object3D clone]([page:Object3D object])</h3>
<h3>[method:SkinnedMesh clone]()</h3>
<div>
object -- (optional) Object3D which needs to be cloned. If undefined, clone method will create a new cloned SkinnedMesh Object.
</div>
<div>
Clone a SkinnedMesh Object.
Returns a clone of this SkinnedMesh object and its descendants.
</div>
<h2>Source</h2>
......
......@@ -26,7 +26,7 @@
<h2>Constructor</h2>
<h3>[name]([page:Material material])</h3>
<h3>[name]( [page:Material material] )</h3>
<div>
material — An instance of [page:Material] (optional).
</div>
......@@ -41,22 +41,16 @@
<div>
An instance of [page:Material], defining the object's appearance. Default is a [page:SpriteMaterial] which is a white plane.
</div>
-
<h2>Methods</h2>
<h3>[method:Sprite clone]()</h3>
<div>
This creates a new clone of the sprite.
</div>
<h3>[method:Object3D clone]([page:Object3D object])</h3>
<div>
object -- (optional) Object3D which needs to be cloned. If undefined, clone method will create a new cloned Sprite Object.
</div>
<h2>Methods</h2>
<h3>[method:Sprite clone]()</h3>
<div>
Clone a Sprite Object.
Returns a clone of this Sprite object and its descendants.
</div>
<h2>Source</h2>
[link:https://github.com/mrdoob/three.js/blob/master/src/[path].js src/[path].js]
......
......@@ -123,11 +123,6 @@
<div>Default is 4. The maximum number of MorphNormals allowed in a shader. Keep in mind that the standard materials only allow 4 MorphNormals. </div>
<h3>[property:Boolean autoScaleCubemaps]</h3>
<div>Default is true. If set, then Cubemaps are scaled, when they are bigger than the maximum size, to make sure that they aren't bigger than the maximum size.</div>
<h3>[property:Object info]</h3>
<div>An object with a series of statistical information about the graphics board memory and the rendering process. Useful for debugging or just for the sake of curiosity. The object contains the following fields:</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>
......@@ -23,7 +23,7 @@
<h2>Methods</h2>
<h3>[method:null render]([page:Scene scene], [page:Camera camera], [page:Number viewportWidth], [page:Number viewportHeight])</h3>
<h3>[method:null render]( [page:Scene scene], [page:Camera camera], [page:Number viewportWidth], [page:Number viewportHeight] )</h3>
<div>
scene -- The scene to render. <br />
camera -- The camera to render. <br />
......
<!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>
......@@ -23,7 +23,7 @@
<h2>Methods</h2>
<h3>[method:null render]([page:Scene scene], [page:Camera camera])</h3>
<h3>[method:null render]( [page:Scene scene], [page:Camera camera] )</h3>
<div>
scene -- The scene to render. <br />
camera -- The camera to render.
......
<!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>
......@@ -16,7 +16,7 @@
<h2>Constructor</h2>
<h3>[name]( [page:Integer hex], [page:Float density])</h3>
<h3>[name]( [page:Integer hex], [page:Float density] )</h3>
<div>The hex parameter is passed to the [page:Color] constructor to set the color property. Hex can be a hexadecimal integer or a CSS-style string.</div>
<h2>Properties</h2>
......
<!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>
......@@ -20,7 +20,7 @@
<h2>Constructor</h2>
<h3>[name]([page:Array mipmaps], [page:Number width], [page:Number height], [page:Number format], [page:Number type], [page:Number mapping], [page:Number wrapS], [page:Number wrapT], [page:Number magFilter], [page:Number minFilter], [page:Number anisotropy])</h3>
<h3>[name]( [page:Array mipmaps], [page:Number width], [page:Number height], [page:Number format], [page:Number type], [page:Number mapping], [page:Number wrapS], [page:Number wrapT], [page:Number magFilter], [page:Number minFilter], [page:Number anisotropy] )</h3>
<div>
mipmaps -- The mipmaps array should contains objects with data, width and height. The mipmaps should be from of the correct format and type. <br />
width -- The width of the biggest mipmap<br />
......
......@@ -143,12 +143,12 @@
<h3>[page:EventDispatcher EventDispatcher] methods are available on this class.</h3>
<h3>.clone([page:Texture texture])</h3>
<h3>[method:Material clone]( [page:Texture texture] )</h3>
<div>
Make copy of texture. Note this is not a "deep copy", the image is shared.
</div>
<h3>.dispose()</h3>
<h3>[method:null dispose]()</h3>
<div>
Call [page:EventDispatcher EventDispatcher].dispatchEvent with a 'dispose' event type.
</div>
......
......@@ -114,10 +114,9 @@ var list = {
[ "LineSegments", "api/objects/LineSegments" ],
[ "LOD", "api/objects/LOD" ],
[ "Mesh", "api/objects/Mesh" ],
[ "MorphAnimMesh", "api/objects/MorphAnimMesh" ],
[ "Points", "api/objects/Points" ],
[ "SkinnedMesh", "api/objects/SkinnedMesh" ],
[ "Skeleton", "api/objects/Skeleton" ],
[ "SkinnedMesh", "api/objects/SkinnedMesh" ],
[ "Sprite", "api/objects/Sprite" ]
],
......@@ -196,10 +195,10 @@ var list = {
[ "BoxGeometry", "api/extras/geometries/BoxGeometry" ],
[ "CircleBufferGeometry", "api/extras/geometries/CircleBufferGeometry" ],
[ "CircleGeometry", "api/extras/geometries/CircleGeometry" ],
[ "CylinderBufferGeometry", "api/extras/geometries/CylinderBufferGeometry" ],
[ "CylinderGeometry", "api/extras/geometries/CylinderGeometry" ],
[ "ConeBufferGeometry", "api/extras/geometries/ConeBufferGeometry" ],
[ "ConeGeometry", "api/extras/geometries/ConeGeometry" ],
[ "CylinderBufferGeometry", "api/extras/geometries/CylinderBufferGeometry" ],
[ "CylinderGeometry", "api/extras/geometries/CylinderGeometry" ],
[ "DodecahedronGeometry", "api/extras/geometries/DodecahedronGeometry" ],
[ "ExtrudeGeometry", "api/extras/geometries/ExtrudeGeometry" ],
[ "IcosahedronGeometry", "api/extras/geometries/IcosahedronGeometry" ],
......
......@@ -35,12 +35,14 @@
<script src="../examples/js/loaders/BabylonLoader.js"></script>
<script src="../examples/js/loaders/ColladaLoader2.js"></script>
<script src="../examples/js/loaders/FBXLoader.js"></script>
<script src="../examples/js/loaders/GLTFLoader.js"></script>
<script src="../examples/js/loaders/KMZLoader.js"></script>
<script src="../examples/js/loaders/MD2Loader.js"></script>
<script src="../examples/js/loaders/OBJLoader.js"></script>
<script src="../examples/js/loaders/PlayCanvasLoader.js"></script>
<script src="../examples/js/loaders/PLYLoader.js"></script>
<script src="../examples/js/loaders/STLLoader.js"></script>
<script src="../examples/js/loaders/TGALoader.js"></script>
<script src="../examples/js/loaders/UTF8Loader.js"></script>
<script src="../examples/js/loaders/VRMLLoader.js"></script>
<script src="../examples/js/loaders/VTKLoader.js"></script>
......@@ -297,9 +299,12 @@
switch ( event.keyCode ) {
case 8:
case 8: // backspace
event.preventDefault(); // prevent browser back
case 46: // delete
var object = editor.selected;
if ( confirm( 'Delete ' + object.name + '?' ) === false ) return;
......@@ -320,22 +325,25 @@
editor.undo();
}
break;
case 87: // Register W for translation transform mode
editor.signals.transformModeChanged.dispatch( 'translate' );
break;
case 69: // Register E for rotation transform mode
editor.signals.transformModeChanged.dispatch( 'rotate' );
break;
case 82: // Register R for scaling transform mode
editor.signals.transformModeChanged.dispatch( 'scale' );
break;
}
......
......@@ -155,6 +155,25 @@ var Loader = function ( editor ) {
break;
case 'gltf':
reader.addEventListener( 'load', function ( event ) {
var contents = event.target.result;
var json = JSON.parse( contents );
var loader = new THREE.GLTFLoader();
var collada = loader.parse( json );
collada.scene.name = filename;
editor.execute( new AddObjectCommand( collada.scene ) );
}, false );
reader.readAsText( file );
break;
case 'js':
case 'json':
......
......@@ -104,7 +104,7 @@ Menubar.Edit = function ( editor ) {
var option = new UI.Row();
option.setClass( 'option' );
option.setTextContent( 'Delete' );
option.setTextContent( 'Delete (Del)' );
option.onClick( function () {
var object = editor.selected;
......
......@@ -182,7 +182,7 @@ Sidebar.Scene = function ( editor ) {
var object = objects[ i ];
var option = buildOption( object, true );
option.style.marginLeft = ( pad * 10 ) + 'px';
option.style.paddingLeft = ( pad * 10 ) + 'px';
options.push( option );
addObjects( object.children, pad + 1 );
......
......@@ -14,21 +14,21 @@ var Toolbar = function ( editor ) {
// translate / rotate / scale
var translate = new UI.Button( 'translate' ).onClick( function () {
var translate = new UI.Button( 'translate ( w )' ).onClick( function () {
signals.transformModeChanged.dispatch( 'translate' );
} );
buttons.add( translate );
var rotate = new UI.Button( 'rotate' ).onClick( function () {
var rotate = new UI.Button( 'rotate ( e )' ).onClick( function () {
signals.transformModeChanged.dispatch( 'rotate' );
} );
buttons.add( rotate );
var scale = new UI.Button( 'scale' ).onClick( function () {
var scale = new UI.Button( 'scale ( r )' ).onClick( function () {
signals.transformModeChanged.dispatch( 'scale' );
......
......@@ -75,7 +75,7 @@ var Viewport = function ( editor ) {
var object = transformControls.object;
if ( object !== null ) {
if ( object !== undefined ) {
switch ( transformControls.getMode() ) {
......@@ -364,8 +364,7 @@ var Viewport = function ( editor ) {
if ( object !== null ) {
if ( object.geometry !== undefined &&
object instanceof THREE.Sprite === false ) {
if ( object.geometry !== undefined ) {
selectionBox.update( object );
selectionBox.visible = true;
......
......@@ -1045,8 +1045,6 @@ UI.Button = function ( value ) {
UI.Element.call( this );
var scope = this;
var dom = document.createElement( 'button' );
dom.className = 'Button';
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
......@@ -21,8 +21,8 @@ THREE.ParallaxBarrierEffect = function ( renderer ) {
uniforms: {
"mapLeft": { type: "t", value: _renderTargetL.texture },
"mapRight": { type: "t", value: _renderTargetR.texture }
"mapLeft": { value: _renderTargetL.texture },
"mapRight": { value: _renderTargetR.texture }
},
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册