diff --git a/docs/api/animation/AnimationAction.html b/docs/api/animation/AnimationAction.html index c4c6cfc1e54065129c60d821cfc417cec0408e0e..b4ce7ab1f94dda42825b8a9cce69081708d8de3b 100644 --- a/docs/api/animation/AnimationAction.html +++ b/docs/api/animation/AnimationAction.html @@ -10,7 +10,7 @@

[name]

-
+

AnimationActions schedule the performance of the animations which are stored in [page:AnimationClip AnimationClips].

@@ -18,28 +18,28 @@ For an overview of the different elements of the three.js animation system see the "Animation System" article in the "Next Steps" section of the manual. -

+

Constructor

[name]( [param:AnimationMixer mixer], [param:AnimationClip clip], [param:Object3D localRoot] )

-
+

[page:AnimationMixer mixer] - the *AnimationMixer* that is controlled by this action.
[page:AnimationClip clip] - the *AnimationClip* that holds the animation data for this action.
[page:Object3D localRoot] - the root object on which this action is performed.

Note: Instead of calling this constructor directly you should instantiate an AnimationAction with [page:AnimationMixer.clipAction] since this method provides caching for better performance. -

+

Properties

[property:Boolean clampWhenFinished]

-
+

If *clampWhenFinished* is set to true the animation will automatically be [page:.paused paused] on its last frame.

@@ -51,10 +51,10 @@ Note: *clampWhenFinished* has no impact if the action is interrupted (it has only an effect if its last loop has really finished). -

+

[property:Boolean enabled]

-
+

Setting *enabled* to *false* disables this action, so that it has no impact. Default is *true*.

When the action is re-enabled, the animation continues from its current [page:.time time] @@ -65,10 +65,10 @@ [page:.paused paused] is *false*, this action has not been deactivated in the meantime (by executing a [page:.stop stop] or [page:.reset reset] command), and neither [page:.weight weight] nor [page:.timeScale timeScale] is 0. -

+

[property:Number loop]

-
+

The looping mode (can be changed with [page:.setLoop setLoop]). Default is [page:Animation THREE.LoopRepeat] (with an infinite number of [page:.repetitions repetitions])

@@ -78,33 +78,33 @@ each time jumping from the end of the clip directly to its beginning,
[page:Animation THREE.LoopPingPong] - playing the clip with the choosen number of *repetitions*, alternately playing forward and backward. -

+

[property:Boolean paused]

-
+

Setting *paused* to *true* pauses the execution of the action by setting the effective time scale to 0. Default is *false*.

-

+

[property:Number repetitions]

-
+

The number of repetitions of the performed [page:AnimationClip] over the course of this action. Can be set via [page:.setLoop setLoop]. Default is *Infinity*.

Setting this number has no effect, if the [page:.loop loop mode] is set to [page:Animation THREE.LoopOnce]. -

+

[property:Number time]

-
+

The local time of this action (in seconds, starting with 0).

The value gets clamped or wrapped to 0...clip.duration (according to the loop state). It can be scaled relativly to the global mixer time by changing [page:.timeScale timeScale] (using [page:.setEffectiveTimeScale setEffectiveTimeScale] or [page:.setDuration setDuration]).
-

+

[property:Number timeScale]

-
+

Scaling factor for the [page:.time time]. A value of 0 causes the animation to pause. Negative values cause the animation to play backwards. Default is 1.

Properties/methods concerning *timeScale* (respectively *time*) are: @@ -116,10 +116,10 @@ [page:.stopWarping stopWarping], [page:.syncWith syncWith], [page:.warp warp]. -

+

[property:Number weight]

-
+

The degree of influence of this action (in the interval [0, 1]). Values between 0 (no impact) and 1 (full impact) can be used to blend between several actions. Default is 1.

Properties/methods concerning *weight* are: @@ -131,24 +131,24 @@ [page:.getEffectiveWeight getEffectiveWeight], [page:.setEffectiveWeight setEffectiveWeight], [page:.stopFading stopFading]. -

+

[property:Boolean zeroSlopeAtEnd]

-
+

Enables smooth interpolation without separate clips for start, loop and end. Default is *true*. -

+

[property:Boolean zeroSlopeAtStart]

-
+

Enables smooth interpolation without separate clips for start, loop and end. Default is *true*. -

+

Methods

[method:AnimationAction crossFadeFrom]( [param:AnimationAction fadeOutAction], [param:Number durationInSeconds], [param:Boolean warpBoolean] )

-
+

Causes this action to [page:.fadeIn fade in], fading out another action simultaneously, within the passed time interval. This method can be chained.

@@ -157,65 +157,65 @@ Note: Like with *fadeIn*/*fadeOut*, the fading starts/ends with a weight of 1. -

+

[method:AnimationAction crossFadeTo]( [param:AnimationAction fadeInAction], [param:Number durationInSeconds], [param:Boolean warpBoolean] )

-
+

Causes this action to [page:.fadeOut fade out], fading in another action simultaneously, within the passed time interval. This method can be chained.

If warpBoolean is true, additional [page:.warp warping] (gradually changes of the time scales) will be applied.

Note: Like with *fadeIn*/*fadeOut*, the fading starts/ends with a weight of 1. -

+

[method:AnimationAction fadeIn]( [param:Number durationInSeconds] )

-
+

Increases the [page:.weight weight] of this action gradually from 0 to 1, within the passed time interval. This method can be chained. -

+

[method:AnimationAction fadeOut]( [param:Number durationInSeconds] )

-
+

Decreases the [page:.weight weight] of this action gradually from 1 to 0, within the passed time interval. This method can be chained. -

+

[method:Number getEffectiveTimeScale]()

-
+

Returns the effective time scale (considering the current states of warping and [page:.paused paused]). -

+

[method:number getEffectiveWeight]()

-
+

Returns the effective weight (considering the current states of fading and [page:.enabled enabled]). -

+

[method:AnimationClip getClip]()

-
+

Returns the clip which holds the animation data for this action. -

+

[method:AnimationMixer getMixer]()

-
+

Returns the mixer which is responsible for playing this action. -

+

[method:Object3D getRoot]()

-
+

Returns the root object on which this action is performed. -

+

[method:AnimationAction halt]( [param:Number durationInSeconds] )

-
+

Decelerates this animation's speed to 0 by decreasing [page:.timeScale timeScale] gradually (starting from its current value), within the passed time interval. This method can be chained. -

+

[method:Boolean isRunning]()

-
+

Returns true if the action’s [page:.time time] is currently running.

In addition to being activated in the mixer (see [page:.isScheduled isScheduled]) the following conditions must be fulfilled: @@ -225,17 +225,17 @@ Note: *isRunning* being true doesn’t necessarily mean that the animation can actually be seen. This is only the case, if [page:.weight weight] is additionally set to a non-zero value. -

+

[method:Boolean isScheduled]()

-
+

Returns true, if this action is activated in the mixer.

Note: This doesn’t necessarily mean that the animation is actually running (compare the additional conditions for [page:.isRunning isRunning]). -

+

[method:AnimationAction play]()

-
+

Tells the mixer to activate the action. This method can be chained.

Note: Activating this action doesn’t necessarily mean that the animation starts immediately: @@ -244,10 +244,10 @@ executed first. Some other settings ([page:.paused paused]=true, [page:.enabled enabled]=false, [page:.weight weight]=0, [page:.timeScale timeScale]=0) can prevent the animation from playing, too. -

+

[method:AnimationAction reset]()

-
+

Resets the action. This method can be chained.

This method sets [page:.paused paused] to false, [page:.enabled enabled] to true, @@ -256,16 +256,16 @@ Note: .*reset* is always called by [page:.stop stop], but .*reset* doesn’t call .*stop* itself. This means: If you want both, resetting and stopping, don’t call .*reset*; call .*stop* instead. -

+

[method:AnimationAction setDuration]( [param:Number durationInSeconds] )

-
+

Sets the duration for a single loop of this action (by adjusting [page:.timeScale timeScale] and stopping any scheduled warping). This method can be chained. -

+

[method:AnimationAction setEffectiveTimeScale]( [param:Number timeScale] )

-
+

Sets the [page:.timeScale timeScale] and stops any scheduled warping. This method can be chained.

If [page:.paused paused] is false, the effective time scale (an internal property) will also be set @@ -274,10 +274,10 @@ Note: .*paused* will not be switched to *true* automatically, if .*timeScale* is set to 0 by this method. -

+

[method:AnimationAction setEffectiveWeight]( [param:Number weight] )

-
+

Sets the [page:.weight weight] and stops any scheduled fading. This method can be chained.

If [page:.enabled enabled] is true, the effective weight (an internal property) will also be set @@ -286,70 +286,70 @@ Note: .*enabled* will not be switched to *false* automatically, if .*weight* is set to 0 by this method. -

+

[method:AnimationAction setLoop]( [param:Number loopMode], [param:Number repetitions] )

-
+

Sets the [page:.loop loop mode] and the number of [page:.repetitions repetitions]. This method can be chained. -

+

[method:AnimationAction startAt]( [param:Number startTimeInSeconds] )

-
+

Defines the time for a delayed start (usually passed as [page:AnimationMixer.time] + deltaTimeInSeconds). This method can be chained.

Note: The animation will only start at the given time, if .*startAt* is chained with [page:.play play], or if the action has already been activated in the mixer (by a previous call of .*play*, without stopping or resetting it in the meantime). -

+

[method:AnimationAction stop]()

-
+

Tells the mixer to deactivate this action. This method can be chained.

The action will be immediately stopped and completely [page:.reset reset].

Note: You can stop all active actions on the same mixer in one go via [page:AnimationMixer.stopAllAction mixer.stopAllAction]. -

+

[method:AnimationAction stopFading]()

-
+

Stops any scheduled [page:.fadeIn fading] which is applied to this action. This method can be chained. -

+

[method:AnimationAction stopWarping]()

-
+

Stops any scheduled [page:.warp warping] which is applied to this action. This method can be chained. -

+

[method:AnimationAction syncWith]( [param:AnimationAction otherAction] )

-
+

Synchronizes this action with the passed other action. This method can be chained.

Synchronizing is done by setting this action’s [page:.time time] and [page:.timeScale timeScale] values to the corresponding values of the other action (stopping any scheduled warping).

Note: Future changes of the other action's *time* and *timeScale* will not be detected. -

+

[method:AnimationAction warp]( [param:Number startTimeScale], [param:Number endTimeScale], [param:Number durationInSeconds] )

-
+

Changes the playback speed, within the passed time interval, by modifying [page:.timeScale timeScale] gradually from *startTimeScale* to *endTimeScale*. This method can be chained. -

+

Events

-
+

There are two events indicating when a single loop of the action respectively the entire action has finished. You can react to them with: -

+

mixer.addEventListener( 'loop', function( e ) { …} ); // properties of e: type, action and loopDelta mixer.addEventListener( 'finished', function( e ) { …} ); // properties of e: type, action and direction diff --git a/docs/api/animation/AnimationClip.html b/docs/api/animation/AnimationClip.html index c4720d384db480c50cc0841a2084682923cfbb06..e9b9a6717e317576302794ad559f125f0a608e8b 100644 --- a/docs/api/animation/AnimationClip.html +++ b/docs/api/animation/AnimationClip.html @@ -10,19 +10,19 @@

[name]

-
+

An AnimationClip is a reusable set of keyframe tracks which represent an animation.

For an overview of the different elements of the three.js animation system see the "Animation System" article in the "Next Steps" section of the manual. -

+

Constructor

[name]( [param:String name], [param:Number duration], [param:Array tracks] )

-
+

[page:String name] - a name for this clip.
[page:Number duration] - the duration of this clip (in seconds). If a negative value is passed, the duration will be calculated from the passed *tracks* array.
@@ -34,98 +34,98 @@ [page:.CreateClipsFromMorphTargetSequences CreateClipsFromMorphTargetSequences]) or from animation hierarchies ([page:.parseAnimation parseAnimation]) - if your model doesn't already hold AnimationClips in its geometry's animations array. -

+

Properties

[property:Number duration]

-
+

The duration of this clip (in seconds). This can be calculated from the [page:.tracks tracks] array via [page:.resetDuration resetDuration]. -

+

[property:String name]

-
+

A name for this clip. A certain clip can be searched via [page:.findByName findByName]. -

+

[property:Array tracks]

-
+

An array containing a [page:KeyframeTrack] for each property that are animated by this clip. -

+

[property:String uuid]

-
+

The [link:http://en.wikipedia.org/wiki/Universally_unique_identifier UUID] of this clip instance. It gets automatically assigned and shouldn't be edited. -

+

Methods

[method:AnimationClip optimize]()

-
+

Optimizes each track by removing equivalent sequential keys (which are common in morph target sequences). -

+

[method:null resetDuration]()

-
+

Sets the [page:.duration duration] of the clip to the duration of its longest [page:KeyframeTrack]. -

+

[method:AnimationClip trim]()

-
+

Trims all tracks to the clip's duration. -

+

Static Methods

[method:Array CreateClipsFromMorphTargetSequences]( [param:String name], [param:Array morphTargetSequence], [param:Number fps], [param:Boolean noLoop] )

-
+

Returns an array of new AnimationClips created from the [page:Geometry.morphTargets morph target sequences] of a geometry, trying to sort morph target names into animation-group-based patterns like "Walk_001, Walk_002, Run_001, Run_002 ..."

This method is called by the [page:JSONLoader] internally, and it uses [page:.CreateFromMorphTargetSequence CreateFromMorphTargetSequence]. -

+

[method:AnimationClip CreateFromMorphTargetSequence]( [param:String name], [param:Array morphTargetSequence], [param:Number fps], [param:Boolean noLoop] )

-
+

Returns a new AnimationClip from the passed [page:Geometry.morphTargets morph targets array] of a geometry, taking a name and the number of frames per second.

Note: The fps parameter is required, but the animation speed can be overridden in an *AnimationAction* via [page:AnimationAction.setDuration animationAction.setDuration]. -

+

[method:AnimationClip findByName]( [param:Object objectOrClipArray], [param:String name] )

-
+

Searches for an AnimationClip by name, taking as its first parameter either an array of AnimationClips, or a mesh or geometry that contains an array named "animations". -

+

[method:AnimationClip parse]( [param:Object json] )

-
+

Parses a JSON representation of a clip and returns an AnimationClip. -

+

[method:AnimationClip parseAnimation]( [param:Object animation], [param:Array bones] )

-
+

Parses the animation.hierarchy format and returns an AnimationClip. -

+

[method:Object toJSON]( [param:AnimationClip clip] )

-
+

Takes an AnimationClip and returns a JSON object. -

+

Source

diff --git a/docs/api/animation/AnimationMixer.html b/docs/api/animation/AnimationMixer.html index aeefd544f8ebcfd6db2fa2f7d214e483c35e6038..a996b8db50d351ad4c64dd9c81b8e0d4c0d4ed54 100644 --- a/docs/api/animation/AnimationMixer.html +++ b/docs/api/animation/AnimationMixer.html @@ -10,47 +10,47 @@

[name]

-
+

The AnimationMixer is a player for animations on a particular object in the scene. When multiple objects in the scene are animated independently, one AnimationMixer may be used for each object.

For an overview of the different elements of the three.js animation system see the "Animation System" article in the "Next Steps" section of the manual. -

+

Constructor

[name]( [param:Object3D rootObject] )

-
+

[page:Object3D rootObject] - the object whose animations shall be played by this mixer.
-

+

Properties

[property:Number time]

-
+

The global mixer time (in seconds; starting with 0 on the mixer's creation). -

+

[property:Number timeScale]

-
+

A scaling factor for the global [page:.time mixer time].

Note: Setting the mixer's timeScale to 0 and later back to 1 is a possibility to pause/unpause all actions that are controlled by this mixer. -

+

Methods

[method:AnimationAction clipAction]([param:AnimationClip clip], [param:Object3D optionalRoot])

-
+

Returns an [page:AnimationAction] for the passed clip, optionally using a root object different from the mixer's default root. The first parameter can be either an [page:AnimationClip] object or the name of an AnimationClip.

@@ -59,48 +59,48 @@ Note: Calling this method several times with the same parameters returns always the same clip instance. -

+

[method:AnimationAction existingAction]([param:AnimationClip clip], [param:Object3D optionalRoot])

-
+

Returns an existing [page:AnimationAction] for the passed clip, optionally using a root object different from the mixer's default root.

The first parameter can be either an [page:AnimationClip] object or the name of an AnimationClip. -

+

[method:Object3D getRoot]()

-
+

Returns this mixer's root object. -

+

[method:AnimationMixer stopAllAction]()

-
+

Deactivates all previously scheduled actions on this mixer. -

+

[method:AnimationMixer update]([param:Number deltaTimeInSeconds])

-
+

Advances the global mixer time and updates the animation.

This is usually done in the render loop, passing [page:Clock.getDelta clock.getDelta] scaled by the mixer's [page:.timeScale timeScale]). -

+

[method:null uncacheClip]([param:AnimationClip clip])

-
+

Deallocates all memory resources for a clip. -

+

[method:null uncacheRoot]([param:Object3D root])

-
+

Deallocates all memory resources for a root object. -

+

[method:null uncacheAction]([param:AnimationClip clip], [param:Object3D optionalRoot])

-
+

Deallocates all memory resources for an action. -

+

Source

diff --git a/docs/api/animation/AnimationObjectGroup.html b/docs/api/animation/AnimationObjectGroup.html index 72f79ca955ffb61b9c209d944f7d04a6752c44d2..e667ca92170c421a1b10735804faa915bcc47c89 100644 --- a/docs/api/animation/AnimationObjectGroup.html +++ b/docs/api/animation/AnimationObjectGroup.html @@ -10,29 +10,29 @@

[name]

-
A group of objects that receives a shared animation state.

+

A group of objects that receives a shared animation state.

For an overview of the different elements of the three.js animation system see the "Animation System" article in the "Next Steps" section of the manual. -

+

Usage:

-
+

Add objects you would otherwise pass as 'root' to the constructor or the [page:AnimationMixer.clipAction clipAction] method of [page:AnimationMixer AnimationMixer] and instead pass this object as 'root'.

Note that objects of this class appear as one object to the mixer, so cache control of the individual objects must be done on the group. -

+

Limitations

-
+

The animated properties must be compatible among all objects in the group.

A single property can either be controlled through a target group or directly, but not both. -

+

Constructor

@@ -46,35 +46,35 @@

[property:object stats]

-
+

An object that contains some informations of this *AnimationObjectGroup* (total number, number in use, number of bindings per object) -

+

[property:String uuid]

-
+

The [link:http://en.wikipedia.org/wiki/Universally_unique_identifier UUID] of this *AnimationObjectGroup*. It gets automatically assigned and shouldn't be edited. -

+

Methods

[method:null add]( [param:object obj1], [param:object obj2], [param:object obj3], ... )

-
+

Adds an arbitrary number of objects to this *AnimationObjectGroup*. -

+

[method:null remove]( [param:object obj1], [param:object obj2], [param:object obj3], ... )

-
+

Removes an arbitrary number of objects from this *AnimationObjectGroup*. -

+

[method:null uncache]( [param:object obj1], [param:object obj2], [param:object obj3], ... )

-
+

Deallocates all memory resources for the passed objects of this *AnimationObjectGroup*. -

+

Source

diff --git a/docs/api/animation/AnimationUtils.html b/docs/api/animation/AnimationUtils.html index 4757c182f390691766739ab0cd437149e0a78042..5bc51a61ca19c69760b617707cd857d6da25f976 100644 --- a/docs/api/animation/AnimationUtils.html +++ b/docs/api/animation/AnimationUtils.html @@ -10,43 +10,43 @@

[name]

-
+

An object with various functions to assist with animations, used internally. -

+

Methods

[method:Array arraySlice]( array, from, to )

-
+

This is the same as Array.prototype.slice, but also works on typed arrays. -

+

[method:Array convertArray]( array, type, forceClone )

-
+

Converts an array to a specific type. -

+

[method:Array flattenJSON]( jsonKeys, times, values, valuePropertyName )

-
+

Used for parsing AOS keyframe formats. -

+

[method:Array getKeyframeOrder]( times )

-
+

Returns an array by which times and values can be sorted. -

+

[method:Boolean isTypedArray]( object )

-
+

Returns *true* if the object is a typed array. -

+

[method:Array sortedArray]( values, stride, order )

-
+

Sorts the array previously returned by [page:AnimationUtils.getKeyframeOrder getKeyframeOrder]. -

+

Source

diff --git a/docs/api/animation/KeyframeTrack.html b/docs/api/animation/KeyframeTrack.html index bfff554788b88b3c3658f9d379f32a9b8f18cbb1..dddb3a07e8f8a1306d9b5ec4a23c415d08ed7258 100644 --- a/docs/api/animation/KeyframeTrack.html +++ b/docs/api/animation/KeyframeTrack.html @@ -11,58 +11,73 @@

[name]

-
+

A KeyframeTrack is a timed sequence of [link:https://en.wikipedia.org/wiki/Key_frame keyframes], which are composed of lists of times and related values, and which are used to animate a - specific property of an object.

+ specific property of an object. +

+

For an overview of the different elements of the three.js animation system see the - "Animation System" article in the "Next Steps" section of the manual.

+ "Animation System" article in the "Next Steps" section of the manual. +

+

In contrast to the animation hierarchy of the [link:https://github.com/mrdoob/three.js/wiki/JSON-Model-format-3 JSON model format] a *KeyframeTrack* doesn't store its single keyframes as objects in a "keys" array (holding the - times and the values for each frame together in one place).

+ times and the values for each frame together in one place). +

+

Instead of this there are always two arrays in a *KeyframeTrack*: the [page:.times times] array stores the time values for all keyframes of this track in sequential order, and the - [page:.values values] array contains the corresponding changing values of the animated property.

+ [page:.values values] array contains the corresponding changing values of the animated property. +

+

A single value, belonging to a certain point of time, can not only be a simple number, but (for example) a vector (if a position is animated) or a quaternion (if a rotation is animated). For this reason the values array (which is a flat array, too) might be three or four times as long as the - times array.

+ times array. +

+

Corresponding to the different possible types of animated values there are several subclasses of *KeyframeTrack*, inheriting the most properties and methods: - -

+

+ + + +

Some examples of how to manually create [page:AnimationClip AnimationClips] with different sorts of KeyframeTracks can be found in the [link:https://threejs.org/examples/js/AnimationClipCreator.js] - file.

+ file. +

+

Since explicit values are only specified for the discrete points of time stored in the times array, - all values in between have to be interpolated.

+ all values in between have to be interpolated. +

+

The track's name is important for the connection of this track with a specific property of the animated node (done by [page:PropertyBinding]). - - -

+

Constructor

[name]( [param:String name], [param:Array times], [param:Array values], [param:Constant interpolation] )

-
+

[page:String name] - the identifier for the *KeyframeTrack*.
[page:Array times] - an array of keyframe times, converted internally to a [link:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array Float32Array].
@@ -70,163 +85,173 @@ [link:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array Float32Array].
[page:Constant interpolation] - the type of interpolation to use. See [page:Animation Animation Constants] for possible values. Default is [page:Animation InterpolateLinear]. -

+

Properties

[property:String name]

-
+

The track's name can refer to [page:Geometry.morphTargets morph targets] or [page:SkinnedMesh bones] or possibly other values within an animated object. See [page:PropertyBinding.parseTrackName] for the forms of strings that can be parsed for property - binding:

+ binding: +

+

The name can specify the node either using its name or its uuid (although it needs to be in the subtree of the scene graph node passed into the mixer). Or, if the track name starts with a dot, - the track applies to the root node that was passed into the mixer.

+ the track applies to the root node that was passed into the mixer. +

+

Usually after the node a property will be specified directly. But you can also specify a subproperty, such as .rotation[x], if you just want to drive the X component of the rotation - via a float track.

+ via a float track. +

+

You can also specify bones or multimaterials by using an object name, for example: .bones[R_hand].scale; the red channel of the diffuse color of the fourth material in a - materials array - as a further example - can be accessed with .materials[3].diffuse[r].

+ materials array - as a further example - can be accessed with .materials[3].diffuse[r]. +

- PropertyBinding will also resolve morph target names, for example: .morphTargetInfluences[run].

+

+ PropertyBinding will also resolve morph target names, for example: .morphTargetInfluences[run]. +

+

Note: The track's name does not necessarily have to be unique. Multiple tracks can drive the same property. The result should be based on a weighted blend between the multiple tracks according to the weights of their respective actions. -

+

[property:Float32Array times]

-
+

A [link:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array Float32Array], converted from the times array which is passed in the constructor. -

+

[property:Float32Array values]

-
+

A [link:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array Float32Array], converted from the values array which is passed in the constructor. -

+

[property:Constant DefaultInterpolation]

-
+

The default interpolation type: [page:Animation InterpolateLinear]. -

+

[property:Constant TimeBufferType ]

-
+

[link:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array Float32Array], the type of the buffer internally used for the times. -

+

[property:Constant ValueBufferType ]

-
+

[link:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array Float32Array], the type of the buffer internally used for the values. -

+

Methods

[method:null createInterpolant]()

-
+

Creates a [page:LinearInterpolant LinearInterpolant], [page:CubicInterpolant CubicInterpolant] or [page:DiscreteInterpolant DiscreteInterpolant], depending on the value of the interpolation parameter passed in the constructor. -

+

[method:null getInterpolation]()

-
+

Returns the interpolation type. -

+

[method:Number getValueSize]()

-
+

Returns the size of each value (that is the length of the [page:.values values] array divided by the length of the [page:.times times] array). -

+

[method:DiscreteInterpolant InterpolantFactoryMethodDiscrete]( [link:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array result] )

-
+

Creates a new [page:DiscreteInterpolant DiscreteInterpolant] from the [page:KeyframeTrack.times times] and [page:KeyframeTrack.times values]. A Float32Array can be passed which will receive the results. Otherwise a new array with the appropriate size will be created automatically. -

+

[method:null InterpolantFactoryMethodLinear]( [link:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array result] )

-
+

Creates a new [page:LinearInterpolant LinearInterpolant] from the [page:KeyframeTrack.times times] and [page:KeyframeTrack.times values]. A Float32Array can be passed which will receive the results. Otherwise a new array with the appropriate size will be created automatically. -

+

[method:null InterpolantFactoryMethodSmooth]( [link:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Float32Array result] )

-
+

Create a new [page:CubicInterpolant CubicInterpolant] from the [page:KeyframeTrack.times times] and [page:KeyframeTrack.times values]. A Float32Array can be passed which will receive the results. Otherwise a new array with the appropriate size will be created automatically. -

+

[method:null optimize]()

-
+

Removes equivalent sequential keys, which are common in morph target sequences. Called automatically by the constructor. -

+

[method:null scale]()

-
+

Scales all keyframe times by a factor.

Note: This is useful, for example, for conversions to a certain rate of frames per seconds (as it is done internally by [page:AnimationClip.CreateFromMorphTargetSequence animationClip.CreateFromMorphTargetSequence]). -

+

[method:null setInterpolation]( [param:Constant interpolationType] )

-
+

Sets the interpolation type. See [page:Animation Animation Constants] for choices. -

+

[method:null shift]( [param:Number timeOffsetInSeconds] )

-
+

Moves all keyframes either forward or backward in time. -

+

[method:null trim]( [param:Number startTimeInSeconds], [param:Number endTimeInSeconds] )

-
+

Removes keyframes before *startTime* and after *endTime*, without changing any values within the range [*startTime*, *endTime*]. -

+

[method:null validate]()

-
+

Performs minimal validation on the tracks. Called automatically by the constructor.

This method logs errors to the console, if a track is empty, if the [page:.valueSize value size] is not valid, if an item in the [page:.times times] or [page:.values values] array is not a valid number or if the items in the *times* array are out of order. -

+

Static Methods

[method:KeyframeTrack parse]( [param:JSON json] )

-
+

Parses a JSON object and returns a new keyframe track of the correct type. -

+

[method:JSON toJSON]( [param:KeyframeTrack track] )

-
+

Converts the track to JSON. -

+

Source

diff --git a/docs/api/animation/PropertyBinding.html b/docs/api/animation/PropertyBinding.html index 81334250aaba4b1db3fe9dee805e6e321ddfa16d..8c252e6b02e66adae15d0d305183e44f2120d83b 100644 --- a/docs/api/animation/PropertyBinding.html +++ b/docs/api/animation/PropertyBinding.html @@ -10,99 +10,99 @@

[name]

-
+

This holds a reference to a real property in the scene graph; used internally. -

+

Constructor

[name]( [param:Object3D rootNode], path, parsedPath )

-
+

-- [page:Object3D rootNode]: -- path -- parsedPath (optional) -

+

Properties

[property:Number path]

-
+

-

+

[property:Number parsedPath]

-
+

-

+

[property:Number node]

-
+

-

+

[property:Number rootNode]

-
+

-

+

[property:Object BindingType]

-
+

-

+

[property:Object Versioning]

-
+

-

+

[property:Array GetterByBindingType]

-
+

-

+

[property:Array SetterByBindingTypeAndVersioning]

-
+

-

+

Methods

[method:null getValue]( [param:Array targetArray], [param:Number offset] )

-
-
+

+

[method:null setValue]( [param:Array sourceArray], [param:Number offset] )

-
-
+

+

[method:null bind]( )

-
+

Create getter / setter pair for a property in the scene graph. Used internally by [page:PropertyBinding.getValue getValue] and [page:PropertyBinding.setValue setValue]. -

+

[method:null unbind]( )

-
+

Unbind getter / setter pair for a property in the scene graph. -

+

[method:Constructor Composite]( targetGroup, path, optionalParsedPath )

-
+

Create a new Composite PropertyBinding. -

+

[method:Constructor create]( root, path, parsedPath )

-
+

Create a new Composite PropertyBinding (if root is an [page:AnimationObjectGroup]) or PropertyBinding. -

+

[method:Constructor parseTrackName]( trackName )

-
+

Matches strings in the following forms:
-- nodeName.property
-- nodeName.property[accessor]
@@ -113,12 +113,12 @@ -- parentName/parentName/nodeName.property[index]
-- .bone[Armature.DEF_cog].position
-- scene:helium_balloon_model:helium_balloon_model.position -

+

[method:Constructor findNode]( root, nodeName )

-
+

Find a node in a node tree or [page:Skeleton Skeleton]. -

+

diff --git a/docs/api/animation/PropertyMixer.html b/docs/api/animation/PropertyMixer.html index 2b2680e6f8567b4675864d363675375ba8e68236..1b214e9a4398a65bb39d8359c7007d6d5a708041 100644 --- a/docs/api/animation/PropertyMixer.html +++ b/docs/api/animation/PropertyMixer.html @@ -10,85 +10,84 @@

[name]

-
+

Buffered scene graph property that allows weighted accumulation; used internally. -

+

Constructor

[name]( binding, typeName, valueSize )

-
+

-- binding
-- typeName
-- valueSize
-

+

Properties

[property:Number binding]

-
+

-

+

[property:Number buffer]

-
+

Buffer with size [page:PropertyMixer valueSize] * 4.

This has the layout: [ incoming | accu0 | accu1 | orig ]

- Interpolators can use .buffer as their .result and the data then goes to 'incoming'.
+ Interpolators can use .buffer as their .result and the data then goes to 'incoming'. 'accu0' and 'accu1' are used frame-interleaved for the cumulative result and - are compared to detect changes.
- 'orig' stores the original state of the property.
-

+ are compared to detect changes. 'orig' stores the original state of the property. +

[property:Number cumulativeWeight]

-
+

Default is *0*. -

+

[property:Number valueSize]

-
+

-

+

[property:Number referenceCount]

-
+

Default is *0*. -

+

[property:Number useCount]

-
+

Default is *0*. -

+

Methods

[method:null accumulate]( accuIndex, weight )

-
+

Accumulate data in [page:PropertyMixer.buffer buffer][accuIndex] 'incoming' region into 'accu[i]'.
If weight is *0* this does nothing. -

+

[method:null apply]( accuIndex )

-
+

Apply the state of [page:PropertyMixer.buffer buffer] 'accu[i]' to the binding when accus differ. -

+

[method:null saveOriginalState]( )

-
+

Remember the state of the bound property and copy it to both accus. -

+

[method:null restoreOriginalState]( )

-
+

Apply the state previously taken via 'saveOriginalState' to the binding. -

+

Source

diff --git a/docs/api/animation/tracks/BooleanKeyframeTrack.html b/docs/api/animation/tracks/BooleanKeyframeTrack.html index 9ab72ddf2ab72d7194f2d9247ef49f9dad3733b7..377c5c006fdc8442a8130f7c7f41bb374161c0c4 100644 --- a/docs/api/animation/tracks/BooleanKeyframeTrack.html +++ b/docs/api/animation/tracks/BooleanKeyframeTrack.html @@ -13,61 +13,61 @@

[name]

-
+

A Track of boolean keyframe values. -

+

Constructor

[name]( [param:String name], [param:Array times], [param:Array values] )

-
+

[page:String name] - (required) identifier for the KeyframeTrack.
[page:Array times] - (required) array of keyframe times.
[page:Array values] - values for the keyframes at the times specified.
-

+

Properties

-
+

See [page:KeyframeTrack] for inherited properties. -

+

[property:Constant DefaultInterpolation]

-
+

The default interpolation type to use, [page:Animation InterpolateDiscrete]. -

+

[property:Array ValueBufferType]

-
+

A normal Array (no Float32Array in this case, unlike *ValueBufferType* of [page:KeyframeTrack]). -

+

[property:String ValueTypeName]

-
+

String 'bool'. -

+

Methods

-
+

See [page:KeyframeTrack] for inherited methods. -

+

[method:null InterpolantFactoryMethodLinear ]()

-
+

The value of this method here is 'undefined', as it does not make sense for discrete properties. -

+

[method:null InterpolantFactoryMethodSmooth ]()

-
+

The value of this method here is 'undefined', as it does not make sense for discrete properties. -

+

Source

diff --git a/docs/api/animation/tracks/ColorKeyframeTrack.html b/docs/api/animation/tracks/ColorKeyframeTrack.html index 44e7902bcd10bdb5a69f28918f52c230a462bc4d..53a43ffe7637443819f6dbfb6b7678e722dde705 100644 --- a/docs/api/animation/tracks/ColorKeyframeTrack.html +++ b/docs/api/animation/tracks/ColorKeyframeTrack.html @@ -13,46 +13,46 @@

[name]

-
+

A Track of keyframe values that represent color changes.

The very basic implementation of this subclass has nothing special yet. However, this is the place for color space parameterization. -

+

Constructor

[name]( [param:String name], [param:Array times], [param:Array values] )

-
+

[page:String name] - (required) identifier for the KeyframeTrack.
[page:Array times] - (required) array of keyframe times.
[page:Array values] - values for the keyframes at the times specified.
[page:Constant interpolation] - the type of interpolation to use. See [page:Animation Animation Constants] for possible values. Default is [page:Animation InterpolateLinear]. -

+

Properties

-
+

See [page:KeyframeTrack] for inherited properties. -

+

[property:String ValueTypeName]

-
+

String 'color'. -

+

Methods

-
+

See [page:KeyframeTrack] for inherited methods. -

+

Source

diff --git a/docs/api/animation/tracks/NumberKeyframeTrack.html b/docs/api/animation/tracks/NumberKeyframeTrack.html index affde08ac8ad92478639b90057d9c1c6f45cbc3e..38015e70eb483b073dda76eaefa583128b85d266 100644 --- a/docs/api/animation/tracks/NumberKeyframeTrack.html +++ b/docs/api/animation/tracks/NumberKeyframeTrack.html @@ -13,45 +13,45 @@

[name]

-
+

A Track of numeric keyframe values. -

+

Constructor

[name]( [param:String name], [param:Array times], [param:Array values] )

-
+

[page:String name] - (required) identifier for the KeyframeTrack.
[page:Array times] - (required) array of keyframe times.
[page:Array values] - values for the keyframes at the times specified.
[page:Constant interpolation] - the type of interpolation to use. See [page:Animation Animation Constants] for possible values. Default is [page:Animation InterpolateLinear]. -

+

Properties

-
+

See [page:KeyframeTrack] for inherited properties. -

+

[property:String ValueTypeName]

-
+

String 'number'. -

+

Methods

-
+

See [page:KeyframeTrack] for inherited methods. -

+

Source

diff --git a/docs/api/animation/tracks/QuaternionKeyframeTrack.html b/docs/api/animation/tracks/QuaternionKeyframeTrack.html index 88242b5aa779a71c5675844679a5765a14669860..ea06631c5daf2e5955f9fd8db6d5443613921bc2 100644 --- a/docs/api/animation/tracks/QuaternionKeyframeTrack.html +++ b/docs/api/animation/tracks/QuaternionKeyframeTrack.html @@ -13,56 +13,56 @@

[name]

-
+

A Track of quaternion keyframe values. -

+

Constructor

[name]( [param:String name], [param:Array times], [param:Array values] )

-
+

[page:String name] (required) identifier for the KeyframeTrack.
[page:Array times] (required) array of keyframe times.
[page:Array values] values for the keyframes at the times specified.
[page:Constant interpolation] the type of interpolation to use. See [page:Animation Animation Constants] for possible values. Default is [page:Animation InterpolateLinear]. -

+

Properties

-
+

See [page:KeyframeTrack] for inherited properties. -

+

[property:Constant DefaultInterpolation]

-
+

The default interpolation type to use, [page:Animation InterpolateLinear]. -

+

[property:String ValueTypeName]

-
+

String 'quaternion'. -

+

Methods

-
+

See [page:KeyframeTrack] for inherited methods. -

+

[method:null InterpolantFactoryMethodLinear]()

-
+

Returns a new [page:QuaternionLinearInterpolant QuaternionLinearInterpolant] based on the [page:KeyframeTrack.values values], [page:KeyframeTrack.times times] and [page:KeyframeTrack.valueSize valueSize] of the keyframes. -

+

Source

diff --git a/docs/api/animation/tracks/StringKeyframeTrack.html b/docs/api/animation/tracks/StringKeyframeTrack.html index 0626351f49b4831be8445c1ca4fff81ff80a9df3..4eff468eaf3843ee9bd4c615ac9899bb6418cf59 100644 --- a/docs/api/animation/tracks/StringKeyframeTrack.html +++ b/docs/api/animation/tracks/StringKeyframeTrack.html @@ -13,64 +13,64 @@

[name]

-
+

A Track of string keyframe values. -

+

Constructor

[name]( [param:String name], [param:Array times], [param:Array values] )

-
+

[page:String name] - (required) identifier for the KeyframeTrack.
[page:Array times] - (required) array of keyframe times.
[page:Array values] - values for the keyframes at the times specified.
[page:Constant interpolation] - the type of interpolation to use. See [page:Animation Animation Constants] for possible values. Default is [page:Animation InterpolateDiscrete]. -

+

Properties

-
+

See [page:KeyframeTrack] for inherited properties. -

+

[property:Constant DefaultInterpolation]

-
+

The default interpolation type to use, [page:Animation InterpolateDiscrete]. -

+

[property:Array ValueBufferType]

-
+

A normal Array (no Float32Array in this case, unlike *ValueBufferType* of [page:KeyframeTrack]). -

+

[property:String ValueTypeName]

-
+

String 'string'. -

+

Methods

-
+

See [page:KeyframeTrack] for inherited methods. -

+

[method:null InterpolantFactoryMethodLinear]()

-
+

The value of this method here is 'undefined', as it does not make sense for discrete properties. -

+

[method:null InterpolantFactoryMethodSmooth]()

-
+

The value of this method here is 'undefined', as it does not make sense for discrete properties. -

+

Source

diff --git a/docs/api/animation/tracks/VectorKeyframeTrack.html b/docs/api/animation/tracks/VectorKeyframeTrack.html index f411c62f870aa0a712f7a6d860430e375a345f26..a1bf4db2dadf9fdb35f69cfe44048053a619164a 100644 --- a/docs/api/animation/tracks/VectorKeyframeTrack.html +++ b/docs/api/animation/tracks/VectorKeyframeTrack.html @@ -13,44 +13,44 @@

[name]

-
+

A Track of vector keyframe values. -

+

Constructor

[name]( [param:String name], [param:Array times], [param:Array values] )

-
+

[page:String name] - (required) identifier for the KeyframeTrack.
[page:Array times] - (required) array of keyframe times.
[page:Array values] - values for the keyframes at the times specified.
[page:Constant interpolation] - the type of interpolation to use. See [page:Animation Animation Constants] for possible values. Default is [page:Animation InterpolateLinear]. -

+

Properties

-
+

See [page:KeyframeTrack] for inherited properties. -

+

[property:String ValueTypeName]

-
+

String 'vector'. -

+

Methods

-
+

See [page:KeyframeTrack] for inherited methods. -

+

Source

diff --git a/docs/api/audio/Audio.html b/docs/api/audio/Audio.html index a04b0d3b342aba43850f32bf2013edfc3656de89..c75affa56d9400fca95bdae999c752ae468c47b1 100644 --- a/docs/api/audio/Audio.html +++ b/docs/api/audio/Audio.html @@ -12,19 +12,19 @@

[name]

-
+

Create a non-positional ( global ) audio object.

This uses the [link:https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API Web Audio API]. -

+

Example

-
+

[example:webaudio_sandbox webaudio / sandbox ]
[example:webaudio_visualizer webaudio / visualizer ] -

+

// create an AudioListener and add it to the camera @@ -49,158 +49,158 @@

[name]( [param:AudioListener listener] )

-
+

listener — (required) [page:AudioListener AudioListener] instance. -

+

Properties

[property:Boolean autoplay]

-
Whether to start playback automatically. Default is *false*.
+

Whether to start playback automatically. Default is *false*.

[property:AudioContext context]

-
The [link:https://developer.mozilla.org/en-US/docs/Web/API/AudioContext AudioContext] of the [page:AudioListener listener] given in the constructor.
+

The [link:https://developer.mozilla.org/en-US/docs/Web/API/AudioContext AudioContext] of the [page:AudioListener listener] given in the constructor.

[property:Array filters]

-
Represents an array of [link:https://developer.mozilla.org/en-US/docs/Web/API/BiquadFilterNode BiquadFilterNodes]. Can be used to apply a variety of low-order filters to create more complex sound effects. Filters are set via [page:Audio.setFilter] or [page:Audio.setFilters].
+

Represents an array of [link:https://developer.mozilla.org/en-US/docs/Web/API/BiquadFilterNode BiquadFilterNodes]. Can be used to apply a variety of low-order filters to create more complex sound effects. Filters are set via [page:Audio.setFilter] or [page:Audio.setFilters].

[property:GainNode gain]

-
A [link:https://developer.mozilla.org/en-US/docs/Web/API/GainNode GainNode] created - using [link:https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createGain AudioContext.createGain]().
+

A [link:https://developer.mozilla.org/en-US/docs/Web/API/GainNode GainNode] created + using [link:https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createGain AudioContext.createGain]().

[property:Boolean hasPlaybackControl]

-
Whether playback can be controlled using the [page:Audio.play play](), - [page:Audio.pause pause]() etc. methods. Default is *true*.
+

Whether playback can be controlled using the [page:Audio.play play](), + [page:Audio.pause pause]() etc. methods. Default is *true*.

[property:Number playbackRate]

-
Speed of playback. Default is *1*.
+

Speed of playback. Default is *1*.

[property:Boolean isPlaying]

-
Whether the audio is currently playing.
+

Whether the audio is currently playing.

[property:Number startTime]

-
The time at which the sound should begin to play. Same as the *when* paramter of [link:https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode/start AudioBufferSourceNode.start](). Default is *0*.
+

The time at which the sound should begin to play. Same as the *when* paramter of [link:https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode/start AudioBufferSourceNode.start](). Default is *0*.

[property:Number offset]

-
An offset to the time within the audio buffer that playback should begin. Same as the *offset* paramter of [link:https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode/start AudioBufferSourceNode.start](). Default is *0*.
+

An offset to the time within the audio buffer that playback should begin. Same as the *offset* paramter of [link:https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode/start AudioBufferSourceNode.start](). Default is *0*.

[property:String source]

-
An [link:https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode AudioBufferSourceNode] created - using [link:https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createBufferSource AudioContext.createBufferSource]().
+

An [link:https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode AudioBufferSourceNode] created + using [link:https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createBufferSource AudioContext.createBufferSource]().

[property:String sourceType]

-
Type of the audio source. Default is string 'empty'.
+

Type of the audio source. Default is string 'empty'.

[property:String type]

-
String denoting the type, set to 'Audio'.
+

String denoting the type, set to 'Audio'.

Methods

[method:null connect]()

-
+

Connect to the [page:Audio.source]. This is used internally on initialisation and when setting / removing filters. -

+

[method:null disconnect]()

-
+

Disconnect from the [page:Audio.source]. This is used internally when setting / removing filters. -

+

[method:Array getFilter]()

-
+

Returns the first element of the [page:Audio.filters filters] array. -

+

[method:null getFilters]()

-
+

Returns the [page:Audio.filters filters] array. -

+

[method:Boolean getLoop]()

-
+

Return the value of [link:https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode/loop source.loop] (whether playback should loop). -

+

[method:GainNode getOutput]()

-
+

Return the [page:Audio.gain gainNode]. -

+

[method:Number getPlaybackRate]()

-
+

Return the value of [page:Audio.playbackRate playbackRate]. -

+

[method:Number getVolume]( value )

-
+

Return the current volume. -

+

[method:null play]()

-
+

If [page:Audio.hasPlaybackControl hasPlaybackControl] is true, starts playback. -

+

[method:null pause]()

-
+

If [page:Audio.hasPlaybackControl hasPlaybackControl] is true, pauses playback. -

+

[method:null onEnded]()

-
+

Called automatically when playback finished. Sets If [page:Audio.isPlaying isPlaying] to false. -

+

[method:Audio setBuffer]( audioBuffer )

-
+

Setup the [page:Audio.source source] to the audioBuffer, and sets [page:Audio.sourceType sourceType] to 'buffer'.
If [page:Audio.autoplay autoplay], also starts playback. -

+

[method:null setFilter]( filter )

-
+

Applies a single [link:https://developer.mozilla.org/en-US/docs/Web/API/BiquadFilterNode BiquadFilterNode] to the audio. -

+

[method:Audio setFilters]( [param:Array value] )

-
+

value - arrays of filters.
Applies an array of [link:https://developer.mozilla.org/en-US/docs/Web/API/BiquadFilterNode BiquadFilterNodes] to the audio. -

+

[method:null setLoop]( [param:Boolean value] )

-
+

Set [link:https://developer.mozilla.org/en-US/docs/Web/API/AudioBufferSourceNode/loop source.loop] to *value* (whether playback should loop). -

+

[method:null setNodeSource]( audioNode )

-
+

Setup the [page:Audio.source source] to the audioBuffer, and sets [page:Audio.sourceType sourceType] to 'audioNode'.
Also sets [page:Audio.hasPlaybackControl hasPlaybackControl] to false. -

+

[method:null setPlaybackRate]( [param:Number value] )

-
+

If [page:Audio.hasPlaybackControl hasPlaybackControl] is enabled, set the [page:Audio.playbackRate playbackRate] to *value*. -

+

[method:null setVolume]( [param:Number value] )

-
+

Set the volume. -

+

[method:null stop]()

-
+

If [page:Audio.hasPlaybackControl hasPlaybackControl] is enabled, stops playback, resets [page:Audio.startTime startTime] to *0* and sets [page:Audio.isPlaying isPlaying] to false. -

+

Source

diff --git a/docs/api/audio/AudioAnalyser.html b/docs/api/audio/AudioAnalyser.html index d6bbb32e5f4ad0e655115a0b5c8efeb2fc156479..8865e63c4ad4cc49853da49381f4129ecdc67ff8 100644 --- a/docs/api/audio/AudioAnalyser.html +++ b/docs/api/audio/AudioAnalyser.html @@ -10,21 +10,21 @@

[name]

-
+

Create a AudioAnalyser object, which uses an [link:https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode AnalyserNode] to analyse audio data.

This uses the [link:https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API Web Audio API]. -

+

Example

-
+

[example:webaudio_sandbox webaudio / sandbox ]
[example:webaudio_visualizer webaudio / visualizer ] -

+

// create an AudioListener and add it to the camera @@ -55,42 +55,42 @@

[name]( audio, [link:https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode/fftSize fftSize] )

-
+

Create a new [page:AudioAnalyser AudioAnalyser]. -

+

Properties

[property:AnalyserNode analyser]

-
An [link:https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode AnalyserNode] used to analyze audio.
+

An [link:https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode AnalyserNode] used to analyze audio.

[property:Integer fftSize]

-
- A non-zero power of two up to 2048, representing the size of the FFT (Fast Fourier Transform) to be used to determine the frequency domain.
+

+ A non-zero power of two up to 2048, representing the size of the FFT (Fast Fourier Transform) to be used to determine the frequency domain. See [link:https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode/fftSize this page] for details. -

+

[property:Uint8Array data]

-
+

A Uint8Array with size determined by [link:https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode/frequencyBinCount analyser.frequencyBinCount] used to hold analysis data. -

+

Methods

[method:Uint8Array getFrequencyData]()

-
+

Uses the Web Audio's [link:https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode/getByteFrequencyData getByteFrequencyData] method. See that page. -

+

[method:Number getAverageFrequency]()

-
+

Get the average of the frequencies returned by the [page:AudioAnalyser.getFrequencyData getFrequencyData] method. -

+

Source

diff --git a/docs/api/audio/AudioContext.html b/docs/api/audio/AudioContext.html index 4114bf90eb390d906a8eebac17d0af10c98f36d4..be12e427c5c1ba38bead0b2d9341f9e4388fc7f5 100644 --- a/docs/api/audio/AudioContext.html +++ b/docs/api/audio/AudioContext.html @@ -11,28 +11,28 @@

[name]

-
+

This contains methods for setting up an [link:https://developer.mozilla.org/en-US/docs/Web/API/AudioContext AudioContext].

Used internally by the [page:AudioListener AudioListener] and [page:AudioLoader AudioLoader] classes.

This uses the [link:https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API Web Audio API]. -

+

Methods

[method:AudioContext getContext]()

-
+

Return the value of the variable *context* in the outer scope, if defined, otherwise set it to a new [link:https://developer.mozilla.org/en-US/docs/Web/API/AudioContext AudioContext]. -

+

[method:AudioContext setContext]( [param:AudioConetxt value] )

-
+

Set the variable *context* in the outer scope to *value*. -

+

Source

diff --git a/docs/api/audio/AudioListener.html b/docs/api/audio/AudioListener.html index 408a37af51ac5d6a2d071d60685ba180c5a78f64..9a3dee431fa5556159ca1172bcd2aa0075f7ccb2 100644 --- a/docs/api/audio/AudioListener.html +++ b/docs/api/audio/AudioListener.html @@ -12,20 +12,20 @@

[name]

-
+

The [name] represents a virtual [link:https://developer.mozilla.org/de/docs/Web/API/AudioListener listener] of the all positional and non-positional audio effects in the scene.
A three.js application usually creates a single instance of [name]. It is a mandatory construtor parameter for audios entities like [page:Audio Audio] and [page:PositionalAudio PositionalAudio].
In most cases, the listener object is a child of the camera. So the 3D transformation of the camera represents the 3D transformation of the listener. -

+

Example

-
+

[example:webaudio_sandbox webaudio / sandbox ]
[example:webaudio_timing webaudio / timing ]
[example:webaudio_visualizer webaudio / visualizer ] -

+

// create an AudioListener and add it to the camera @@ -50,56 +50,56 @@

[name]( )

-
+

Create a new AudioListener. -

+

Properties

[property:AudioContext context]

-
The [link:https://developer.mozilla.org/en-US/docs/Web/API/AudioContext AudioContext] of the [page:AudioListener listener] given in the constructor.
+

The [link:https://developer.mozilla.org/en-US/docs/Web/API/AudioContext AudioContext] of the [page:AudioListener listener] given in the constructor.

[property:GainNode gain]

-
A [link:https://developer.mozilla.org/en-US/docs/Web/API/GainNode GainNode] created - using [link:https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createGain AudioContext.createGain]().
+

A [link:https://developer.mozilla.org/en-US/docs/Web/API/GainNode GainNode] created + using [link:https://developer.mozilla.org/en-US/docs/Web/API/AudioContext/createGain AudioContext.createGain]().

[property:AudioNode filter]

-
Default is *null*.
+

Default is *null*.

Methods

[method:GainNode getInput]()

-
+

Return the [page:AudioListener.gain gainNode]. -

+

[method:null removeFilter]()

-
+

Set the [page:AudioListener.filter filter] property to *null*. -

+

[method:AudioNode getFilter]()

-
+

Returns the value of the [page:AudioListener.filter filter] property. -

+

[method:null setFilter]( [param:AudioNode value] )

-
+

Set the [page:AudioListener.filter filter] property to *value*. -

+

[method:Number getMasterVolume]()

-
+

Return the volume. -

+

[method:null setMasterVolume]( [param:Number value] )

-
+

Set the volume. -

+

Source

diff --git a/docs/api/audio/PositionalAudio.html b/docs/api/audio/PositionalAudio.html index e27f43c517510c26496ffc2596207dcdd0f27384..437960fb2b286f83f46001d76f03f964a8a06204 100644 --- a/docs/api/audio/PositionalAudio.html +++ b/docs/api/audio/PositionalAudio.html @@ -12,19 +12,19 @@

[name]

-
+

Create a positional audio object.

This uses the [link:https://developer.mozilla.org/en-US/docs/Web/API/Web_Audio_API Web Audio API]. -

+

Example

-
+

[example:webaudio_sandbox webaudio / sandbox ]
[example:webaudio_timing webaudio / timing ] -

+

// create an AudioListener and add it to the camera @@ -56,71 +56,71 @@

Constructor

[name]( [param:AudioListener listener] )

-
+

listener — (required) [page:AudioListener AudioListener] instance. -

+

Properties

-
+

See the [page:Audio Audio] class for inherited properties. -

+

[property:PannerNode panner]

-
The PositionalAudio's [link:https://developer.mozilla.org/en-US/docs/Web/API/PannerNode PannerNode].
+

The PositionalAudio's [link:https://developer.mozilla.org/en-US/docs/Web/API/PannerNode PannerNode].

Methods

-
+

See the [page:Audio Audio] class for inherited methods. -

+

[method:PannerNode getOutput]()

-
+

Returns the [page:PositionalAudio.panner panner]. -

+

[method:Number getRefDistance]()

-
+

Returns the value of [link:https://developer.mozilla.org/en-US/docs/Web/API/PannerNode/refDistance panner.refDistance]. -

+

[method:PannerNode setRefDistance]( [param:Number value] )

-
+

Sets the value of [link:https://developer.mozilla.org/en-US/docs/Web/API/PannerNode/refDistance panner.refDistance]. -

+

[method:PannerNode getRolloffFactor]()

-
+

Returns the value of [link:https://developer.mozilla.org/en-US/docs/Web/API/PannerNode/rolloffFactor panner.rolloffFactor]. -

+

[method:PannerNode setRolloffFactor]( [param:Number value] )

-
+

Sets the value of [link:https://developer.mozilla.org/en-US/docs/Web/API/PannerNode/rolloffFactor panner.rolloffFactor]. -

+

[method:String getDistanceModel]()

-
+

Returns the value of [link:https://developer.mozilla.org/en-US/docs/Web/API/PannerNode/distanceModel panner.distanceModel]. -

+

[method:String setDistanceModel]( [param:String value] )

-
+

Sets the value of [link:https://developer.mozilla.org/en-US/docs/Web/API/PannerNode/distanceModel panner.distanceModel]. -

+

[method:PannerNode getMaxDistance]()

-
+

Returns the value of [link:https://developer.mozilla.org/en-US/docs/Web/API/PannerNode/maxDistance panner.maxDistance]. -

+

[method:PannerNode setMaxDistance]( [param:Number value] )

-
+

Sets the value of [link:https://developer.mozilla.org/en-US/docs/Web/API/PannerNode/maxDistance panner.maxDistance]. -

+

Source

diff --git a/docs/api/cameras/ArrayCamera.html b/docs/api/cameras/ArrayCamera.html index 98bd6d7c011f4d43471484756f7914b322c432eb..661d631820d5c02c7b897e000e70485bb11546e1 100644 --- a/docs/api/cameras/ArrayCamera.html +++ b/docs/api/cameras/ArrayCamera.html @@ -12,33 +12,33 @@

[name]

-
+

[name] can be used in order to efficiently render a scene with a predefined set of cameras. This is an important performance aspect for rendering VR scenes.
An instance of [name] always has an array of sub cameras. It's mandatory to define for each sub camera the *bounds* property which determines the part of the viewport that is rendered with this camera. -

+

Example

-
[example:webgl_camera_array camera / array ]
+

[example:webgl_camera_array camera / array ]

Constructor

[name]( [param:Array array] )

-
+

An array of cameras. -

+

Properties

-
See the base [page:PerspectiveCamera] class for common properties.
+

See the base [page:PerspectiveCamera] class for common properties.

[property:Array cameras]

-
+

An array of cameras. -

+

Methods

-
See the base [page:PerspectiveCamera] class for common methods.
+

See the base [page:PerspectiveCamera] class for common methods.

Source

diff --git a/docs/api/cameras/Camera.html b/docs/api/cameras/Camera.html index 46594fe31ca52940a6379b5798083c06b6bee442..7068b23ee7c06771c1bf6327c69403239bd36d03 100644 --- a/docs/api/cameras/Camera.html +++ b/docs/api/cameras/Camera.html @@ -12,70 +12,70 @@

[name]

-
+

Abstract base class for cameras. This class should always be inherited when you build a new camera. -

+

Constructor

[name]()

-
+

Creates a new [name]. Note that this class is not intended to be called directly; you probably want a [page:PerspectiveCamera] or [page:OrthographicCamera] instead. -

+

Properties

-
See the base [page:Object3D] class for common properties.
+

See the base [page:Object3D] class for common properties.

[property:Boolean isCamera]

-
+

Used to check whether this or derived classes are cameras. Default is *true*.

You should not change this, as it used internally by the renderer for optimisation. -

+

[property:Layers layers]

-
+

The [page:Layers layers] that the camera is a member of. This is an inherited property from [page:Object3D].

Objects must share at least one layer with the camera to be seen when the camera's viewpoint is rendered. -

+

[property:Matrix4 matrixWorldInverse]

-
+

This is the inverse of matrixWorld. MatrixWorld contains the Matrix which has the world transform of the Camera. -

+

[property:Matrix4 projectionMatrix]

-
This is the matrix which contains the projection.
+

This is the matrix which contains the projection.

Methods

-
See the base [page:Object3D] class for common methods.
+

See the base [page:Object3D] class for common methods.

[method:Camera clone]( )

-
+

Return a new camera with the same properties as this one. -

+

[method:Camera copy]( [param:Camera source] )

-
+

Copy the properties from the source camera into this one. -

+

[method:Vector3 getWorldDirection]( [param:Vector3 target] )

-
- +

[page:Vector3 target] — the result will be copied into this Vector3.

Returns a [page:Vector3] representing the world space direction in which the camera is looking. (Note: A camera looks down its local, negative z-axis).

+

Source

diff --git a/docs/api/cameras/CubeCamera.html b/docs/api/cameras/CubeCamera.html index 9bbfc3bdd3de6762b2e4979267909b5b5f801561..b1b909905a8d70d819c7caa7fa174f6e82cfd4ec 100644 --- a/docs/api/cameras/CubeCamera.html +++ b/docs/api/cameras/CubeCamera.html @@ -12,13 +12,13 @@

[name]

-
Creates 6 cameras that render to a [page:WebGLRenderTargetCube].
+

Creates 6 cameras that render to a [page:WebGLRenderTargetCube].

Examples

-
[example:webgl_materials_cubemap_dynamic materials / cubemap / dynamic ]
-
[example:webgl_materials_cubemap_dynamic2 materials / cubemap / dynamic2 ]
-
[example:webgl_shading_physical shading / physical ]
+

[example:webgl_materials_cubemap_dynamic materials / cubemap / dynamic ]

+

[example:webgl_materials_cubemap_dynamic2 materials / cubemap / dynamic2 ]

+

[example:webgl_shading_physical shading / physical ]

// Create cube camera var cubeCamera = new THREE.CubeCamera( 1, 100000, 128 ); @@ -44,43 +44,43 @@

[name]( [param:Number near], [param:Number far], [param:Number cubeResolution] )

-
+

near -- The near clipping distance.
far -- The far clipping distance
cubeResolution -- Sets the length of the cube's edges. -

-
+

+

Constructs a CubeCamera that contains 6 [page:PerspectiveCamera PerspectiveCameras] that render to a [page:WebGLRenderTargetCube]. -

+

Properties

-
See the base [page:Object3D] class for common properties.
+

See the base [page:Object3D] class for common properties.

[property:WebGLRenderTargetCube renderTarget]

-
+

The cube texture that gets generated. -

+

Methods

-
See the base [page:Object3D] class for common methods.
+

See the base [page:Object3D] class for common methods.

[method:null update]( [param:WebGLRenderer renderer], [param:Scene scene] )

-
+

renderer -- The current WebGL renderer
scene -- The current scene -

-
+

+

Call this to update the [page:CubeCamera.renderTarget renderTarget]. -

+

[method:null clear]( [param:WebGLRenderer renderer], [param:Boolean color], [param:Boolean depth], [param:Boolean stencil] )

-
+

Call this to clear the [page:CubeCamera.renderTarget renderTarget] color, depth, and/or stencil buffers. The color buffer is set to the renderer's current clear color. Arguments default to *true*. -

+

Source

diff --git a/docs/api/cameras/OrthographicCamera.html b/docs/api/cameras/OrthographicCamera.html index 0881429044d235d5751ba5e2c8de1bb8dc4f27b0..6e7036b7f10747ffd5cf6bfbfceba4d81fe59a2b 100644 --- a/docs/api/cameras/OrthographicCamera.html +++ b/docs/api/cameras/OrthographicCamera.html @@ -12,29 +12,29 @@

[name]

-
+

Camera that uses [link:https://en.wikipedia.org/wiki/Orthographic_projection orthographic projection].

In this projection mode, an object's size in the rendered image stays constant regardless of its distance from the camera.

This can be useful for rendering 2D scenes and UI elements, amongst other things. -

+

Example

-
[example:canvas_camera_orthographic camera / orthographic ]
-
[example:webgl_camera camera ]
-
[example:webgl_interactive_cubes_ortho interactive / cubes / ortho ]
-
[example:webgl_materials_cubemap_dynamic materials / cubemap / dynamic ]
-
[example:webgl_postprocessing_advanced postprocessing / advanced ]
-
[example:webgl_postprocessing_dof2 postprocessing / dof2 ]
-
[example:webgl_postprocessing_godrays postprocessing / godrays ]
-
[example:webgl_rtt rtt ]
-
[example:webgl_shaders_tonemapping shaders / tonemapping ]
-
[example:webgl_shadowmap shadowmap ]
-
[example:webgl_terrain_dynamic terrain / dynamic ]
+

[example:canvas_camera_orthographic camera / orthographic ]

+

[example:webgl_camera camera ]

+

[example:webgl_interactive_cubes_ortho interactive / cubes / ortho ]

+

[example:webgl_materials_cubemap_dynamic materials / cubemap / dynamic ]

+

[example:webgl_postprocessing_advanced postprocessing / advanced ]

+

[example:webgl_postprocessing_dof2 postprocessing / dof2 ]

+

[example:webgl_postprocessing_godrays postprocessing / godrays ]

+

[example:webgl_rtt rtt ]

+

[example:webgl_shaders_tonemapping shaders / tonemapping ]

+

[example:webgl_shadowmap shadowmap ]

+

[example:webgl_terrain_dynamic terrain / dynamic ]

var camera = new THREE.OrthographicCamera( width / - 2, width / 2, height / 2, height / - 2, 1, 1000 ); scene.add( camera ); @@ -44,7 +44,7 @@ scene.add( camera );

[name]( [param:Number left], [param:Number right], [param:Number top], [param:Number bottom], [param:Number near], [param:Number far] )

-
+

left — Camera frustum left plane.
right — Camera frustum right plane.
top — Camera frustum top plane.
@@ -53,62 +53,62 @@ scene.add( camera );
far — Camera frustum far plane.

Together these define the camera's [link:https://en.wikipedia.org/wiki/Viewing_frustum viewing frustum]. -

+

Properties

-
+

See the base [page:Camera] class for common properties.
Note that after making changes to most of these properties you will have to call [page:OrthographicCamera.updateProjectionMatrix .updateProjectionMatrix] for the changes to take effect. -

+

[property:Float bottom]

-
Camera frustum bottom plane.
+

Camera frustum bottom plane.

[property:Float far]

-
+

Camera frustum far plane. Default is *2000*.

The valid range is between the current value of the [page:.near near] plane and infinity. -

+

[property:Boolean isOrthographicCamera]

-
+

Used to test whether this or derived classes are OrthographicCameras. Default is *true*.

This should not be changed as it is used internally by the renderer for optimisation. -

+

[property:Float left]

-
Camera frustum left plane.
+

Camera frustum left plane.

[property:Float near]

-
+

Camera frustum near plane. Default is *0.1*.

The valid range is between 0 and the current value of the [page:.far far] plane. Note that, unlike for the [page:PerspectiveCamera], *0* is a valid value for an OrthographicCamera's near plane. -

+

[property:Float right]

-
Camera frustum right plane.
+

Camera frustum right plane.

[property:Float top]

-
Camera frustum top plane.
+

Camera frustum top plane.

[property:Object view]

-
Set by [page:OrthographicCamera.setViewOffset setViewOffset]. Default is *null*.
+

Set by [page:OrthographicCamera.setViewOffset setViewOffset]. Default is *null*.

[property:number zoom]

-
Gets or sets the zoom factor of the camera. Default is *1*.
+

Gets or sets the zoom factor of the camera. Default is *1*.

Methods

-
See the base [page:Camera] class for common methods.
+

See the base [page:Camera] class for common methods.

[method:null setViewOffset]( [param:Float fullWidth], [param:Float fullHeight], [param:Float x], [param:Float y], [param:Float width], [param:Float height] )

-
+

fullWidth — full width of multiview setup
fullHeight — full height of multiview setup
x — horizontal offset of subcamera
@@ -119,22 +119,22 @@ scene.add( camera ); Sets an offset in a larger [link:https://en.wikipedia.org/wiki/Viewing_frustum viewing frustum]. This is useful for multi-window or multi-monitor/multi-machine setups. For an example on how to use it see [page:PerspectiveCamera.setViewOffset PerspectiveCamera]. -

+

[method:null clearViewOffset]()

-
+

Removes any offset set by the .setViewOffset method. -

+

[method:null updateProjectionMatrix]()

-
+

Updates the camera projection matrix. Must be called after any change of parameters. -

+

[method:JSON toJSON]()

-
+

Return the camera's data in JSON format. -

+

Source

diff --git a/docs/api/cameras/PerspectiveCamera.html b/docs/api/cameras/PerspectiveCamera.html index cdd5c403bbae502679f150384fdd466c579a6989..49e4a43412d7a68c87dd7cf5055b1e1488c0b0a4 100644 --- a/docs/api/cameras/PerspectiveCamera.html +++ b/docs/api/cameras/PerspectiveCamera.html @@ -12,23 +12,23 @@

[name]

-
+

Camera that uses [link:https://en.wikipedia.org/wiki/Perspective_(graphical) perspective projection].

This projection mode is designed to mimic the way the human eye sees. It is the most common projection mode used for rendering a 3D scene. -

+

Example

-
[example:canvas_geometry_birds geometry / birds ]
-
[example:canvas_geometry_cube geometry / cube ]
-
[example:webgl_animation_skinning_blending animation / skinning / blending ]
-
[example:webgl_animation_skinning_morph animation / skinning / blending ]
-
[example:webgl_effects_stereo effects / stereo ]
-
[example:webgl_interactive_cubes interactive / cubes ]
-
[example:webgl_loader_collada_skinning loader / collada / skinning ]
+

[example:canvas_geometry_birds geometry / birds ]

+

[example:canvas_geometry_cube geometry / cube ]

+

[example:webgl_animation_skinning_blending animation / skinning / blending ]

+

[example:webgl_animation_skinning_morph animation / skinning / blending ]

+

[example:webgl_effects_stereo effects / stereo ]

+

[example:webgl_interactive_cubes interactive / cubes ]

+

[example:webgl_loader_collada_skinning loader / collada / skinning ]

var camera = new THREE.PerspectiveCamera( 45, width / height, 1, 1000 ); scene.add( camera ); @@ -37,122 +37,122 @@ scene.add( camera );

Constructor

[name]( [param:Number fov], [param:Number aspect], [param:Number near], [param:Number far] )

-
+

fov — Camera frustum vertical field of view.
aspect — Camera frustum aspect ratio.
near — Camera frustum near plane.
far — Camera frustum far plane.

Together these define the camera's [link:https://en.wikipedia.org/wiki/Viewing_frustum viewing frustum]. -

+

Properties

-
+

See the base [page:Camera] class for common properties.
Note that after making changes to most of these poperties you will have to call [page:PerspectiveCamera.updateProjectionMatrix .updateProjectionMatrix] for the changes to take effect. -

+

[property:Float aspect]

-
Camera frustum aspect ratio, usually the canvas width / canvas height. Default is *1* (square canvas).
+

Camera frustum aspect ratio, usually the canvas width / canvas height. Default is *1* (square canvas).

[property:Float far]

-
+

Camera frustum far plane. Default is *2000*.

The valid range is between the current value of the [page:.near near] plane and infinity. -

+

[property:Float filmGauge]

-
Film size used for the larger axis. Default is 35 (millimeters). This parameter does not influence the projection matrix unless .filmOffset is set to a nonzero value.
+

Film size used for the larger axis. Default is 35 (millimeters). This parameter does not influence the projection matrix unless .filmOffset is set to a nonzero value.

[property:Float filmOffset]

-
Horizontal off-center offset in the same unit as .filmGauge. Default is *0*.
+

Horizontal off-center offset in the same unit as .filmGauge. Default is *0*.

[property:Float focus]

-
Object distance used for stereoscopy and depth-of-field effects. +

Object distance used for stereoscopy and depth-of-field effects. This parameter does not influence the projection matrix unless a [page:StereoCamera] is being used. Default is *10*. -

+

[property:Float fov]

-
Camera frustum vertical field of view, from bottom to top of view, in degrees. Default is *50*.
+

Camera frustum vertical field of view, from bottom to top of view, in degrees. Default is *50*.

[property:Boolean isPerspectiveCamera]

-
+

Used to test whether this or derived classes are PerspectiveCameras. Default is *true*.

This should not be changed as it is used internally by the renderer for optimisation. -

+

[property:Float near]

-
+

Camera frustum near plane. Default is *0.1*.

The valid range is greater than 0 and less than the current value of the [page:.far far] plane. Note that, unlike for the [page:OrthographicCamera], *0* is not a valid value for a PerspectiveCamera's near plane. -

+

[property:Object view]

-
+

Frustum window specification or null. This is set using the [page:PerspectiveCamera.setViewOffset .setViewOffset] method and cleared using [page:PerspectiveCamera.clearViewOffset .clearViewOffset]. -

+

[property:number zoom]

-
Gets or sets the zoom factor of the camera. Default is *1*.
+

Gets or sets the zoom factor of the camera. Default is *1*.

Methods

-
See the base [page:Camera] class for common methods.
+

See the base [page:Camera] class for common methods.

[method:null clearViewOffset]()

-
Removes any offset set by the [page:PerspectiveCamera.setViewOffset .setViewOffset] method.
+

Removes any offset set by the [page:PerspectiveCamera.setViewOffset .setViewOffset] method.

[method:Float getEffectiveFOV]()

-
Returns the current vertical field of view angle in degrees considering .zoom.
+

Returns the current vertical field of view angle in degrees considering .zoom.

[method:Float getFilmHeight]()

-
+

Returns the height of the image on the film. If .aspect is less than or equal to one (portrait format), the result equals .filmGauge. -

+

[method:Float getFilmWidth]()

-
+

Returns the width of the image on the film. If .aspect is greater than or equal to one (landscape format), the result equals .filmGauge. -

+

[method:Float getFocalLength]()

-
Returns the focal length of the current .fov in respect to .filmGauge.
+

Returns the focal length of the current .fov in respect to .filmGauge.

[method:null setFocalLength]( [param:Float focalLength] )

-
+

Sets the FOV by focal length in respect to the current [page:PerspectiveCamera.filmGauge .filmGauge].

By default, the focal length is specified for a 35mm (full frame) camera. -

+

[method:null setViewOffset]( [param:Float fullWidth], [param:Float fullHeight], [param:Float x], [param:Float y], [param:Float width], [param:Float height] )

-
+

fullWidth — full width of multiview setup
fullHeight — full height of multiview setup
x — horizontal offset of subcamera
y — vertical offset of subcamera
width — width of subcamera
height — height of subcamera -

+

-
+

Sets an offset in a larger frustum. This is useful for multi-window or multi-monitor/multi-machine setups. -

+

-
+

For example, if you have 3x2 monitors and each monitor is 1920x1080 and the monitors are in grid like this:

@@ -185,17 +185,17 @@ 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.
-		
+

[method:null updateProjectionMatrix]()

-
+

Updates the camera projection matrix. Must be called after any change of parameters. -

+

[method:JSON toJSON]()

-
+

Return camera data in JSON format. -

+

Source

diff --git a/docs/api/cameras/StereoCamera.html b/docs/api/cameras/StereoCamera.html index a67c59e25e869e64e583194bae1b3ccc4903236a..abd1d0446b5e184c30e564fe3e3dcee68b17e08f 100644 --- a/docs/api/cameras/StereoCamera.html +++ b/docs/api/cameras/StereoCamera.html @@ -11,25 +11,25 @@

[name]

-
+

Dual [page:PerspectiveCamera PerspectiveCamera]s used for effects such as [link:https://en.wikipedia.org/wiki/Anaglyph_3D 3D Anaglyph] or [link:https://en.wikipedia.org/wiki/parallax_barrier Parallax Barrier]. -

+

Example

-
[example:webgl_effects_anaglyph effects / anaglyph ]
-
[example:webgl_effects_parallaxbarrier effects / parallaxbarrier ]
-
[example:webgl_effects_stereo effects / stereo ]
+

[example:webgl_effects_anaglyph effects / anaglyph ]

+

[example:webgl_effects_parallaxbarrier effects / parallaxbarrier ]

+

[example:webgl_effects_stereo effects / stereo ]

-
+

This class is used internally in the files

[link:https://github.com/mrdoob/three.js/blob/master/examples/js/effects/AnaglyphEffect.js examples/js/effects/AnaglyphEffect.js]

[link:https://github.com/mrdoob/three.js/blob/master/examples/js/effects/ParallaxBarrierEffect.js examples/js/effects/ParallaxBarrierEffect.js]

[link:https://github.com/mrdoob/three.js/blob/master/examples/js/effects/StereoEffect.js examples/js/effects/StereoEffect.js]

used in the above examples. -

+

Constructor

@@ -39,26 +39,26 @@

Properties

[property:Float aspect]

-
Default is *1*.
+

Default is *1*.

[property:Float eyeSep]

-
Default is *0.064*.
+

Default is *0.064*.

[property:PerspectiveCamera cameraL]

-
Left camera. This is added to [page:Layers layer 1] - objects to be rendered - by the left camera must also be added to this layer.
+

Left camera. This is added to [page:Layers layer 1] - objects to be rendered + by the left camera must also be added to this layer.

[property:PerspectiveCamera cameraR]

-
Right camera.This is added to [page:Layers layer 2] - objects to be rendered - by the right camera must also be added to this layer.
+

Right camera.This is added to [page:Layers layer 2] - objects to be rendered + by the right camera must also be added to this layer.

Methods

[method:null update]( camera )

-
+

Update the stereo cameras based on the camera passed in. -

+

Source

diff --git a/docs/api/constants/CustomBlendingEquations.html b/docs/api/constants/CustomBlendingEquations.html index 0e2aca2117da1c48d263594c113142a56271efb8..81df00ff32d87e0f1191ce560c543839be4bef05 100644 --- a/docs/api/constants/CustomBlendingEquations.html +++ b/docs/api/constants/CustomBlendingEquations.html @@ -12,10 +12,12 @@

Example

-
[example:webgl_materials_blending_custom materials / blending / custom ]
+

[example:webgl_materials_blending_custom materials / blending / custom ]

Usage

- These work with all material types. First set the material's blending mode to THREE.CustomBlending, then set the desired Blending Equation, Source Factor and Destination Factor. +

+ These work with all material types. First set the material's blending mode to THREE.CustomBlending, then set the desired Blending Equation, Source Factor and Destination Factor. +

var material = new THREE.MeshBasicMaterial( {color: 0x00ff00} ); @@ -50,9 +52,9 @@

Destination Factors

-
+

All of the Source Factors are valid as Destination Factors, except for THREE.SrcAlphaSaturateFactor -

+

Source

diff --git a/docs/api/constants/DrawModes.html b/docs/api/constants/DrawModes.html index af41d677926f25b00195a85a742c0d92a75b5d5d..1bdc3ff32d65a96962fc05af83cd9395cd64e421 100644 --- a/docs/api/constants/DrawModes.html +++ b/docs/api/constants/DrawModes.html @@ -10,7 +10,7 @@

Draw Mode Constants

-
+

These are valid values for [page:Mesh.drawMode], and control how the list of vertices is interpeted once sent to the GPU.

Note that these only work when [page:Mesh.geometry] is a [page:BufferGeometry]. Changing this @@ -18,31 +18,31 @@ -

+

Draw Modes

THREE.TrianglesDrawMode -
+

This is the default, and results in every three consecutive vertices (v0, v1, v2), (v2, v3, v5), ... being interpreted as a separate triangle.
If the number of vertices is not a multiple of 3, excess vertices are ignored. -

+

THREE.TriangleStripDrawMode -
+

This will result in a series of triangles connected in a strip, given by (v0, v1, v2), (v2, v1, v3), (v2, v3, v4), ... so that every subsequent triangle shares two vertices with the previous triangle. -

+

THREE.TriangleFanDrawMode -
+

This will result in a series of triangles each sharing the first vertex (like a fan), given by (v0, v1, v2), (v0, v2, v3), (v0, v3, v4), ...

@@ -50,7 +50,7 @@ render WebGL using [link:https://en.wikipedia.org/wiki/ANGLE_(software) ANGLE] on Windows, internally this mode will be converted to a supported mode, which will likely lead to lowered performance on those browsers. -

+

Usage

diff --git a/docs/api/constants/Materials.html b/docs/api/constants/Materials.html index 495e7bbdd8a29db06aed945be5431aff506ed5d2..290aa007a09ff96a618b378ae07ad400f581f47b 100644 --- a/docs/api/constants/Materials.html +++ b/docs/api/constants/Materials.html @@ -10,10 +10,10 @@

Material Constants

-
+

These constants define properties common to all material types, with the exception of Texture Combine Operations which only apply to [page:MeshBasicMaterial.combine MeshBasicMaterial], [page:MeshLambertMaterial.combine MeshLambertMaterial] and [page:MeshPhongMaterial.combine MeshPhongMaterial].
-

+

Side

@@ -22,10 +22,10 @@ THREE.BackSide THREE.DoubleSide -
+

Defines which side of faces will be rendered - front, back or both. Default is [page:Constant FrontSide]. -

+

Colors

@@ -34,12 +34,12 @@ THREE.FaceColors THREE.VertexColors -
+

[page:Constant NoColors] is the default and applies the material's color to all faces.
- [page:Constant FaceColors] colors faces according to each [page:Face3 Face3][property:Color color] value.
- [page:Constant VertexColors] colors faces according to each [page:Face3 Face3][property:Array vertexColors] value. This is an array of three [page:Color Color]s, one for each vertex in the face.
+ [page:Constant FaceColors] colors faces according to each [page:Face3 Face3] [page:Color Color] value.
+ [page:Constant VertexColors] colors faces according to each [page:Face3 Face3] vertexColors value. This is an array of three [page:Color Color]s, one for each vertex in the face.
See the [example:webgl_geometry_colors geometry / colors] example. -

+

Blending Mode

@@ -52,12 +52,12 @@ -
+

These control the source and destination blending equations for the material's RGB and Alpha sent to the WebGLRenderer for use by WebGL.
[page:Constant NormalBlending] is the default.
Note that [page:Constant CustomBlending] must be set to use [page:CustomBlendingEquation Custom Blending Equations].
See the [example:webgl_materials_blending materials / blending] example.
-

+

Depth Mode

@@ -69,7 +69,7 @@ THREE.GreaterDepth THREE.NotEqualDepth -
+

Which depth function the material uses to compare incoming pixels Z-depth against the current Z-depth buffer value. If the result of the comparison is true, the pixel will be drawn.
[page:Materials NeverDepth] will never return true.
[page:Materials AlwaysDepth] will always return true.
@@ -78,7 +78,7 @@ [page:Materials GreaterEqualDepth] will return true if the incoming pixel Z-depth is greater than or equal to the current buffer Z-depth.
[page:Materials GreaterDepth] will return true if the incoming pixel Z-depth is greater than the current buffer Z-depth.
[page:Materials NotEqualDepth] will return true if the incoming pixel Z-depth is not equal to the current buffer Z-depth.
-

+

Texture Combine Operations

@@ -86,10 +86,12 @@ THREE.MixOperation THREE.AddOperation +

These define how the result of the surface's color is combined with the environment map (if present), for [page:MeshBasicMaterial.combine MeshBasicMaterial], [page:MeshLambertMaterial.combine MeshLambertMaterial] and [page:MeshPhongMaterial.combine MeshPhongMaterial].
[page:Constant MultiplyOperation] is the default and multiplies the environment map color with the surface color.
[page:Constant MixOperation] uses reflectivity to blend between the two colors.
[page:Constant AddOperation] adds the two colors. +

Source

diff --git a/docs/api/constants/Renderer.html b/docs/api/constants/Renderer.html index 81b81a3d8b4b2bc7ae1069934b920153d671db5d..ed58b5d5df8370a8bda550700e289d0f693c2d86 100644 --- a/docs/api/constants/Renderer.html +++ b/docs/api/constants/Renderer.html @@ -17,22 +17,22 @@ THREE.CullFaceFront THREE.CullFaceFrontBack -
+

[page:constant CullFaceNone] disables face culling.
[page:constant CullFaceBack] culls back faces (default).
[page:constant CullFaceFront] culls front faces.
[page:constant CullFaceFrontBack] culls both front and back faces. -

+

Front Face Direction

THREE.FrontFaceDirectionCW THREE.FrontFaceDirectionCCW -
+

[page:constant FrontFaceDirectionCW] sets the winding order for polygons to clockwise.
[page:constant FrontFaceDirectionCCW] sets the winding order for polygons to counter-clockwise (default). -

+

Shadow Types

@@ -40,13 +40,13 @@ THREE.PCFShadowMap THREE.PCFSoftShadowMap -
+

These define the WebGLRenderer's [page:WebGLRenderer.shadowMap.type shadowMap.type] property.

[page:constant BasicShadowMap] gives unfiltered shadow maps - fastest, but lowest quality.
[page:constant PCFShadowMap] filters shadow maps using the Percentage-Closer Filtering (PCF) algorithm (default).
[page:constant PCFSoftShadowMap] filters shadow maps using the Percentage-Closer Soft Shadows (PCSS) algorithm. -

+

Tone Mapping

@@ -56,7 +56,7 @@ THREE.Uncharted2ToneMapping THREE.CineonToneMapping -
+

These define the WebGLRenderer's [page:WebGLRenderer.toneMapping toneMapping] property. This is used to approximate the appearance of high dynamic range (HDR) on the low dynamic range medium of a standard computer monitor or mobile device's screen.

@@ -66,7 +66,7 @@ See the [example:webgl_tonemapping WebGL / tonemapping] example. -

+

Source

diff --git a/docs/api/constants/Textures.html b/docs/api/constants/Textures.html index e63efa3de30a61b6dc4a6931afa71af336d3f6e5..6ba97d1e332a489f9016c52cb3622b4b70b1ce77 100644 --- a/docs/api/constants/Textures.html +++ b/docs/api/constants/Textures.html @@ -22,14 +22,14 @@ THREE.CubeUVRefractionMapping -
+

These define the texture's mapping mode.
[page:Constant UVMapping] is the default, and maps the texture using the mesh's UV coordinates.

The rest define environment mapping types.

[page:Constant CubeReflectionMapping] and [page:Constant CubeRefractionMapping] are for - use with a [page:CubeTexture CubeTexture], which is made up of six textures, one for each face of the cube.
+ use with a [page:CubeTexture CubeTexture], which is made up of six textures, one for each face of the cube. [page:Constant CubeReflectionMapping] is the default for a [page:CubeTexture CubeTexture].

[page:Constant EquirectangularReflectionMapping] and [page:Constant EquirectangularRefractionMapping] @@ -43,7 +43,7 @@ of the position of the camera relative to the cubemapped object or surface.

See the [example:webgl_materials_envmaps materials / envmaps] example. -

+

Wrapping Modes

@@ -52,7 +52,7 @@ THREE.ClampToEdgeWrapping THREE.MirroredRepeatWrapping -
+

These define the texture's [page:Texture.wrapS wrapS] and [page:Texture.wrapT wrapT] properties, which define horizontal and vertical texture wrapping.

@@ -61,8 +61,8 @@ [page:constant ClampToEdgeWrapping] is the default. The last pixel of the texture stretches to the edge of the mesh.

- With [page:constant MirroredRepeatWrapping] the texture will repeats to infinity, mirroring on each repeat.
-

+ With [page:constant MirroredRepeatWrapping] the texture will repeats to infinity, mirroring on each repeat. +

Magnification Filters

@@ -70,7 +70,7 @@ THREE.LinearFilter -
+

For use with a texture's [page:Texture.magFilter magFilter] property, these define the texture magnification function to be used when the pixel being textured maps to an area less than or equal to one texture element (texel).

@@ -82,7 +82,7 @@ of the four texture elements that are closest to the specified texture coordinates, and can include items wrapped or repeated from other parts of a texture, depending on the values of [page:Texture.wrapS wrapS] and [page:Texture.wrapT wrapT], and on the exact mapping. -

+

Minification Filters

@@ -94,7 +94,7 @@ THREE.LinearMipMapLinearFilter -
+

For use with a texture's [page:Texture.minFilter minFilter] property, these define the texture minifying function that is used whenever the pixel being textured maps to an area greater than one texture element (texel).

@@ -121,7 +121,7 @@ to produce a texture value from each mipmap. The final texture value is a weighted average of those two values.

See the [example:webgl_materials_texture_filters materials / texture / filters] example. -

+

Types

@@ -138,11 +138,11 @@ THREE.UnsignedShort565Type THREE.UnsignedInt248Type -
+

For use with a texture's [page:Texture.type type] property, which must correspond to the correct format. See below for details.

[page:constant UnsignedByteType] is the default. -

+

Formats

@@ -155,7 +155,7 @@ THREE.DepthFormat THREE.DepthStencilFormat -
+

For use with a texture's [page:Texture.format format] property, these define how elements of a 2d texture, or *texels*, are read by shaders.

@@ -186,7 +186,7 @@ Note that the texture must have the correct [page:Texture.type type] set, as described above. See [link:https://developer.mozilla.org/en/docs/Web/API/WebGLRenderingContext/texImage2D WebGLRenderingContext.texImage2D] for details. -

+

DDS / ST3C Compressed Texture Formats

@@ -195,7 +195,7 @@ THREE.RGBA_S3TC_DXT3_Format THREE.RGBA_S3TC_DXT5_Format -
+

For use with a [page:CompressedTexture CompressedTexture]'s [page:Texture.format format] property, these require support for the [link:https://www.khronos.org/registry/webgl/extensions/WEBGL_compressed_texture_s3tc/ WEBGL_compressed_texture_s3tc] @@ -206,7 +206,7 @@ [page:constant RGBA_S3TC_DXT1_Format]: A DXT1-compressed image in an RGB image format with a simple on/off alpha value.
[page:constant RGBA_S3TC_DXT3_Format]: A DXT3-compressed image in an RGBA image format. Compared to a 32-bit RGBA texture, it offers 4:1 compression.
[page:constant RGBA_S3TC_DXT5_Format]: A DXT5-compressed image in an RGBA image format. It also provides a 4:1 compression, but differs to the DXT3 compression in how the alpha compression is done.
-

+

PVRTC Compressed Texture Formats

@@ -215,7 +215,7 @@ THREE.RGBA_PVRTC_4BPPV1_Format THREE.RGBA_PVRTC_2BPPV1_Format -
+

For use with a [page:CompressedTexture CompressedTexture]'s [page:Texture.format format] property, these require support for the [link:https://www.khronos.org/registry/webgl/extensions/WEBGL_compressed_texture_pvrtc/ WEBGL_compressed_texture_pvrtc] extension.
@@ -226,17 +226,17 @@ [page:constant RGB_PVRTC_2BPPV1_Format]: RGB compression in 2-bit mode. One block for each 8×4 pixels.
[page:constant RGBA_PVRTC_4BPPV1_Format]: RGBA compression in 4-bit mode. One block for each 4×4 pixels.
[page:constant RGBA_PVRTC_2BPPV1_Format]: RGBA compression in 2-bit mode. One block for each 8×4 pixels.
-

+

ETC Compressed Texture Format

THREE.RGB_ETC1_Format -
+

For use with a [page:CompressedTexture CompressedTexture]'s [page:Texture.format format] property, these require support for the [link:https://www.khronos.org/registry/webgl/extensions/WEBGL_compressed_texture_etc1/ WEBGL_compressed_texture_etc1] extension.

-

+

Encoding

@@ -251,7 +251,7 @@ THREE.BasicDepthPacking THREE.RGBADepthPacking -
+

For use with a Texture's [page:Texture.encoding encoding] property.

If the encoding type is changed after the texture has already been used by a material, @@ -259,7 +259,7 @@ [page:constant LinearEncoding] is the default. Values other than this are only valid for a material's map, envMap and emissiveMap. -

+

Source

diff --git a/docs/api/core/BufferAttribute.html b/docs/api/core/BufferAttribute.html index 4643ddad37653297a53ba7b3399d8871b72c40a5..3b050c93725a17021d3ccc1256386974df21dae7 100644 --- a/docs/api/core/BufferAttribute.html +++ b/docs/api/core/BufferAttribute.html @@ -10,7 +10,7 @@

[name]

-
+

This class stores data for an attribute (such as vertex positions, face indices, normals, colors, UVs, and any custom attributes ) associated with a [page:BufferGeometry], which allows for more efficient passing of data to the GPU. See that page for details and a usage example.

@@ -18,11 +18,11 @@ Data is stored as vectors of any length (defined by [page:BufferAttribute.itemSize itemSize]), and in general in the methods outlined below if passing in an index, this is automatically multiplied by the vector length. -

+

Constructor

[name]( [param:TypedArray array], [param:Integer itemSize], [param:Boolean normalized] )

-
+

[page:TypedArray array] -- Must be a [link:https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Global_Objects/TypedArray TypedArray]. Used to instantiate the buffer.
This array should have @@ -41,130 +41,130 @@ data will be mapped to 0.0f - +1.0f in the GLSL attribute. An Int16Array (signed) would map from -32767 - +32767 to -1.0f - +1.0f. If [page:Boolean normalized] is false, the values will be converted to floats which contain the exact value, i.e. 32767 becomes 32767.0f. -

+

Properties

[property:TypedArray array]

-
+

The [page:TypedArray array] holding data stored in the buffer. -

+

[property:Integer count]

-
+

Stores the [page:BufferAttribute.array array]'s length divided by the [page:BufferAttribute.itemSize itemSize].

If the buffer is storing a 3-component vector (such as a position, normal, or color), then this will count the number of such vectors stored. -

+

[property:Boolean dynamic]

-
+

Whether the buffer is dynamic or not. Default is *false*.
If false, the GPU is informed that contents of the buffer are likely to be used often and not change often. This corresponds to the [link:https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/bufferData gl.STATIC_DRAW] flag.
if true, the GPU is informed that contents of the buffer are likely to be used often and change often. This corresponds to the [link:https://developer.mozilla.org/en-US/docs/Web/API/WebGLRenderingContext/bufferData gl.DYNAMIC_DRAW] flag. -

+

[property:Boolean isBufferAttribute]

-
+

Used to check whether this or derived classes are BufferAttributes. Default is *true*.

You should not change this, as it used internally for optimisation. -

+

[property:Integer itemSize]

-
The length of vectors that are being stored in the [page:BufferAttribute.array array].
+

The length of vectors that are being stored in the [page:BufferAttribute.array array].

[property:String name]

-
+

Optional name for this attribute instance. Default is an empty string. -

+

[property:Boolean needsUpdate]

-
+

Flag to indicate that this attribute has changed and should be re-sent to the GPU. Set this to true when you modify the value of the array.

Setting this to true also increments the [page:BufferAttribute.version version]. -

+

[property:Boolean normalized]

-
+

Indicates how the underlying data in the buffer maps to the values in the GLSL shader code. See the constructor above for details. -

+

[property:Function onUploadCallback]

-
+

A callback function that is executed after the Renderer has transfered the attribute array data to the GPU. -

+

[property:Object updateRange]

-
Object containing:
+

Object containing:
[page:Integer offset]: Default is *0*. Position at whcih to start update.
[page:Integer count]: Default is *-1*, which means don't use update ranges.

This can be used to only update some components of stored vectors (for example, just the component related to color). -

+

[property:Integer version]

-
A version number, incremented every time the [page:BufferAttribute.needsUpdate needsUpdate] property is set to true.
+

A version number, incremented every time the [page:BufferAttribute.needsUpdate needsUpdate] property is set to true.

Methods

[method:BufferAttribute clone]()

-
Return a copy of this bufferAttribute.
+

Return a copy of this bufferAttribute.

[method:BufferAttribute copyArray]( array )

-
Copy the array given here (which can be a normal array or TypedArray) into +

Copy the array given here (which can be a normal array or TypedArray) into [page:BufferAttribute.array array].

See [link:https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray/set TypedArray.set] for notes on requirements if copying a TypedArray. -

+

[method:null copyAt] ( [param:Integer index1], [param:BufferAttribute bufferAttribute], [param:Integer index2] )

-
Copy a vector from bufferAttribute[index2] to [page:BufferAttribute.array array][index1].
+

Copy a vector from bufferAttribute[index2] to [page:BufferAttribute.array array][index1].

[method:BufferAttribute copyColorsArray]( colors )

-
Copy an array representing RGB color values into [page:BufferAttribute.array array].
+

Copy an array representing RGB color values into [page:BufferAttribute.array array].

[method:BufferAttribute copyVector2sArray]( vectors )

-
Copy an array representing [page:Vector2]s into [page:BufferAttribute.array array].
+

Copy an array representing [page:Vector2]s into [page:BufferAttribute.array array].

[method:BufferAttribute copyVector3sArray]( vectors )

-
Copy an array representing [page:Vector3]s into [page:BufferAttribute.array array].
+

Copy an array representing [page:Vector3]s into [page:BufferAttribute.array array].

[method:BufferAttribute copyVector4sArray]( vectors )

-
Copy an array representing [page:Vector4]s into [page:BufferAttribute.array array].
+

Copy an array representing [page:Vector4]s into [page:BufferAttribute.array array].

[method:Number getX]( index )

-
Returns the x component of the vector at the given index.
+

Returns the x component of the vector at the given index.

[method:Number getY]( index )

-
Returns the y component of the vector at the given index.
+

Returns the y component of the vector at the given index.

[method:Number getZ]( index )

-
Returns the z component of the vector at the given index.
+

Returns the z component of the vector at the given index.

[method:Number getW]( index )

-
Returns the w component of the vector at the given index.
+

Returns the w component of the vector at the given index.

[method:null onUpload]( [param:Function callback] )

-
+

Sets the value of the onUploadCallback property.

In the [example:webgl_buffergeometry WebGL / Buffergeometry] this is used to free memory after the buffer has been transfered to the GPU. -

+

[method:null set] ( [param:Array value], [param:Integer offset] )

-
+

value -- an [page:Array] or [page:TypedArray] from which to copy values.
offset -- (optional) index of the [page:BufferAttribute.array array] at which to start copying.

@@ -173,38 +173,38 @@ In particular, see that page for requirements on [page:Array value] being a [page:TypedArray]. -

+

[method:null setArray] ( [param:TypedArray array] )

-
+

[page:BufferAttribute.array array] to the TypedArray passed in here.

After setting the array, [page:BufferAttribute.needsUpdate needsUpdate] should be set to true. -

+

[method:BufferAttribute setDynamic] ( [param:Boolean value] )

-
Set [page:BufferAttribute.dynamic dynamic] to value.
+

Set [page:BufferAttribute.dynamic dynamic] to value.

[method:null setX]( index, x )

-
Sets the x component of the vector at the given index.
+

Sets the x component of the vector at the given index.

[method:null setY]( index, y )

-
Sets the y component of the vector at the given index.
+

Sets the y component of the vector at the given index.

[method:null setZ]( index, z )

-
Sets the z component of the vector at the given index.
+

Sets the z component of the vector at the given index.

[method:null setW]( index, w )

-
Sets the w component of the vector at the given index.
+

Sets the w component of the vector at the given index.

[method:null setXY]( index, x, y )

-
Sets the x and y components of the vector at the given index.
+

Sets the x and y components of the vector at the given index.

[method:null setXYZ]( index, x, y, z )

-
Sets the x, y and z components of the vector at the given index.
+

Sets the x, y and z components of the vector at the given index.

[method:null setXYZW]( index, x, y, z, w )

-
Sets the x, y, z and w components of the vector at the given index.
+

Sets the x, y, z and w components of the vector at the given index.

diff --git a/docs/api/core/BufferGeometry.html b/docs/api/core/BufferGeometry.html index e7d841fbd4a54090a1651c27012fae30dac7fc12..8dd53b02b006b84e64389cc0e3a8749354e13f43 100644 --- a/docs/api/core/BufferGeometry.html +++ b/docs/api/core/BufferGeometry.html @@ -10,7 +10,6 @@

[name]

-

An efficient representation of mesh, line, or point geometry. Includes vertex positions, face indices, normals, colors, UVs, and custom attributes within buffers, reducing the cost of @@ -43,14 +42,14 @@ var material = new THREE.MeshBasicMaterial( { color: 0xff0000 } ); var mesh = new THREE.Mesh( geometry, material ); -

+

[example:webgl_buffergeometry Mesh with non-indexed faces]
[example:webgl_buffergeometry_indexed Mesh with indexed faces]
[example:webgl_buffergeometry_lines Lines]
[example:webgl_buffergeometry_lines_indexed Indexed Lines]
[example:webgl_buffergeometry_custom_attributes_particles Particles]
[example:webgl_buffergeometry_rawshader Raw Shaders] -

+

Accessing Attributes

@@ -68,21 +67,21 @@ The following attributes are set by various members of this class:

[page:BufferAttribute position] (itemSize: 3)

-
+

Stores the x, y, and z coordinates of each vertex in this geometry. Set by [page:.fromGeometry](). -

+

[page:BufferAttribute normal] (itemSize: 3)

-
+

Stores the x, y, and z components of the vertex normal vector of each vertex in this geometry. Set by [page:.fromGeometry](). -

+

[page:BufferAttribute color] (itemSize: 3)

-
+

Stores the red, green, and blue channels of vertex color of each vertex in this geometry. Set by [page:.fromGeometry](). -

+

In addition to the the built-in attributes, you can set your own custom attributes using the addAttribute method. With [page:Geometry], these attributes are set and stored on the [page:Material]. In BufferGeometry, the attributes are stored with the geometry itself. Note that you still need to set the attributes information on the material as well, but the value of each attribute is stored in the BufferGeometry. @@ -101,35 +100,35 @@

Properties

[property:Object attributes]

-
+

This hashmap has as id the name of the attribute to be set and as value the [page:BufferAttribute buffer] to set it to. Rather than accessing this property directly, use [page:.addAttribute] and [page:.getAttribute] to access attributes of this geometry. -

+

[property:Box3 boundingBox]

-
+

Bounding box for the bufferGeometry, which can be calculated with [page:.computeBoundingBox](). Default is *null*. -

+

[property:Sphere boundingSphere]

-
+

Bounding sphere for the bufferGeometry, which can be calculated with [page:.computeBoundingSphere](). Default is *null*. -

+

[property:Object drawRange]

-
+

Used to determine what part of the geometry should be rendered. This should not be set directly, instead use [page:.setDrawRange].
Default is { start: 0, count: Infinity } -

+

[property:Array groups]

-
+

Split the geometry into groups, each of which will be rendered in a separate WebGL draw call. This allows an array of materials to be used with the bufferGeometry.

@@ -140,25 +139,25 @@ materialIndex specifies the material array index to use.

Use [page:.addGroup] to add groups, rather than modifying this array directly. -

+

+

-->

[property:Integer id]

-
Unique number for this bufferGeometry instance.
+

Unique number for this bufferGeometry instance.

[property:BufferAttribute index]

-
+

Allows for vertices to be re-used across multiple triangles; this is called using "indexed triangles" and works much the same as it does in [page:Geometry]: each triangle is associated with the indices of three vertices. This attribute therefore stores the index of each vertex for each triangular face. @@ -167,169 +166,169 @@ positions represent a single triangle. Default is *null*. -

+

[property:Boolean isBufferGeometry]

-
+

Used to check whether this or derived classes are BufferGeometries. Default is *true*.

You should not change this, as it used internally for optimisation. -

+

[property:Object morphAttributes]

-
+

Hashmap of [page:BufferAttribute]s holding details of the geometry's [page:Geometry.morphTargets morphTargets]. -

+

[property:String name]

-
+

Optional name for this bufferGeometry instance. Default is an empty string. -

+

[property:String uuid]

-
+

[link:http://en.wikipedia.org/wiki/Universally_unique_identifier UUID] of this object instance. This gets automatically assigned and shouldn't be edited. -

+

Methods

[page:EventDispatcher EventDispatcher] methods are available on this class.

[method:null addAttribute]( [param:String name], [param:BufferAttribute attribute] )

-
+

Adds an attribute to this geometry. Use this rather than the attributes property, because an internal hashmap of [page:.attributes] is maintained to speed up iterating over attributes. -

+

[method:null addGroup]( [param:Integer start], [param:Integer count], [param:Integer materialIndex] )

-
+

Adds a group to this geometry; see the [page:BufferGeometry.groups groups] property for details. -

+

[method:null applyMatrix]( [param:Matrix4 matrix] )

-
Bakes matrix transform directly into vertex coordinates.
+

Bakes matrix transform directly into vertex coordinates.

[method:BufferGeometry center] ()

-
Center the geometry based on the bounding box.
+

Center the geometry based on the bounding box.

[method:BufferGeometry clone]()

-
Creates a clone of this BufferGeometry.
+

Creates a clone of this BufferGeometry.

[method:BufferGeometry copy]( [param:BufferGeometry bufferGeometry] )

-
Copies another BufferGeometry to this BufferGeometry.
+

Copies another BufferGeometry to this BufferGeometry.

[method:null clearGroups]( )

-
Clears all groups.
+

Clears all groups.

[method:null computeBoundingBox]()

-
+

Computes bounding box of the geometry, updating [param:.boundingBox] attribute.
Bounding boxes aren't computed by default. They need to be explicitly computed, otherwise they are *null*. -

+

[method:null computeBoundingSphere]()

-
+

Computes bounding sphere of the geometry, updating [page:.boundingSphere] attribute.
Bounding spheres aren't computed by default. They need to be explicitly computed, otherwise they are *null*. -

+

[method:null computeVertexNormals]()

-
Computes vertex normals by averaging face normals.
+

Computes vertex normals by averaging face normals.

[method:null dispose]()

-
+

Disposes the object from memory.
You need to call this when you want the bufferGeometry removed while the application is running. -

+

[method:BufferGeometry fromDirectGeometry]( [param:Geometry] )

-
+

Populates this BufferGeometry with data from a [page:DirectGeometry] object.

Note: [page:DirectGeometry] is mainly used as an intermediary object for converting between [page:Geometry] and BufferGeometry. -

+

[method:BufferGeometry fromGeometry]( [param:Geometry] )

-
Populates this BufferGeometry with data from a [page:Geometry] object.
+

Populates this BufferGeometry with data from a [page:Geometry] object.

[method:BufferAttribute getAttribute]( [param:String name] )

-
Returns the [page:BufferAttribute attribute] with the specified name.
+

Returns the [page:BufferAttribute attribute] with the specified name.

[method:BufferAttribute getIndex] ()

-
Return the [page:.index] buffer.
+

Return the [page:.index] buffer.

[method:BufferGeometry lookAt] ( [param:Vector3 vector] )

-
+

vector - A world vector to look at.

Rotates the geometry to face a point in space. This is typically done as a one time operation, and not during a loop. Use [page:Object3D.lookAt] for typical real-time mesh usage. -

+

[method:null merge]( [param:BufferGeometry bufferGeometry], [param:Integer offset] )

-
Merge in another BufferGeometry with an optional offset of where to start merging in.
+

Merge in another BufferGeometry with an optional offset of where to start merging in.

[method:null normalizeNormals]()

-
+

Every normal vector in a geometry will have a magnitude of 1. This will correct lighting on the geometry surfaces. -

+

[method:BufferAttribute removeAttribute]( [param:String name] )

-
Removes the [page:BufferAttribute attribute] with the specified name.
+

Removes the [page:BufferAttribute attribute] with the specified name.

[method:BufferGeometry rotateX] ( [param:Float radians] )

-
+

Rotate the geometry about the X axis. This is typically done as a one time operation, and not during a loop. Use [page:Object3D.rotation] for typical real-time mesh rotation. -

+

[method:BufferGeometry rotateY] ( [param:Float radians] )

-
+

Rotate the geometry about the Y axis. This is typically done as a one time operation, and not during a loop. Use [page:Object3D.rotation] for typical real-time mesh rotation. -

+

[method:BufferGeometry rotateZ] ( [param:Float radians] )

-
+

Rotate the geometry about the Z axis. This is typically done as a one time operation, and not during a loop. Use [page:Object3D.rotation] for typical real-time mesh rotation. -

+

[method:BufferGeometry scale] ( [param:Float x], [param:Float y], [param:Float z] )

-
+

Scale the geometry data. This is typically done as a one time operation, and not during a loop. Use [page:Object3D.scale] for typical real-time mesh scaling. -

+

[method:null setIndex] ( [param:BufferAttribute index] )

-
Set the [page:.index] buffer.
+

Set the [page:.index] buffer.

[method:null setDrawRange] ( [param:Integer start], [param:Integer count] )

-
Set the [page:.drawRange] buffer. See that property for details.
+

Set the [page:.drawRange] buffer. See that property for details.

[method:BufferGeometry setFromObject] ( [param:Object3D object] )

-
Sets the attributes for this BufferGeometry from an [page:Object3D].
+

Sets the attributes for this BufferGeometry from an [page:Object3D].

[method:BufferGeometry setFromPoints] ( [param:Array points] )

-
Sets the attributes for this BufferGeometry from an array of points.
+

Sets the attributes for this BufferGeometry from an array of points.

[method:Object toJSON]()

-
Returns a JSON object representation of the BufferGeometry.
+

Returns a JSON object representation of the BufferGeometry.

[method:BufferGeometry toNonIndexed]()

-
Return a non-index version of an indexed BufferGeometry.
+

Return a non-index version of an indexed BufferGeometry.

[method:BufferGeometry translate] ( [param:Float x], [param:Float y], [param:Float z] )

-
+

Translate the geometry. This is typically done as a one time operation, and not during a loop. Use [page:Object3D.position] for typical real-time mesh translation. -

+

[method:BufferGeometry updateFromObject] ( [param:Object3D object] )

Updates the attributes for this BufferGeometry from an [page:Object3D].
diff --git a/docs/api/core/Clock.html b/docs/api/core/Clock.html index bd5e5e373b597e4948b35205913d24f0c5238960..6f029009acd01ca7e53abbb6bc33c22e8c0d9e58 100644 --- a/docs/api/core/Clock.html +++ b/docs/api/core/Clock.html @@ -10,74 +10,74 @@

[name]

-
+

Object for keeping track of time. This uses performance.now() if it is available, otherwise it reverts to the less accurate Date.now(). -

+

Constructor

[name]( [param:Boolean autoStart] )

-
+

autoStart — (optional) whether to automatically start the clock. Default is true. -

+

Properties

[property:Boolean autoStart]

-
+

If set, starts the clock automatically when the first update is called. Default is true. -

+

[property:Float startTime]

-
+

Holds the time at which the clock's [page:Clock.start start] method was last called. -

+

[property:Float oldTime]

-
+

Holds the time at which the clock's [page:Clock.start start], [page:Clock.getElapsedTime getElapsedTime] or [page:Clock.getDelta getDelta] methods were last called. -

+

[property:Float elapsedTime]

-
+

Keeps track of the total time that the clock has been running. -

+

[property:Boolean running]

-
+

Whether the clock is running or not. -

+

Methods

[method:null start]()

-
+

Starts clock. Also sets the [page:Clock.startTime startTime] and [page:Clock.oldTime oldTime] to the current time, sets [page:Clock.elapsedTime elapsedTime] to *0* and [page:Clock.running running] to *true*. -

+

[method:null stop]()

-
+

Stops clock and sets [page:Clock.oldTime oldTime] to the current time. -

+

[method:Float getElapsedTime]()

-
+

Get the seconds passed since the clock started and sets [page:Clock.oldTime oldTime] to the current time.
If [page:Clock.autoStart autoStart] is *true* and the clock is not running, also starts the clock. -

+

[method:Float getDelta]()

-
+

Get the seconds passed since the time [page:Clock.oldTime oldTime] was set and sets [page:Clock.oldTime oldTime] to the current time.
If [page:Clock.autoStart autoStart] is *true* and the clock is not running, also starts the clock. -

+

Source

diff --git a/docs/api/core/DirectGeometry.html b/docs/api/core/DirectGeometry.html index 2558e321df991f2edb58474e8ca0a64973b8d720..925cb1bdca95642ed3fc14d757381d9624581d71 100644 --- a/docs/api/core/DirectGeometry.html +++ b/docs/api/core/DirectGeometry.html @@ -10,9 +10,9 @@

[name]

-
+

This class is used internally to convert from [page:Geometry] to [page:BufferGeometry]. -

+

@@ -20,85 +20,85 @@

[name]()

-
This creates a new [name].
+

This creates a new [name].

Properties

[property:Integer id]

-
Unique number for this [name] instance.
+

Unique number for this [name] instance.

[property:String name]

-
Optional name. Default is the empty string.
+

Optional name. Default is the empty string.

[property:Array type]

-
String 'DirectGeometry'.
+

String 'DirectGeometry'.

[property:Array vertices]

-
Initialiased as an empty array, this is populated by [page:.fromGeometry]().
+

Initialiased as an empty array, this is populated by [page:.fromGeometry]().

[property:Array normals]

-
Initialiased as an empty array, this is populated by [page:.fromGeometry]().
+

Initialiased as an empty array, this is populated by [page:.fromGeometry]().

[property:Array colors]

-
Initialiased as an empty array, this is populated by [page:.fromGeometry]().
+

Initialiased as an empty array, this is populated by [page:.fromGeometry]().

[property:Array uvs]

-
Initialiased as an empty array, this is populated by [page:.fromGeometry]().
+

Initialiased as an empty array, this is populated by [page:.fromGeometry]().

[property:Array uvs2]

-
Initialiased as an empty array, this is populated by [page:.fromGeometry]().
+

Initialiased as an empty array, this is populated by [page:.fromGeometry]().

[property:Array groups]

-
Initialiased as an empty array, this is populated by [page:.fromGeometry]().
+

Initialiased as an empty array, this is populated by [page:.fromGeometry]().

[property:Array morphTargets]

-
Initialiased as an empty array, this is populated by [page:.fromGeometry]().
+

Initialiased as an empty array, this is populated by [page:.fromGeometry]().

[property:Array skinWeights]

-
Initialiased as an empty array, this is populated by [page:.fromGeometry]().
+

Initialiased as an empty array, this is populated by [page:.fromGeometry]().

[property:Array skinIndices]

-
Initialiased as an empty array, this is populated by [page:.fromGeometry]().
+

Initialiased as an empty array, this is populated by [page:.fromGeometry]().

[property:Box3 boundingBox]

-
+

Bounding box for the bufferGeometry, which can be calculated with [page:.computeBoundingBox](). Default is *null*. -

+

[property:Sphere boundingSphere]

-
+

Bounding sphere for the bufferGeometry, which can be calculated with [page:.computeBoundingSphere](). Default is *null*. -

+

[property:Boolean verticesNeedUpdate]

-
Default is false.
+

Default is false.

[property:Boolean normalsNeedUpdate]

-
Default is false.
+

Default is false.

[property:Boolean colorsNeedUpdate]

-
Default is false.
+

Default is false.

[property:Boolean uvsNeedUpdate]

-
Default is false.
+

Default is false.

[property:Boolean groupsNeedUpdate]

-
Default is false.
+

Default is false.

Methods

[property:null computeGroups]( [page:Geometry geometry] )

-
+

Compute the parts of the geometry that have different materialIndex. See [page:BufferGeometry.groups]. -

+

[property:null fromGeometry]( [page:Geometry geometry] )

-
Pass in a [page:Geometry] instance for conversion.
+

Pass in a [page:Geometry] instance for conversion.

Source

diff --git a/docs/api/core/EventDispatcher.html b/docs/api/core/EventDispatcher.html index 8ae0e210d43a370dfc8cff544835aaffed100cb2..08d72686bd2ae7b0a4a650e751124f508c2b019b 100644 --- a/docs/api/core/EventDispatcher.html +++ b/docs/api/core/EventDispatcher.html @@ -10,10 +10,10 @@

[name]

-
+

JavaScript events for custom objects.
[link:https://github.com/mrdoob/eventdispatcher.js Eventdispatcher on GitHub] -

+

Example

@@ -50,47 +50,47 @@ car.start();

Constructor

[name]()

-
+

Creates EventDispatcher object. -

+

Methods

[method:null addEventListener]( [param:String type], [param:Function listener] )

-
+

type - The type of event to listen to.
listener - The function that gets called when the event is fired. -

-
+

+

Adds a listener to an event type. -

+

[method:Boolean hasEventListener]( [param:String type], [param:Function listener] )

-
+

type - The type of event to listen to.
listener - The function that gets called when the event is fired. -

-
+

+

Checks if listener is added to an event type. -

+

[method:null removeEventListener]( [param:String type], [param:Function listener] )

-
+

type - The type of the listener that gets removed.
listener - The listener function that gets removed. -

-
+

+

Removes a listener from an event type. -

+

[method:null dispatchEvent]( [param:object event] )

-
+

event - The event that gets fired. -

-
+

+

Fire an event type. -

+

Source

diff --git a/docs/api/core/Face3.html b/docs/api/core/Face3.html index 5391e6aa05411a7bc44286b8f9bdf04a77e63c1d..1d887df5079ab606fad00576aeac15cdae9b63bc 100644 --- a/docs/api/core/Face3.html +++ b/docs/api/core/Face3.html @@ -10,19 +10,19 @@

[name]

-
+

Triangular face used in [page:Geometry]. These are created automatically for all standard geometry types, however if you are building a custom geometry you will have to create them manually. -

+

Examples

-
[example:misc_ubiquity_test ubiquity / test ]
-
[example:svg_sandbox svg / sandbox ]
-
[example:misc_exporter_obj exporter / obj ]
-
[example:webgl_shaders_vector WebGL / shaders / vector ]
+

[example:misc_ubiquity_test ubiquity / test ]

+

[example:svg_sandbox svg / sandbox ]

+

[example:misc_exporter_obj exporter / obj ]

+

[example:webgl_shaders_vector WebGL / shaders / vector ]

@@ -54,7 +54,7 @@ scene.add( new THREE.Mesh( geometry, material ) );

Constructor

[name]( [param:Integer a], [param:Integer b], [param:Integer c], [param:Vector3 normal], [param:Color color], [param:Integer materialIndex] )

-
+

a — Vertex A index.
b — Vertex B index.
c — Vertex C index.

@@ -69,62 +69,62 @@ scene.add( new THREE.Mesh( geometry, material ) ); materialIndex — (optional) which index of an array of materials to associate with the face. -

+

Properties

[property:Integer a]

-
+

Vertex A index. -

+

[property:Integer b]

-
+

Vertex B index. -

+

[property:Integer c]

-
+

Vertex C index. -

+

[property:Vector3 normal]

-
+

Face normal - vector showing the direction of the Face3. If calculated automatically (using [page:Geometry.computeFaceNormals]), this is the normalized cross product of two edges of the triangle. Default is *(0, 0, 0)*. -

+

[property:Color color]

-
+

Face color - for this to be used a material's [page:Material.vertexColors vertexColors] property must be set to [page:Materials THREE.FaceColors]. -

+

[property:Array vertexNormals]

-
+

Array of 3 [page:Vector3 vertex normals]. -

+

[property:Array vertexColors]

-
+

Array of 3 vertex colors - for these to be used a material's [page:Material.vertexColors vertexColors] property must be set to [page:Materials THREE.VertexColors]. -

+

[property:Integer materialIndex]

-
+

Material index (points to an index in the associated array of materials). Default is *0*. -

+

Methods

[method:Face3 clone]()

-
Creates a new clone of the Face3 object.
+

Creates a new clone of the Face3 object.

[method:Face3 copy]( [param:Face3 face3] )

-
Copy the paramaters of another Face3 into this.
+

Copy the paramaters of another Face3 into this.

Source

diff --git a/docs/api/core/Geometry.html b/docs/api/core/Geometry.html index 46851c521467d1eed36f2a7f770ef42f494129da..8abddb54bda309a15fa0c8067661743eddc6fd70 100644 --- a/docs/api/core/Geometry.html +++ b/docs/api/core/Geometry.html @@ -52,101 +52,101 @@

[name]()

-
+

The constructor takes no arguments. -

+

Properties

[property:Box3 boundingBox]

-
+

Bounding box for the Geometry, which can be calculated with [page:.computeBoundingBox](). Default is *null*. -

+

[property:Sphere boundingSphere]

-
+

Bounding sphere for the Geometry, which can be calculated with [page:.computeBoundingSphere](). Default is *null*. -

+

[property:Array colors]

-
+

Array of vertex [page:Color colors], matching number and order of vertices.

This is used by [page:Points] and [page:Line] and any classes derived from those such as [page:LineSegments] and various helpers. [page:Mesh Meshes] use [page:Face3.vertexColors] instead of this.

To signal an update in this array, [page:Geometry Geometry.colorsNeedUpdate] needs to be set to true. -

+

[property:Array faces]

-
+

Array of [page:Face3 faces].
The array of faces describe how each vertex in the model is connected to form faces. Additionally it holds information about face and vertex normals and colors.

To signal an update in this array, [page:Geometry Geometry.elementsNeedUpdate] needs to be set to true. -

+

[property:Array faceVertexUvs]

-
+

Array of face [link:https://en.wikipedia.org/wiki/UV_mapping UV] layers, used for mapping textures onto the geometry.
Each UV layer is an array of [page:UV]s matching the order and number of vertices in faces.

To signal an update in this array, [page:Geometry Geometry.uvsNeedUpdate] needs to be set to true. -

+

[property:Integer id]

-
Unique number for this geometry instance.
+

Unique number for this geometry instance.

[property:Boolean isGeometry]

-
+

Used to check whether this or derived classes are Geometries. Default is *true*.

You should not change this, as it used internally for optimisation. -

+

[property:array lineDistances]

-
+

An array containing distances between vertices for Line geometries. This is required for [page:LineDashedMaterial] to render correctly. -

+

[property:Array morphTargets]

-
+

Array of [link:https://en.wikipedia.org/wiki/Morph_target_animation morph targets]. Each morph target is a Javascript object: { name: "targetName", vertices: [ new THREE.Vector3(), ... ] } Morph vertices match number and order of primary vertices. -

+

[property:Array morphNormals]

-
+

Array of morph normals. Morph normals have similar structure as morph targets, each normal set is a Javascript object: morphNormal = { name: "NormalName", normals: [ new THREE.Vector3(), ... ] } See the [example:webgl_morphnormals WebGL / morphNormals] example. -

+

[property:String name]

-
Optional name for this geometry. Default is an empty string.
+

Optional name for this geometry. Default is an empty string.

[property:Array skinWeights]

-
+

When working with a [page:SkinnedMesh], each vertex can have up to 4 [page:Bone bones] affecting it. The skinWeights property is an array of weight values that correspond to the order of the vertices in the geometry. So for instance, the first skinWeight would correspond to the first vertex in the geometry. Since each vertex can be modified by 4 bones, a [page:Vector4] is used to represent the skin weights for that vertex. -

-
+

+

The values of the vector should typically be between 0 and 1. For instance when set to 0 the bone transformation will have no affect. When set to 0.5 it will have 50% affect. When set to 100%, it will have 100% affect. If there is only 1 bone associated with the vertex then you only need to worry about the first component of the vector, the rest can be ignored and set to 0. -

+

[property:Array skinIndices]

-
+

Just like the skinWeights property, the skinIndices' values correspond to the geometry's vertices. Each vertex can have up to 4 bones associated with it. So if you look at the first vertex, and the first skinIndex, this will tell you the bones associated with that vertex. For example the first vertex @@ -155,8 +155,8 @@ ( 0.8, 0.2, 0, 0 ). In affect this would take the first vertex, and then the bone mesh.bones[10] and apply it 80% of the way. Then it would take the bone skeleton.bones[2] and apply it 20% of the way. The next two values have a weight of 0, so they would have no affect. -

-
+

+

In code another example could look like this: // e.g. @@ -172,41 +172,41 @@ skeleton.bones[9]; // weight of 0.3 skeleton.bones[10]; // weight of 0 -

+

[property:String uuid]

-
+

[link:http://en.wikipedia.org/wiki/Universally_unique_identifier UUID] of this object instance. This gets automatically assigned and shouldn't be edited. -

+

[property:Array vertices]

-
+

Array of [page:Vector3 vertices].
The array of vertices holds the position of every vertex in the model.
To signal an update in this array, [page:.verticesNeedUpdate] needs to be set to true. -

+

[property:Boolean verticesNeedUpdate]

-
Set to *true* if the vertices array has been updated.
+

Set to *true* if the vertices array has been updated.

[property:Boolean elementsNeedUpdate]

-
Set to *true* if the faces array has been updated.
+

Set to *true* if the faces array has been updated.

[property:Boolean uvsNeedUpdate]

-
Set to *true* if the uvs array has been updated.
+

Set to *true* if the uvs array has been updated.

[property:Boolean normalsNeedUpdate]

-
Set to *true* if the normals array has been updated.
+

Set to *true* if the normals array has been updated.

[property:Boolean colorsNeedUpdate]

-
Set to *true* if the colors array or a face3 color has been updated.
+

Set to *true* if the colors array or a face3 color has been updated.

[property:Boolean groupsNeedUpdate]

-
Set to *true* if a face3 materialIndex has been updated.
+

Set to *true* if a face3 materialIndex has been updated.

[property:Boolean lineDistancesNeedUpdate]

-
Set to *true* if the linedistances array has been updated.
+

Set to *true* if the linedistances array has been updated.

Methods

@@ -214,128 +214,128 @@

[page:EventDispatcher EventDispatcher] methods are available on this class.

[method:null applyMatrix]( [param:Matrix4 matrix] )

-
Bakes matrix transform directly into vertex coordinates.
+

Bakes matrix transform directly into vertex coordinates.

[method:Geometry center] ()

-
Center the geometry based on the bounding box.
+

Center the geometry based on the bounding box.

[method:Geometry clone]()

-
+

Creates a new clone of the Geometry.

This method copies only vertices, faces and uvs. It does not copy any other properties of the geometry. -

+

[method:null computeBoundingBox]()

-
Computes bounding box of the geometry, updating [page:Geometry Geometry.boundingBox] attribute.
+

Computes bounding box of the geometry, updating [page:Geometry Geometry.boundingBox] attribute.

[method:null computeBoundingSphere]()

-
Computes bounding sphere of the geometry, updating [page:Geometry Geometry.boundingSphere] attribute.
+

Computes bounding sphere of the geometry, updating [page:Geometry Geometry.boundingSphere] attribute.

-
+

Neither bounding boxes or bounding spheres are computed by default. They need to be explicitly computed, otherwise they are *null*. -

+

[method:null computeFaceNormals]()

-
Computes [page:Face3.normal face normals].
+

Computes [page:Face3.normal face normals].

[method:null computeFlatVertexNormals]()

-
Computes flat [page:Face3.vertexNormals vertex normals]. Sets the vertex normal of each vertex of each face to be the same as the face's normal.
+

Computes flat [page:Face3.vertexNormals vertex normals]. Sets the vertex normal of each vertex of each face to be the same as the face's normal.

[method:null computeMorphNormals]()

-
Computes [page:.morphNormals].
+

Computes [page:.morphNormals].

[method:null computeVertexNormals]( [param:Boolean areaWeighted] )

-
+

areaWeighted - If true the contribution of each face normal to the vertex normal is weighted by the area of the face. Default is true.

Computes vertex normals by averaging face normals. -

+

[method:Geometry copy]( [param:Geometry geometry] )

-
+

Copies vertices, faces and uvs into this geometry. It does not copy any other properties of the geometry. -

+

[method:null dispose]()

-
+

Removes The object from memory.
Don't forget to call this method when you remove a geometry because it can cause memory leaks. -

+

[method:Geometry fromBufferGeometry]( [param:BufferGeometry geometry] )

-
Convert a [page:BufferGeometry] to a Geometry.
+

Convert a [page:BufferGeometry] to a Geometry.

[method:Geometry lookAt] ( [param:Vector3 vector] )

-
+

vector - A world vector to look at.

Rotates the geometry to face point in space. This is typically done as a one time operation but not during the render loop.
Use [page:Object3D.lookAt] for typical real-time mesh usage. -

+

[method:null merge]( [param:Geometry geometry], [param:Matrix4 matrix], [param:Integer materialIndexOffset] )

-
Merge two geometries or geometry and geometry from object (using object's transform)
+

Merge two geometries or geometry and geometry from object (using object's transform)

[method:null mergeMesh]( [param:Mesh mesh] )

-
Merge the mesh's geometry with this, also applying the mesh's transform.
+

Merge the mesh's geometry with this, also applying the mesh's transform.

[method:null mergeVertices]()

-
+

Checks for duplicate vertices using hashmap.
Duplicated vertices are removed and faces' vertices are updated. -

+

[method:null normalize]()

-
+

Normalize the geometry.
Make the geometry centered and have a bounding sphere of radius *1.0*. -

+

[method:Geometry rotateX] ( [param:Float radians] )

-
+

Rotate the geometry about the X axis. This is typically done as a one time operation but not during the render loop.
Use [page:Object3D.rotation] for typical real-time mesh rotation. -

+

[method:Geometry rotateY] ( [param:Float radians] )

-
+

Rotate the geometry about the Y axis. This is typically done as a one time operation but not during the render loop.
Use [page:Object3D.rotation] for typical real-time mesh rotation. -

+

[method:Geometry rotateZ] ( [param:Float radians] )

-
+

Rotate the geometry about the Z axis. This is typically done as a one time operation but not during the render loop.
Use [page:Object3D.rotation] for typical real-time mesh rotation. -

+

[method:Geometry setFromPoints] ( [param:Array points] )

-
Sets the vertices for this Geometry from an array of points.
+

Sets the vertices for this Geometry from an array of points.

[method:null sortFacesByMaterialIndex] ( )

-
+

Sorts the faces array according to material index. For complex geometries with several materials, this can result in reduced draw calls and improved performance. -

+

[method:Geometry scale] ( [param:Float x], [param:Float y], [param:Float z] )

-
+

Scale the geometry data. This is typically done as a one time operation but not during the render loop.
Use [page:Object3D.scale] for typical real-time mesh scaling. -

+

[method:JSON toJSON] ( )

-
Convert the geometry to JSON format.
+

Convert the geometry to JSON format.

[method:Geometry translate] ( [param:Float x], [param:Float y], [param:Float z] )

-
+

Translate the geometry. This is typically done as a one time operation but not during the render loop.
Use [page:Object3D.position] for typical real-time mesh translation. -

+

Source

diff --git a/docs/api/core/InstancedBufferAttribute.html b/docs/api/core/InstancedBufferAttribute.html index da10eac4da7a7d6f996d43b52bf4dfc477fb348d..1e74494a7acef10eefa8d37b7f29e58859dbc612 100644 --- a/docs/api/core/InstancedBufferAttribute.html +++ b/docs/api/core/InstancedBufferAttribute.html @@ -12,30 +12,30 @@

[name]

-
+

An instanced version of [page:BufferAttribute]. -

+

Constructor

[name]( [param:TypedArray array], [param:Integer itemSize], [param:Number meshPerAttribute] )

-
-
+

+

Properties

See [page:BufferAttribute] for inherited properties.

[property:Number meshPerAttribute]

-
+

Default is *1*. -

+

[property:Boolean isInstancedBufferAttribute]

-
+

Default is *true*. -

+

Methods

- See [page:BufferAttribute] for inherited methods. +

See [page:BufferAttribute] for inherited methods.

Source

diff --git a/docs/api/core/InstancedBufferGeometry.html b/docs/api/core/InstancedBufferGeometry.html index 2d12d9ba322ccf4da91da38737cadbf399706930..27eefc3bbd0ff9211774ad26d25bf14d10593d5d 100644 --- a/docs/api/core/InstancedBufferGeometry.html +++ b/docs/api/core/InstancedBufferGeometry.html @@ -12,35 +12,35 @@

[name]

-
+

An instanced version of [page:BufferGeometry]. -

+

Constructor

[name]( )

-
-
+

+

Properties

See [page:BufferGeometry] for inherited properties.

[property:Number maxInstancedCount]

-
+

Default is *undefined*. -

+

[property:Boolean isInstancedBufferGeometry]

-
+

Default is *true*. -

+

Methods

- See [page:BufferAttribute] for inherited methods. +

See [page:BufferAttribute] for inherited methods.

[property:Number addGroup]( start, count, materialIndex )

-
+

-

+

Source

diff --git a/docs/api/core/InstancedInterleavedBuffer.html b/docs/api/core/InstancedInterleavedBuffer.html index 0687c6b35de3d7b858981e13b43c566ee1b79e24..b3537667e0904d96ed4bbd34918e62df085dc2de 100644 --- a/docs/api/core/InstancedInterleavedBuffer.html +++ b/docs/api/core/InstancedInterleavedBuffer.html @@ -12,30 +12,34 @@

[name]

-
+

An instanced version of [page:InterleavedBuffer]. -

+

Constructor

[name]( [param:TypedArray array], [param:Integer itemSize], [param:Number meshPerAttribute] )

-
-
+

+

Properties

- See [page:InterleavedBuffer] for inherited properties. +

+ See [page:InterleavedBuffer] for inherited properties. +

[property:Number meshPerAttribute]

-
+

Default is *1*. -

+

[property:Boolean isInstancedInterleavedBuffer]

-
+

Default is *true*. -

+

Methods

- See [page:InterleavedBuffer] for inherited methods. +

+ See [page:InterleavedBuffer] for inherited methods. +

Source

diff --git a/docs/api/core/InterleavedBuffer.html b/docs/api/core/InterleavedBuffer.html index d12e732c2b2ed7c01812cdddb59f520158129686..f6d2cc126889ab138ae1c76be8f129cbb43143c6 100644 --- a/docs/api/core/InterleavedBuffer.html +++ b/docs/api/core/InterleavedBuffer.html @@ -10,107 +10,107 @@

[name]

-
+

"Interleaved" means that multiple attributes, possibly of different types, (e.g., position, normal, uv, color) are packed into a single array buffer.

An introduction into interleaved arrays can be found here: [link:https://blog.tojicode.com/2011/05/interleaved-array-basics.html Interleaved array basics] -

+

Example

-
[example:webgl_buffergeometry_points_interleaved webgl / buffergeometry / points / interleaved]
+

[example:webgl_buffergeometry_points_interleaved webgl / buffergeometry / points / interleaved]

Constructor

[name]( [param:TypedArray array], [param:Integer stride] )

-
+

[page:TypedArray array] -- A typed array with a shared buffer. Stores the geometry data.
[page:Integer stride] -- The number of typed-array elements per vertex. -

+

Properties

[property:Array array]

-
+

A typed array with a shared buffer. Stores the geometry data. -

+

[property:Integer stride]

-
+

The number of typed-array elements per vertex. -

+

[property:Integer count]

-
+

Gives the total number of elements in the array. -

+

[property:Boolean dynamic]

-
+

Default is *false*. -

+

[property:Object updateRange]

-
+

Object containing offset and count. -

+

[property:Number updateRange.offset]

-
+

Default is *0*. -

+

[property:Number updateRange.count]

-
+

Default is *-1*. -

+

[property:Integer version]

-
+

A version number, incremented every time the needsUpdate property is set to true. -

+

[property:Integer isInterleavedBuffer]

-
+

Default is *true*. -

+

[property:Integer needsUpdate]

-
+

Default is *false*. Setting this to true increments [page:InterleavedBuffer.version version]. -

+

Methods

[method:null setArray] ( [param:TypedArray array] )

-
+

array - must be a Typed Array. -

+

[method:InterleavedBuffer setDynamic] ( [param:Boolean value] )

-
+

Set [page:InterleavedBuffer.dynamic dynamic] to value. -

+

[method:InterleavedBuffer copy]( source )

-
+

Copies another [name] to this [name]. -

+

[method:InterleavedBuffer copyAt]( index1, attribute, index2 )

-
Copies data from attribute[index2] to [page:InterleavedBuffer.array array][index1].
+

Copies data from attribute[index2] to [page:InterleavedBuffer.array array][index1].

[method:InterleavedBuffer set]( value, offset )

-
+

value - The source (typed) array.
offset - The offset into the target array at which to begin writing values from the source array. Default is *0*.

Stores multiple values in the buffer, reading input values from a specified array. -

+

[method:InterleavedBuffer clone]()

-
+

Creates a clone of this [name]. -

+

Source

diff --git a/docs/api/core/InterleavedBufferAttribute.html b/docs/api/core/InterleavedBufferAttribute.html index 473cdd77247ba198b22f09a4536b251b6522dbb0..0181aaecf2d942ae457faa864749333082a23dfb 100644 --- a/docs/api/core/InterleavedBufferAttribute.html +++ b/docs/api/core/InterleavedBufferAttribute.html @@ -11,89 +11,89 @@

[name]

-
+

-

+

Constructor

[name]( [param:InterleavedBuffer interleavedBuffer], [param:Integer itemSize], [param:Integer offset], [param:Boolean normalized] )

-
-
+

+

Properties

[property:InterleavedBuffer data]

-
+

The [page:InterleavedBuffer InterleavedBuffer] instance passed in the constructor. -

+

[property:TypedArray array]

-
+

The value of [page:InterleavedBufferAttribute.data data].array. -

+

[property:Integer count]

-
+

The value of [page:InterleavedBufferAttribute.data data].count. If the buffer is storing a 3-component item (such as a position, normal, or color), then this will count the number of such items stored. -

+

[property:Integer itemSize]

-
+

How many values make up each item. -

+

[property:Integer offset]

-
+

The offset in the underlying array buffer where an item starts. -

+

[property:Boolean normalized]

-
+

Default is *true*. -

+

[property:Boolean isInterleavedBufferAttribute]

-
+

Default is *true*. -

+

Methods

[method:Number getX]( index )

-
Returns the x component of the item at the given index.
+

Returns the x component of the item at the given index.

[method:Number getY]( index )

-
Returns the y component of the item at the given index.
+

Returns the y component of the item at the given index.

[method:Number getZ]( index )

-
Returns the z component of the item at the given index.
+

Returns the z component of the item at the given index.

[method:Number getW]( index )

-
Returns the w component of the item at the given index.
+

Returns the w component of the item at the given index.

[method:null setX]( index, x )

-
Sets the x component of the item at the given index.
+

Sets the x component of the item at the given index.

[method:null setY]( index, y )

-
Sets the y component of the item at the given index.
+

Sets the y component of the item at the given index.

[method:null setZ]( index, z )

-
Sets the z component of the item at the given index.
+

Sets the z component of the item at the given index.

[method:null setW]( index, w )

-
Sets the w component of the item at the given index.
+

Sets the w component of the item at the given index.

[method:null setXY]( index, x, y )

-
Sets the x and y components of the item at the given index.
+

Sets the x and y components of the item at the given index.

[method:null setXYZ]( index, x, y, z )

-
Sets the x, y and z components of the item at the given index.
+

Sets the x, y and z components of the item at the given index.

[method:null setXYZW]( index, x, y, z, w )

-
Sets the x, y, z and w components of the item at the given index.
+

Sets the x, y, z and w components of the item at the given index.

diff --git a/docs/api/core/Layers.html b/docs/api/core/Layers.html index 53e8c9ad026e8299825e10fe4c8c60e3cf53c90c..a35b512c2bb0806baa12ad286b3adafb3273e932 100644 --- a/docs/api/core/Layers.html +++ b/docs/api/core/Layers.html @@ -10,70 +10,70 @@

[name]

-
- A [page:Layers] object assigns an [page:Object3D] to 1 or more of 32 layers numbered 0 to 31 - - internally the layers are stored as a [link:https://en.wikipedia.org/wiki/Mask_(computing) bit mask], and by default all - Object3Ds are a member of layer 0.

+

+ A [page:Layers] object assigns an [page:Object3D] to 1 or more of 32 layers numbered 0 to 31 + - internally the layers are stored as a [link:https://en.wikipedia.org/wiki/Mask_(computing) bit mask], and by default all + Object3Ds are a member of layer 0.

- This can be used to control visibility - an object must share a layer with a [page:Camera camera] to be visible when that camera's - view is renderered.

+ This can be used to control visibility - an object must share a layer with a [page:Camera camera] to be visible when that camera's + view is renderered.

- All classes that inherit from [page:Object3D] have an [page:Object3D.layers] property which is an instance of this class. -

+ All classes that inherit from [page:Object3D] have an [page:Object3D.layers] property which is an instance of this class. +

Constructor

[name]()

-
+

Create a new Layers object, with membership initially set to layer 0. -

+

Properties

[property:Integer mask]

-
- A bit mask storing which of the 32 layers this layers object is currently a member of. -
+

+ A bit mask storing which of the 32 layers this layers object is currently a member of. +

Methods

[method:null disable]( [param:Integer layer] )

-
+

layer - an integer from 0 to 31.

Remove membership of this *layer*. -

+

[method:null enable]( [param:Integer layer] )

-
+

layer - an integer from 0 to 31.

Add membership of this *layer*. -

+

[method:null set]( [param:Integer layer] )

-
+

layer - an integer from 0 to 31.

Set membership to *layer*, and remove membership all other layers. -

+

[method:Boolean test]( [param:Layers layers] )

-
+

layers - a Layers object

Returns true if this and the passed *layers* object are members of the same set of layers. -

+

[method:null toggle]( [param:Integer layer] )

-
+

layer - an integer from 0 to 31.

Toggle membership of *layer*. -

+

Source

diff --git a/docs/api/core/Object3D.html b/docs/api/core/Object3D.html index 050d8bf16ab80ab3a33c4d2383368b5e1b34eca0..9fada526286baa61172c31e3693d382db5ff2387 100644 --- a/docs/api/core/Object3D.html +++ b/docs/api/core/Object3D.html @@ -10,178 +10,178 @@

[name]

-
+

This is the base class for most objects in three.js and provides a set of properties and methods for manipulating objects in 3D space.

Note that this can be used for grouping objects via the [page:.add]( object ) method which adds the object as a child, however it is better to use [page:Group] for this. -

+

Constructor

[name]()

-
+

The constructor takes no arguments. -

+

Properties

[property:Boolean castShadow]

-
Whether the object gets rendered into shadow map. Default is *false*.
+

Whether the object gets rendered into shadow map. Default is *false*.

[property:Object3D children]

-
Array with object's children. See [page:Group] for info on manually grouping objects.
+

Array with object's children. See [page:Group] for info on manually grouping objects.

[property:Boolean frustumCulled]

-
+

When this is set, it checks every frame if the object is in the frustum of the camera before rendering the object. Otherwise the object gets renderered every frame even if it isn't visible. Default is *true*. -

+

[property:Integer id]

-
readonly – Unique number for this object instance.
+

readonly – Unique number for this object instance.

[property:Boolean isObject]

-
+

Used to check whether this or derived classes are Object3Ds. Default is *true*.

You should not change this, as it is used internally for optimisation. -

+

[property:Layers layers]

-
+

The layer membership of the object. The object is only visible if it has at least one layer in common with the [page:Camera] in use. -

+

[property:Matrix4 matrix]

-
The local transform matrix.
+

The local transform matrix.

[property:Boolean matrixAutoUpdate]

-
+

When this is set, it calculates the matrix of position, (rotation or quaternion) and scale every frame and also recalculates the matrixWorld property. Default is [page:Object3D.DefaultMatrixAutoUpdate] (true). -

+

[property:Matrix4 matrixWorld]

-
+

The global transform of the object. If the Object3D has no parent, then it's identical to the local transform [page:.matrix]. -

+

[property:Boolean matrixWorldNeedsUpdate]

-
+

When this is set, it calculates the matrixWorld in that frame and resets this property to false. Default is *false*. -

+

[property:Matrix4 modelViewMatrix]

-
This is passed to the shader and used to calculate the position of the object.
+

This is passed to the shader and used to calculate the position of the object.

[property:String name]

-
Optional name of the object (doesn't need to be unique). Default is an empty string.
+

Optional name of the object (doesn't need to be unique). Default is an empty string.

[property:Matrix3 normalMatrix]

-
+

This is passed to the shader and used to calculate lighting for the object. It is the transpose of the inverse of the upper left 3x3 sub-matrix of this object's modelViewMatrix.

The reason for this special matrix is that simply using the modelViewMatrix could result in a non-unit length of normals (on scaling) or in a non-perpendicular direction (on non-uniform scaling).

On the other hand the translation part of the modelViewMatrix is not relevant for the calculation of normals. Thus a Matrix3 is sufficient. -

+

[property:function onAfterRender]

-
+

An optional callback that is executed immediately after the Object3D is rendered. This function is called with the following parameters: renderer, scene, camera, geometry, material, group. -

+

[property:function onBeforeRender]

-
+

An optional callback that is executed immediately before the Object3D is rendered. This function is called with the following parameters: renderer, scene, camera, geometry, material, group. -

+

[property:Object3D parent]

-
Object's parent in the [link:https://en.wikipedia.org/wiki/Scene_graph scene graph].
+

Object's parent in the [link:https://en.wikipedia.org/wiki/Scene_graph scene graph].

[property:Vector3 position]

-
A [page:Vector3] representing the object's local position. Default is (0, 0, 0).
+

A [page:Vector3] representing the object's local position. Default is (0, 0, 0).

[property:Quaternion quaternion]

-
Object's local rotation as a [page:Quaternion Quaternion].
+

Object's local rotation as a [page:Quaternion Quaternion].

[property:Boolean receiveShadow]

-
Whether the material receives shadows. Default is *false*.
+

Whether the material receives shadows. Default is *false*.

[property:Number renderOrder]

-
+

This value allows the default rendering order of [link:https://en.wikipedia.org/wiki/Scene_graph scene graph] objects to be overridden although opaque and transparent objects remain sorted independently. Sorting is from lowest to highest renderOrder. Default value is *0*. -

+

[property:Euler rotation]

-
+

Object's local rotation (see [link:https://en.wikipedia.org/wiki/Euler_angles Euler angles]), in radians. -

+

[property:Vector3 scale]

-
- The object's local [property:Vector3 scale]. Default is [page:Vector3]( 1, 1, 1 ). -
+

+ The object's local scale. Default is [page:Vector3]( 1, 1, 1 ). +

[property:Vector3 up]

-
+

This is used by the [page:.lookAt lookAt] method, for example, to determine the orientation of the result.
Default is [page:Object3D.DefaultUp] - that is, ( 0, 1, 0 ). -

+

[property:object userData]

-
+

An object that can be used to store custom data about the Object3D. It should not hold references to functions as these will not be cloned. -

+

[property:String uuid]

-
+

[link:http://en.wikipedia.org/wiki/Universally_unique_identifier UUID] of this object instance. This gets automatically assigned, so this shouldn't be edited. -

+

[property:Boolean visible]

-
Object gets rendered if *true*. Default is *true*.
+

Object gets rendered if *true*. Default is *true*.

Static Properties

-
+

Static properties and methods are defined per class rather than per instance of that class. This means that changing [page:Object3D.DefaultUp] or [page:Object3D.DefaultMatrixAutoUpdate] will change the values of [page:.up up] and [page:.matrixAutoUpdate matrixAutoUpdate] for every instance of Object3D (or derived classes) created after the change has been made (already created Object3Ds will not be affected). -

+

[property:Vector3 DefaultUp]

-
+

The default [page:.up up] direction for objects, also used as the default position for [page:DirectionalLight], [page:HemisphereLight] and [page:Spotlight] (which creates lights shining from the top down).
Set to ( 0, 1, 0 ) by default. -

+

[property:Vector3 DefaultMatrixAutoUpdate]

-
+

The default setting for [page:.matrixAutoUpdate matrixAutoUpdate] for newly created Object3Ds.
-

+

Methods

@@ -189,247 +189,245 @@

[page:EventDispatcher EventDispatcher] methods are available on this class.

[method:null add]( [param:Object3D object], ... )

-
+

Adds *object* as child of this object. An arbitrary number of objects may be added.

See [page:Group] for info on manually grouping objects. -

+

[method:null applyMatrix]( [param:Matrix4 matrix] )

-
Applies the matrix transform to the object and updates the object's position, rotation and scale.
+

Applies the matrix transform to the object and updates the object's position, rotation and scale.

[method:Object3D applyQuaternion]( [param:Quaternion quaternion] )

-
Applies the rotation represented by the quaternion to the object.
+

Applies the rotation represented by the quaternion to the object.

[method:Object3D clone]( [param:Boolean recursive] )

-
+

recursive -- if true, descendants of the object are also cloned. Default is true.

Returns a clone of this object and optionally all descendants. -

+

[method:Object3D copy]( [param:Object3D object], [param:Boolean recursive] )

-
+

recursive -- if true, descendants of the object are also copied. Default is true.

Copy the given object into this object. -

+

[method:Object3D getObjectById]( [param:Integer id] )

-
+

id -- Unique number of the object instance

Searches through the object's children and returns the first with a matching id.
Note that ids are assigned in chronological order: 1, 2, 3, ..., incrementing by one for each new object. -

+

[method:Object3D getObjectByName]( [param:String name] )

-
+

name -- String to match to the children's Object3D.name property.

Searches through the object's children and returns the first with a matching name.
- Note that for most objects the [property:name] is an empty string by default. You will + Note that for most objects the name is an empty string by default. You will have to set it manually to make use of this method. -

+

[method:Object3D getObjectByProperty]( [param:String name], [param:Float value] )

-
+

name -- the property name to search for.
value -- value of the given property.

Searches through the object's children and returns the first with a property that matches the value given. -

+

[method:Vector3 getWorldPosition]( [param:Vector3 target] )

-
+

[page:Vector3 target] — the result will be copied into this Vector3.

Returns a vector representing the position of the object in world space. -

+

[method:Quaternion getWorldQuaternion]( [param:Quaternion target] )

-
+

[page:Quaternion target] — the result will be copied into this Quaternion.

Returns a quaternion representing the rotation of the object in world space. -

+

[method:Vector3 getWorldScale]( [param:Vector3 target] )

-
+

[page:Vector3 target] — the result will be copied into this Vector3.

Returns a vector of the scaling factors applied to the object for each axis in world space. -

+

[method:Vector3 getWorldDirection]( [param:Vector3 target] )

-
+

[page:Vector3 target] — the result will be copied into this Vector3.

Returns a vector representing the direction of object's positive z-axis in world space. -

+

[method:Vector3 localToWorld]( [param:Vector3 vector] )

-
+

vector - A vector representing a position in local (object) space.

Converts the vector from local space to world space. -

+

[method:null lookAt]( [param:Vector3 vector] )
[method:null lookAt]( [param:Float x], [param:Float y], [param:Float z] )

-
+

vector - A vector representing a position in world space.

Optionally, the [page:.x x], [page:.y y] and [page:.z z] components of the world space position.

Rotates the object to face a point in world space.

This method does not support objects with rotated and/or translated parent(s). -

- -
+

[method:Array raycast]( [param:Raycaster raycaster], [param:Array intersects] )

-
+

Abstract (empty) method to get intersections between a casted ray and this object. Subclasses such as [page:Mesh], [page:Line], and [page:Points] implement this method in order to use raycasting. -

+

[method:null remove]( [param:Object3D object], ... )

-
+

Removes *object* as child of this object. An arbitrary number of objects may be removed. -

+

[method:Object3D rotateOnAxis]( [param:Vector3 axis], [param:Float angle] )

-
+

axis -- A normalized vector in object space.
angle -- The angle in radians.

Rotate an object along an axis in object space. The axis is assumed to be normalized. -

+

[method:Object3D rotateOnWorldAxis]( [param:Vector3 axis], [param:Float angle] )

-
+

axis -- A normalized vector in world space.
angle -- The angle in radians.

Rotate an object along an axis in world space. The axis is assumed to be normalized. Method Assumes no rotated parent. -

+

[method:null rotateX]( [param:Float rad] )

-
+

rad - the angle to rotate in radians.

Rotates the object around x axis in local space. -

+

[method:null rotateY]( [param:Float rad] )

-
+

rad - the angle to rotate in radians.

Rotates the object around y axis in local space. -

+

[method:null rotateZ]( [param:Float rad] )

-
+

rad - the angle to rotate in radians.

Rotates the object around z axis in local space. -

+

[method:null setRotationFromAxisAngle]( [param:Vector3 axis], [param:Float angle] )

-
+

axis -- A normalized vector in object space.
angle -- angle in radians

Calls [page:Quaternion.setFromAxisAngle setFromAxisAngle]( [page:Float axis], [page:Float angle] ) on the [page:.quaternion]. -

+

[method:null setRotationFromEuler]( [param:Euler euler] )

-
+

euler -- Euler angle specifying rotation amount.
Calls [page:Quaternion.setRotationFromEuler setRotationFromEuler]( [page:Euler euler]) on the [page:.quaternion]. -

+

[method:null setRotationFromMatrix]( [param:Matrix4 m] )

-
+

m -- rotate the quaternion by the rotation component of the matrix.
Calls [page:Quaternion.setFromRotationMatrix setFromRotationMatrix]( [page:Matrix4 m]) on the [page:.quaternion].

Note that this assumes that the upper 3x3 of m is a pure rotation matrix (i.e, unscaled). -

+

[method:null setRotationFromQuaternion]( [param:Quaternion q] )

-
+

q -- normalized Quaternion.

Copy the given quaternion into [page:.quaternion]. -

+

[method:null toJSON]( [param:Quaternion q] )

-
+

Convert the object to JSON format. -

+

[method:Object3D translateOnAxis]( [param:Vector3 axis], [param:Float distance] )

-
+

axis -- A normalized vector in object space.
distance -- The distance to translate.

Translate an object by distance along an axis in object space. The axis is assumed to be normalized. -

+

[method:null translateX]( [param:Float distance] )

-
Translates object along x axis by *distance* units.
+

Translates object along x axis by *distance* units.

[method:null translateY]( [param:Float distance] )

-
Translates object along y axis by *distance* units.
+

Translates object along y axis by *distance* units.

[method:null translateZ]( [param:Float distance] )

-
Translates object along z axis by *distance* units.
+

Translates object along z axis by *distance* units.

[method:null traverse]( [param:Function callback] )

-
+

callback - A function with as first argument an object3D object.

Executes the callback on this object and all descendants. -

+

[method:null traverseVisible]( [param:Function callback] )

-
+

callback - A function with as first argument an object3D object.

Like traverse, but the callback will only be executed for visible objects. Descendants of invisible objects are not traversed. -

+

[method:null traverseAncestors]( [param:Function callback] )

-
+

callback - A function with as first argument an object3D object.

Executes the callback on all ancestors. -

+

[method:null updateMatrix]()

-
Update the local transform.
+

Update the local transform.

[method:null updateMatrixWorld]( [param:Boolean force] )

-
Update the global transform of the object and its children.
+

Update the global transform of the object and its children.

[method:Vector3 worldToLocal]( [param:Vector3 vector] )

-
+

vector - A world vector.

Updates the vector from world space to local space. -

+

Source

diff --git a/docs/api/core/Raycaster.html b/docs/api/core/Raycaster.html index 47c55e1a9791b9ce3c3eb10b7744d20445c56a94..8c5e808ee3c52e9c8af986f3411af1a66d578cff 100644 --- a/docs/api/core/Raycaster.html +++ b/docs/api/core/Raycaster.html @@ -10,11 +10,11 @@

[name]

-
+

This class is designed to assist with [link:https://en.wikipedia.org/wiki/Ray_casting raycasting]. Raycasting is used for mouse picking (working out what objects in the 3d space the mouse is over) amongst other things. -

+

Example

@@ -67,45 +67,45 @@
-
-
+

+

Constructor

[name]( [param:Vector3 origin], [param:Vector3 direction], [param:Float near], [param:Float far] ) {

-
+

[page:Vector3 origin] — The origin vector where the ray casts from.
[page:Vector3 direction] — The direction vector that gives direction to the ray. Should be normalized.
[page:Float near] — All results returned are further away than near. Near can't be negative. Default value is 0.
[page:Float far] — All results returned are closer then far. Far can't be lower then near . Default value is Infinity. -

-
+

+

This creates a new raycaster object.
-

+

Properties

[property:float far]

-
- The far factor of the raycaster. This value indicates which objects can be discarded based on the distance.
+

+ The far factor of the raycaster. This value indicates which objects can be discarded based on the distance. This value shouldn't be negative and should be larger than the near property. -

+

[property:float linePrecision]

-
+

The precision factor of the raycaster when intersecting [page:Line] objects. -

+

[property:float near]

-
- The near factor of the raycaster. This value indicates which objects can be discarded based on the distance.
+

+ The near factor of the raycaster. This value indicates which objects can be discarded based on the distance. This value shouldn't be negative and should be smaller than the far property. -

+

[property:Object params]

-
+

An object with the following properties: @@ -118,70 +118,68 @@ } -

+

[property:Ray ray]

-
The [Page:Ray] used for the raycasting.
+

The [Page:Ray] used for the raycasting.

Methods

[method:null set]( [param:Vector3 origin], [param:Vector3 direction] )

-
+

[page:Vector3 origin] — The origin vector where the ray casts from.
[page:Vector3 direction] — The normalized direction vector that gives direction to the ray. -

-
+

+

Updates the ray with a new origin and direction. -

+

[method:null setFromCamera]( [param:Vector2 coords], [param:Camera camera] )

-
+

[page:Vector2 coords] — 2D coordinates of the mouse, in normalized device coordinates (NDC)---X and Y components should be between -1 and 1.
[page:Camera camera] — camera from which the ray should originate -

-
+

+

Updates the ray with a new origin and direction. -

+

[method:Array intersectObject]( [page:Object3D object], [param:Boolean recursive], [param:Array optionalTarget] )

-

[page:Object3D object] — The object to check for intersection with the ray.
[page:Boolean recursive] — If true, it also checks all descendants. Otherwise it only checks intersecton with the object. Default is false.
[page:Array optionalTarget] — (optional) target to set the result. Otherwise a new [page:Array] is instantiated. If set, you must clear this array prior to each call (i.e., array.length = 0;).

-
-
+

Checks all intersection between the ray and the object with or without the descendants. Intersections are returned sorted by distance, closest first. An array of intersections is returned... - - [ { distance, point, face, faceIndex, object }, ... ] - -

- [page:Float distance] – distance between the origin of the ray and the intersection
- [page:Vector3 point] – point of intersection, in world coordinates
- [page:Face3 face] – intersected face
- [page:Integer faceIndex] – index of the intersected face
- [page:Object3D object] – the intersected object
- [page:Vector2 uv] - U,V coordinates at point of intersection -

+

+ + [ { distance, point, face, faceIndex, object }, ... ] + +

+ [page:Float distance] – distance between the origin of the ray and the intersection
+ [page:Vector3 point] – point of intersection, in world coordinates
+ [page:Face3 face] – intersected face
+ [page:Integer faceIndex] – index of the intersected face
+ [page:Object3D object] – the intersected object
+ [page:Vector2 uv] - U,V coordinates at point of intersection +

*Raycaster* delegates to the [page:Object3D.raycast raycast] method of the passed object, when evaluating whether the ray intersects the object or not. This allows [page:Mesh meshes] to respond differently to ray casting than [page:Line lines] and [page:Points pointclouds].

*Note* that for meshes, faces must be pointed towards the origin of the [page:.ray ray] in order to be detected; intersections of the ray passing through the back of a face will not be detected. To raycast against both faces of an object, you'll want to set the [page:Mesh.material material]'s [page:Material.side side] property to *THREE.DoubleSide*.

-

[method:Array intersectObjects]( [param:Array objects], [param:Boolean recursive], [param:Array optionalTarget] )

-
+

[page:Array objects] — The objects to check for intersection with the ray.
[page:Boolean recursive] — If true, it also checks all descendants of the objects. Otherwise it only checks intersecton with the objects. Default is false.
[page:Array optionalTarget] — (optional) target to set the result. Otherwise a new [page:Array] is instantiated. If set, you must clear this array prior to each call (i.e., array.length = 0;). -

-
+

+

Checks all intersection between the ray and the objects with or without the descendants. Intersections are returned sorted by distance, closest first. Intersections are of the same form as those returned by [page:.intersectObject]. -

+

Source

diff --git a/docs/api/core/Uniform.html b/docs/api/core/Uniform.html index 6c567b4df3bbfd47aaa183c2c1fc94e961da219c..960fcaa91e16d6f3d49f08c3a01d8ef98eaa8b53 100644 --- a/docs/api/core/Uniform.html +++ b/docs/api/core/Uniform.html @@ -10,8 +10,8 @@

[name]

-
Uniforms are global [link:https://www.opengl.org/documentation/glsl/ GLSL] variables. They are passed to shader programs. -
+

Uniforms are global [link:https://www.opengl.org/documentation/glsl/ GLSL] variables. They are passed to shader programs. +

Example

@@ -185,26 +185,26 @@

Constructor

[name]( [param:Object value] )

-
+

value -- An object containing the value to set up the uniform. It's type must be one of the Uniform Types described above. -

+

Properties

[property:Object value]

-
+

Current value of the uniform. -

+

Methods

[method:Uniform clone]()

-
+

Returns a clone of this uniform.
If the uniform's value property is an [page:Object] with a clone() method, this is used, otherwise the value is copied by assigment. Array values are shared between cloned [page:Uniform]s.

See [example:webgldeferred_animation WebGL deferred animation] for an example of this method in use. -

+

Source