diff --git a/docs/api/extras/core/Gyroscope.html b/docs/api/extras/core/Gyroscope.html index 99bb7bb78368558e28960d85d8cf9c3e658a581e..3a492009a70e0a036e316fdad674bd5b97236c14 100644 --- a/docs/api/extras/core/Gyroscope.html +++ b/docs/api/extras/core/Gyroscope.html @@ -11,23 +11,26 @@

[name]

-
todo
- +
An Object3d that rotates independently of its parent objects, but keeps the position and scale.
+ + + var root = new THREE.Group(); + var gyro = new THREE.Gyroscope(); + var cube = new THREE.Mesh( geometry, material ); + + root.add( gyro ) + gyro.add( cube ) + + cube.position.x = 10; + root.rotation.y = Math.PI; + + // The cube will have changed its position but maintained its orientation +

Constructor

[name]()

-
- todo -
- - -

Properties

- - -

Methods

-

Source

diff --git a/docs/api/extras/core/Shape.html b/docs/api/extras/core/Shape.html index 72d5bae5c7dd4607e46ca1ccb6f608ec79c37ffa..780992970027a1a1ae2bcb778805e2dc13999777 100644 --- a/docs/api/extras/core/Shape.html +++ b/docs/api/extras/core/Shape.html @@ -11,16 +11,43 @@

[name]

-
Defines a 2d shape plane using paths.
+
+ Defines an arbitrary 2d shape plane using paths with optional holes. It can be used with [page:ExtrudeGeometry], + [page:ShapeGeometry], to get points, or to get triangulated faces. +
+ + + var heartShape = new THREE.Shape(); + + heartShape.moveTo( 25, 25 ); + heartShape.bezierCurveTo( 25, 25, 20, 0, 0, 0 ); + heartShape.bezierCurveTo( 30, 0, 30, 35,30,35 ); + heartShape.bezierCurveTo( 30, 55, 10, 77, 25, 95 ); + heartShape.bezierCurveTo( 60, 77, 80, 55, 80, 35 ); + heartShape.bezierCurveTo( 80, 35, 80, 0, 50, 0 ); + heartShape.bezierCurveTo( 35, 0, 25, 25, 25, 25 ); + + var extrudeSettings = { amount: 8, bevelEnabled: true, bevelSegments: 2, steps: 2, bevelSize: 1, bevelThickness: 1 }; + + var geometry = new THREE.ExtrudeGeometry( shape, extrudeSettings ); + + var mesh = new THREE.Mesh( geometry, new THREE.MeshPhongMaterial() ); + + +

Examples

+ +
+ [example:webgl_geometry_shapes geometry / shapes ]
+ [example:webgl_geometry_extrude_shapes geometry / extrude / shapes ]
+ [example:webgl_geometry_extrude_shapes2 geometry / extrude / shapes2 ]
+ [example:webgl_particles_shapes particles / shapes ] +

Constructor

[name]()

-
- todo -

Properties

@@ -28,66 +55,67 @@

[property:array holes]

- todo + An array of [page:Path paths] that define the holes in the shape.

Methods

-

[method:todo makeGeometry]([page:todo options])

+

[method:ShapeGeometry makeGeometry]([page:Object options])

- options -- The options passed as the second argument to [page:ShapeGeometry ShapeGeometry] + options -- This is passed as the second argument to [page:ShapeGeometry ShapeGeometry]
Convenience method to return ShapeGeometry
-

[method:todo extractAllPoints]([page:todo divisions])

+

[method:Array extractAllPoints]([page:Integer divisions])

- divisions -- todo + divisions -- The number of divisions to create on the shape
Get points of shape and holes (keypoints based on segments parameter)
-

[method:todo extrude]([page:todo options])

+

[method:ExtrudeGeometry extrude]([page:Object options])

- options -- The options passed as the second argument to [page:ExtrudeGeometry ExtrudeGeometry] + options -- This is passed as the second argument to [page:ExtrudeGeometry ExtrudeGeometry]
Convenience method to return ExtrudeGeometry
-

[method:todo extractPoints]([page:todo divisions])

+

[method:Object extractPoints]([page:Integer divisions])

- divisions -- todo + divisions -- The number of divisions to create on the shape
- todo + Returns an object with a *shape* and *holes* property that each reference an array of [page:Vector2 Vector2s].
-

[method:todo extractAllSpacedPoints]([page:todo divisions])

+

[method:Object extractAllSpacedPoints]([page:Integer divisions])

- divisions -- todo + divisions -- The number of divisions to create on the shape
- todo + Returns an object with a *shape* and *holes* property that each reference an array of [page:Vector2 Vector2s]. The + points will all be equally spaced along the shape.
-

[method:todo getPointsHoles]([page:todo divisions])

+

[method:Array getPointsHoles]([page:Integer divisions])

- divisions -- todo + divisions -- The number of divisions to create on the shape
- Get points of holes + Get an array of [page Vector2 Vector2s] that represent the holes in the shape.
-

[method:todo getSpacedPointsHoles]([page:todo divisions])

+

[method:Array getSpacedPointsHoles]([page:Integer divisions])

- divisions -- todo + divisions -- The number of divisions to create on the shape
- Get points of holes (spaced by regular distance) + Get an array of equally spaced [page Vector2 Vector2s] that represent the holes in the shape.

Source

diff --git a/docs/api/extras/helpers/PointLightHelper.html b/docs/api/extras/helpers/PointLightHelper.html index 320d1204655a6e5cc9523ccefe306bb41dfcf2e4..49498a1641d9248b6edd58c70bf05bed5bc3fcfc 100644 --- a/docs/api/extras/helpers/PointLightHelper.html +++ b/docs/api/extras/helpers/PointLightHelper.html @@ -11,7 +11,7 @@

[name]

-
This display a helper for a pointLight
+
This displays a helper object for a [page:PointLight]

Example

@@ -29,34 +29,26 @@

Constructor

-

[name]([page:todo light], [page:todo sphereSize])

+

[name]([page:PointLight light], [page:Float sphereSize])

- light -- todo
- sphereSize -- todo -
-
- todo + light -- The [page:PointLight] to display.
+ sphereSize -- The size of the sphere helper

Properties

-

[property:Mesh lightSphere]

-
- todo -
-

[property:PointLight light]

- todo + The [page:PointLight] that is being represented.

Methods

-

[method:todo update]()

+

[method:null update]()

- todo + Updates the light helper.

Source

diff --git a/docs/api/extras/helpers/SpotLightHelper.html b/docs/api/extras/helpers/SpotLightHelper.html index 1d833e026847f06631fceea9661fa1055221a0e3..5760ee99cdcb20610fface28593ba143b2671405 100644 --- a/docs/api/extras/helpers/SpotLightHelper.html +++ b/docs/api/extras/helpers/SpotLightHelper.html @@ -11,46 +11,45 @@

[name]

-
todo
+
This displays a cylinder helper object for a [page:SpotLight]
+ + +

Example

+ + + var spotLight = new THREE.SpotLight( 0xffffff ); + spotLight.position.set( 10, 10, 10 ); + scene.add( spotLight ); + + var spotLightHelper = new THREE.SpotLightHelper( spotLight ); + scene.add( spotLightHelper ); +

Constructor

-

[name]([page:todo light], [page:todo sphereSize])

-
- light -- todo
- sphereSize -- todo -
+

[name]([page:SpotLight light])

- todo + light -- The [page:SpotLight] to display

Properties

-

[property:Mesh lightSphere]

-
- todo -
-

[property:SpotLight light]

- todo + The [page:SpotLight]
-

[property:Mesh lightCone]

-
- todo -

Methods

-

[method:todo update]()

+

[method:null update]()

- todo + Updates the light helper.

Source

diff --git a/docs/api/extras/objects/MorphBlendMesh.html b/docs/api/extras/objects/MorphBlendMesh.html index 14f6b69a53b1c1a1c0d7dab655047a265631a827..b968fc2168f1ffe2f95c5ba6f4045f672ae4dedf 100644 --- a/docs/api/extras/objects/MorphBlendMesh.html +++ b/docs/api/extras/objects/MorphBlendMesh.html @@ -11,148 +11,165 @@

[name]

-
todo
+
A mesh that can blend together multiple animated morph targets.
+ +

Example

+
+ [example:webgl_morphtargets_md2_control morphtargets / md2 / controll]

Constructor

-

[name]([page:todo geometry], [page:todo material])

-
- geometry -- todo
- material -- todo -
+

[name]([page:Geometry geometry], [page:Material material])

- todo + geometry — An instance of [page:Geometry].
+ material — An instance of [page:Material] (optional).
-

Properties

[property:object animationsMap]

- todo + An object of named animations as added by [page:MorphBlendMesh.createAnimation].

[property:array animationsList]

- todo + The list of animations as added by [page:MorphBlendMesh.createAnimation].

Methods

-

[method:todo setAnimationWeight]([page:todo name], [page:todo weight])

+

[method:null setAnimationWeight]([page:String name], [page:Float weight])

- name -- todo
- weight -- todo + name -- The name of the animation
+ weight -- Weight of the animation, typically 0-1
- todo + Set the weight of how much this animation will apply to the overall morph. 0 is off, 1 is full weight.
-

[method:todo setAnimationFPS]([page:todo name], [page:todo fps])

+

[method:null setAnimationFPS]([page:String name], [page:Float fps])

- name -- todo
- fps -- todo + name -- The name of the animation
+ fps -- The number of frames (morphTargets) per second
- todo + A frame is typically 1 morph target.
-

[method:todo createAnimation]([page:todo name], [page:todo start], [page:todo end], [page:todo fps])

+

[method:null createAnimation]([page:String name], [page:Integer start], [page:Integer end], [page:Float fps])

- name -- todo
- start -- todo
- end -- todo
- fps -- todo + name -- The name of the animation
+ start -- The starting frame (morph)
+ end -- The ending frame (morph)
+ fps -- How many frames (morphs) to play per second
- todo + Creates an animation object that gets added to both the [page:MorphBlendMesh.animationsMap animationsMap] and + [page:MorphBlendMesh.animationsList animationsList].

+ + Animation object:

+ startFrame -- Starting frame
+ endFrame -- Ending frame
+ length -- The number of frames
+ fps -- The frames per second
+ duration -- The length of the animation in seconds
+ lastFrame -- The previous frame that was played
+ currentFrame -- The current frame
+ active -- Whether or not the animation is being played
+ time -- The time in seconds of the animation
+ direction -- Which way to play the animation
+ weight -- The weight of the animation
+ directionBackwards -- Is playing backwards
+ mirroredLoop -- Loop back and forth
-

[method:todo playAnimation]([page:todo name])

+

[method:null playAnimation]([page:String name])

- name -- todo + name -- The name of the animation
- todo + Sets the animation to active and animation time to 0
-

[method:todo update]([page:todo delta])

+

[method:null update]([page:Float delta])

- delta -- todo + delta -- Time in seconds
- todo + Updates and plays the animation
-

[method:todo autoCreateAnimations]([page:todo fps])

+

[method:null autoCreateAnimations]([page:Float fps])

- fps -- todo + fps -- Frames per second
- todo + Goes through the geometry's morphTargets and generates animations based on the morphTargets' names. Names + are of the form "walk_01", "walk_02", "walk_03", etc or "run001", "run002", "run003".
-

[method:todo setAnimationDuration]([page:todo name], [page:todo duration])

+

[method:null setAnimationDuration]([page:String name], [page:Float duration])

- name -- todo
- duration -- todo + name -- The name of the animation
+ duration -- How long in seconds to play the animation
- todo + Updates the animation object with proper values to update the duration.
-

[method:todo setAnimationDirectionForward]([page:todo name])

+

[method:null setAnimationDirectionForward]([page:String name])

- name -- todo + name -- The name of the animation
- todo + Sets the animation to play forwards
-

[method:todo getAnimationDuration]([page:todo name])

+

[method:null setAnimationDirectionBackward]([page:String name])

- name -- todo + name -- The name of the animation
- todo + Sets the animation to play backwards
-

[method:todo getAnimationTime]([page:todo name])

+

[method:Float getAnimationDuration]([page:String name])

- name -- todo + name -- The name of the animation
- todo + Returns the duration in seconds of the animation. Returns -1 if it can't be found.
-

[method:todo setAnimationDirectionBackward]([page:todo name])

+

[method:Float getAnimationTime]([page:String name])

- name -- todo + name -- The name of the animation
- todo + Returns the current time position of the animation.
-

[method:todo setAnimationTime]([page:todo name], [page:todo time])

+

[method:null setAnimationTime]([page:String name], [page:Float time])

- name -- todo
- time -- todo + name -- The name of the animation
+ time -- The time in seconds
- todo + Sets the current time position of the animation
-

[method:todo stopAnimation]([page:todo name])

+

[method:null stopAnimation]([page:String name])

- name -- todo + name -- The name of the animation
- todo + Stops the playback of the animation

Source

diff --git a/docs/api/lights/SpotLight.html b/docs/api/lights/SpotLight.html index 8a0c986f80e244638fb2108129545a71e01b1162..5ec43829d74b85481bf981f8f7ddd2395c1a5095 100644 --- a/docs/api/lights/SpotLight.html +++ b/docs/api/lights/SpotLight.html @@ -18,38 +18,45 @@

Example

- // white spotlight shining from the side, casting shadow + + // white spotlight shining from the side, casting shadow -var spotLight = new THREE.SpotLight( 0xffffff ); -spotLight.position.set( 100, 1000, 100 ); + var spotLight = new THREE.SpotLight( 0xffffff ); + spotLight.position.set( 100, 1000, 100 ); -spotLight.castShadow = true; + spotLight.castShadow = true; -spotLight.shadowMapWidth = 1024; -spotLight.shadowMapHeight = 1024; + spotLight.shadowMapWidth = 1024; + spotLight.shadowMapHeight = 1024; -spotLight.shadowCameraNear = 500; -spotLight.shadowCameraFar = 4000; -spotLight.shadowCameraFov = 30; + spotLight.shadowCameraNear = 500; + spotLight.shadowCameraFar = 4000; + spotLight.shadowCameraFov = 30; -scene.add( spotLight ); + scene.add( spotLight ); + + +
+ [example:webgl_materials_bumpmap materials / bumpmap]
+ [example:webgl_shading_physical shading / physical]
+ [example:webgl_shadowmap shadowmap]
+ [example:webgl_shadowmap_viewer shadowmap / performance]
+ [example:webgl_shadowmap_viewer shadowmap / viewer] +

Constructor

-

[name]([page:Integer hex], [page:Float intensity], [page:todo distance], [page:todo angle], [page:todo exponent])

+

[name]([page:Integer hex], [page:Float intensity], [page:Float distance], [page:Radians angle], [page:Float exponent], [page:Float decay])

[page:Integer hex] — Numeric value of the RGB component of the color.
[page:Float intensity] — Numeric value of the light's strength/intensity.
- distance -- Maximum distance from origin where light will shine whose intensity is attenuated linearly based on distance from origin.
- angle -- Maximum angle of light dispersion from its direction whose upper bound is Math.PI/2.
- exponent -- todo -
-
- todo + [page:Float distance] -- Maximum distance from origin where light will shine whose intensity is attenuated linearly based on distance from origin.
+ [page:Radians angle] -- Maximum angle of light dispersion from its direction whose upper bound is Math.PI/2.
+ [page:Float exponent] -- Rapidity of the falloff of light from its target direction.
+ [page:Float decay] -- The amount the light dims along the distance of the light.
-

Properties

@@ -79,9 +86,16 @@ scene.add( spotLight );

[property:Float exponent]

- Rapidity of the falloff of light from its target direction.
+ Rapidity of the falloff of light from its target direction. A lower value spreads out the light, while a higher + focuses it towards the center.
Default — *10.0*.
+ +

[property:Float decay]

+
+ The amount the light dims along the distance of the light
+ Default — *1*. +

[property:Boolean castShadow]

diff --git a/docs/api/objects/Bone.html b/docs/api/objects/Bone.html index 3a455d5a9a15fab75fcc7538569988b13455d4a3..c65ab4c42bd9014ea4442f744e9de14832b3e8b3 100644 --- a/docs/api/objects/Bone.html +++ b/docs/api/objects/Bone.html @@ -11,7 +11,7 @@

[name]

-
A bone which is part of a SkinnedMesh.
+
A bone which is part of a [page:SkinnedMesh].

Constructor

@@ -27,28 +27,11 @@

Properties

-

[property:Matrix4 skinMatrix]

-
- The matrix of the bone. -
-

[property:SkinnedMesh skin]

The skin that contains this bone.
-

Methods

- - - -

[method:todo update]([page:Matrix4 parentSkinMatrix], [page:boolean forceUpdate])

-
- parentSkinMatrix -- the matrix of the parent bone.
- forceUpdate -- force the update of the skinmatrix. -
-
- This updates the matrix of the bone and the matrices of its children. -

Source

diff --git a/docs/scenes/js/geometry.js b/docs/scenes/js/geometry.js index 64781cc4f6b5772e2a7898853d1515a0d9ba24cb..04a1d5c683e98126a2b769132153cbdaaaf15008 100644 --- a/docs/scenes/js/geometry.js +++ b/docs/scenes/js/geometry.js @@ -80,6 +80,9 @@ var constants = { function updateGroupGeometry( mesh, geometry ) { + mesh.children[0].geometry.dispose(); + mesh.children[1].geometry.dispose(); + mesh.children[0].geometry = geometry mesh.children[1].geometry = geometry.clone()