diff --git a/docs/api/core/Vector2.html b/docs/api/core/Vector2.html index eb7a9c92f3ebb7817f38a02c278da58a1a8894cc..1c24f011bec6b7fdc011da8befebd95b8761c63b 100644 --- a/docs/api/core/Vector2.html +++ b/docs/api/core/Vector2.html @@ -1,23 +1,124 @@

[name]

-
todo
+
2D Vector.
+ +

Example

+ +var a = new THREE.Vector2( 0, 1 ); +var b = new THREE.Vector2( 1, 0 ); + +var d = a.distanceTo( b ); +

Constructor

-

[name]()

+

[name]( [page:Float x], [page:Float y] )

Properties

-

.[page:Vector3 todo]

+

.[page:Float x]

+ +

.[page:Float y]

Methods

-

.todo( [page:Vector3 todo] )

+

.set( [page:Float x], [page:Float y] ) [page:Vector2]

+
+Sets value of this vector. +
+ +

.copy( [page:Vector2 v] ) [page:Vector2]

+
+Copies value of *v* to this vector. +
+ +

.add( [page:Vector2 a], [page:Vector2 b] ) [page:Vector2]

+
+Sets this vector to *a + b*. +
+ +

.addSelf( [page:Vector2 v] ) [page:Vector2]

+
+Adds *v* to this vector. +
+ +

.sub( [page:Vector2 a], [page:Vector2 b] ) [page:Vector2]

+
+Sets this vector to *a - b*. +
+ +

.subSelf( [page:Vector2 v] ) [page:Vector2]

+
+Subtracts *v* from this vector. +
+ +

.multiplyScalar( [page:Float s] ) [page:Vector2]

+
+Multiplies this vector by scalar *s*. +
+ +

.divideScalar( [page:Float s] ) [page:Vector2]

+
+Divides this vector by scalar *s*.
+Set vector to *( 0, 0 )* if *s == 0*. +
+ +

.negate() [page:Vector2]

+
+Inverts this vector. +
+ +

.dot( [page:Vector2 v] ) [page:Float]

+
+Computes dot product of this vector and *v*. +
+ +

.lengthSq() [page:Float]

+
+Computes squared length of this vector. +
+ +

.length() [page:Float]

+
+Computes length of this vector. +
+ +

.normalize() [page:Vector2]

+
+Normalizes this vector. +
+ +

.distanceTo( [page:Vector2 v] ) [page:Float]

+
+Computes distance of this vector to *v*. +
+ +

.distanceToSquared( [page:Vector2 v] ) [page:Float]

+
+Computes squared distance of this vector to *v*. +
+ +

.setLength( [page:Float l] ) [page:Vector2]

+
+Normalizes this vector and multiplies it by *l*. +
+ +

.equals( [page:Vector2 v] ) [page:Vector2]

+
+Checks for strict equality of this vector and *v*. +
+ +

.isZero() [page:Boolean]

+
+Checks if length of this vector is within small epsilon (*0.0001*). +
+ +

.clone() [page:Vector2]

-todo — todo
+Clones this vector.
diff --git a/docs/api/core/Vector2.rst b/docs/api/core/Vector2.rst deleted file mode 100644 index 90f70fa1d43eda6bbc3a4a9d52a44967f8caf25b..0000000000000000000000000000000000000000 --- a/docs/api/core/Vector2.rst +++ /dev/null @@ -1,184 +0,0 @@ -Vector2 - 2D vector -------------------- - -.. ............................................................................... -.. rubric:: Constructor -.. ............................................................................... - -.. class:: Vector2( x, y ) - - 2D vector - - :param float x: x-coordinate - :param float y: y-coordinate - -.. ............................................................................... -.. rubric:: Attributes -.. ............................................................................... - -.. attribute:: Vector2.x - - float - default ``0`` - -.. attribute:: Vector2.y - - float - default ``0`` - -.. ............................................................................... -.. rubric:: Methods -.. ............................................................................... - -.. function:: Vector2.clone( ) - - Clones this vector - - :returns: New instance identical to this vector - :rtype: :class:`Vector2` - -.. function:: Vector2.set( x, y ) - - Sets value of this vector - - :param float x: x-coordinate - :param float y: y-coordinate - :returns: This vector - :rtype: :class:`Vector2` - -.. function:: Vector2.copy( v ) - - Copies value of ``v`` to this vector - - :param Vector2 v: source vector - :returns: This vector - :rtype: :class:`Vector2` - -.. function:: Vector2.add( v1, v2 ) - - Sets this vector to ``v1 + v2`` - - :param Vector2 v1: source vector 1 - :param Vector2 v2: source vector 2 - :returns: This vector - :rtype: :class:`Vector2` - -.. function:: Vector2.addSelf( v ) - - Adds ``v`` to this vector - - :param Vector2 v: source vector - :returns: This vector - :rtype: :class:`Vector2` - -.. function:: Vector2.sub( v1, v2 ) - - Sets this vector to ``v1 - v2`` - - :param Vector2 v1: source vector 1 - :param Vector2 v2: source vector 2 - -.. function:: Vector2.subSelf( v ) - - Subtracts ``v`` from this vector - - :param Vector2 v: source vector - :returns: This vector - :rtype: :class:`Vector2` - -.. function:: Vector2.multiplyScalar( s ) - - Multiplies this vector by scalar ``s`` - - :param float s: scalar - :returns: This vector - :rtype: :class:`Vector2` - -.. function:: Vector2.divideScalar( s ) - - Divides this vector by scalar ``s`` - - Set vector to ``( 0, 0 )`` if ``s == 0`` - - :param float s: scalar - :returns: This vector - :rtype: :class:`Vector2` - -.. function:: Vector2.negate( ) - - Inverts this vector - - :returns: This vector - :rtype: :class:`Vector2` - -.. function:: Vector2.dot( v ) - - Computes dot product of this vector and ``v`` - - :returns: dot product - :rtype: float - -.. function:: Vector2.lengthSq( ) - - Computes squared length of this vector - - :returns: squared length - :rtype: float - -.. function:: Vector2.length( ) - - Computes length of this vector - - :returns: length - :rtype: float - -.. function:: Vector2.normalize( ) - - Normalizes this vector - - :returns: This vector - :rtype: :class:`Vector2` - -.. function:: Vector2.distanceTo( v ) - - Computes distance of this vector to ``v`` - - :returns: squared distance - :rtype: float - -.. function:: Vector2.distanceToSquared( v ) - - Computes squared distance of this vector to ``v`` - - :returns: squared distance - :rtype: float - -.. function:: Vector2.setLength( l ) - - Normalizes this vector and multiplies it by ``l`` - - :returns: This vector - :rtype: :class:`Vector2` - -.. function:: Vector2.equals( v ) - - Checks for strict equality of this vector and ``v`` - - :returns: true if this vector equals ``v`` - :rtype: boolean - -.. function:: Vector2.isZero( ) - - Checks if length of this vector is within small epsilon (``0.0001``) - - :returns: true if this vector is zero - :rtype: boolean - -.. ............................................................................... -.. rubric:: Example -.. ............................................................................... - -:: - - var a = new THREE.Vector2( 0, 1 ); - var b = new THREE.Vector2( 1, 0 ); - - var d = a.distanceTo( b ); diff --git a/docs/api/core/Vector3.html b/docs/api/core/Vector3.html index eb7a9c92f3ebb7817f38a02c278da58a1a8894cc..0dc571cd067e2e8a2bc86bf2cfcca486ca2c072c 100644 --- a/docs/api/core/Vector3.html +++ b/docs/api/core/Vector3.html @@ -1,23 +1,174 @@

[name]

-
todo
+
3D vector.
+ + +

Example

+ +var a = new THREE.Vector3( 1, 0, 0 ); +var b = new THREE.Vector3( 0, 1, 0 ); + +var c = new THREE.Vector3(); +c.cross( a, b ); +

Constructor

-

[name]()

+

[name]( [page:Float x], [page:Float y], [page:Float z] )

Properties

-

.[page:Vector3 todo]

+

.[page:Float x]

+ +

.[page:Float y]

+ +

.[page:Float z]

Methods

-

.todo( [page:Vector3 todo] )

+

.set( [page:Float x], [page:Float y], [page:Float z] ) [page:Vector3]

+
+Sets value of this vector. +
+ +

.setX( [page:Float x] ) [page:Vector3]

+
+Sets x value of this vector. +
+ +

.setY( [page:Float y] ) [page:Vector3]

+
+Sets y value of this vector. +
+ +

.setZ( [page:Float z] ) [page:Vector3]

+
+Sets z value of this vector. +
+ +

.copy( [page:Vector3 v] ) [page:Vector3]

+
+Copies value of *v* to this vector. +
+ +

.add( [page:Vector3 a], [page:Vector3 b] ) [page:Vector3]

+
+Sets this vector to *a + b*. +
+ +

.addSelf( [page:Vector3 v] ) [page:Vector3]

+
+Adds *v* to this vector. +
+ +

.sub( [page:Vector3 a], [page:Vector3 b] ) [page:Vector3]

+
+Sets this vector to *a - b*. +
+ +

.subSelf( [page:Vector3 v] ) [page:Vector3]

+
+Subtracts *v* from this vector. +
+ +

.multiplyScalar( [page:Float s] ) [page:Vector3]

+
+Multiplies this vector by scalar *s*. +
+ +

.divideScalar( [page:Float s] ) [page:Vector3]

+
+Divides this vector by scalar *s*.
+Set vector to *( 0, 0, 0 )* if *s == 0*. +
+ +

.negate() [page:Vector3]

+
+Inverts this vector. +
+ +

.dot( [page:Vector3 v] ) [page:Float]

+
+Computes dot product of this vector and *v*. +
+ +

.lengthSq() [page:Float]

+
+Computes squared length of this vector. +
+ +

.length() [page:Float]

+
+Computes length of this vector. +
+ +

.lengthManhattan() [page:Float]

+
+Computes Manhattan length of this vector.
+[link:http://en.wikipedia.org/wiki/Taxicab_geometry] +
+ +

.normalize() [page:Vector3]

+
+Normalizes this vector. +
+ +

.distanceTo( [page:Vector3 v] ) [page:Vector3]

+
+Computes distance of this vector to *v*. +
+ +

.distanceToSquared( [page:Vector3 v] ) [page:Vector3]

+
+Computes squared distance of this vector to *v*. +
+ +

.normalize() [page:Vector3]

+
+Normalizes this vector. +
+ +

.setLength( [page:Float l] ) [page:Vector3]

+
+Normalizes this vector and multiplies it by *l*. +
+ +

.cross( [page:Vector3 a], [page:Vector3 b] ) [page:Vector3]

+
+Sets this vector to cross product of *a* and *b*. +
+ +

.crossSelf( [page:Vector3 v] ) [page:Vector3]

+
+Sets this vector to cross product of itself and *v*. +
+ +

.setPositionFromMatrix( [page:Matrix4 m] ) [page:Vector3]

+
+Sets this vector extracting position from matrix transform. +
+ +

.setRotationFromMatrix( [page:Matrix4 m] ) [page:Vector3]

+
+Sets this vector extracting Euler angles rotation from matrix transform. +
+ +

.equals( [page:Vector3 v] ) [page:Vector3]

+
+Checks for strict equality of this vector and *v*. +
+ +

.isZero() [page:Boolean]

+
+Checks if length of this vector is within small epsilon (*0.0001*). +
+ +

.clone() [page:Vector3]

-todo — todo
+Clones this vector.
diff --git a/docs/api/core/Vector3.rst b/docs/api/core/Vector3.rst deleted file mode 100644 index 5829edf3d50963235b68b25165aa06d9fade7c9e..0000000000000000000000000000000000000000 --- a/docs/api/core/Vector3.rst +++ /dev/null @@ -1,261 +0,0 @@ -Vector3 - 3D vector -------------------- - -.. ............................................................................... -.. rubric:: Constructor -.. ............................................................................... - -.. class:: Vector3() - - 3D vector - - :param float x: x-coordinate - :param float y: y-coordinate - :param float z: z-coordinate - -.. ............................................................................... -.. rubric:: Attributes -.. ............................................................................... - -.. attribute:: Vector3.x - - float - default ``0`` - -.. attribute:: Vector3.y - - float - default ``0`` - -.. attribute:: Vector3.z - - float - default ``0`` - -.. ............................................................................... -.. rubric:: Methods -.. ............................................................................... - -.. function:: Vector3.clone( ) - - Clones this vector - - :returns: New instance identical to this vector - :rtype: :class:`Vector3` - -.. function:: Vector3.set( x, y, z ) - - Sets value of this vector - - :param float x: x-coordinate - :param float y: y-coordinate - :param float z: z-coordinate - :returns: This vector - :rtype: :class:`Vector3` - -.. function:: Vector3.setX( x ) - - Sets x-value of this vector - - :param float x: x-coordinate - :returns: This vector - :rtype: :class:`Vector3` - -.. function:: Vector3.setY( y ) - - Sets y-value of this vector - - :param float y: y-coordinate - :returns: This vector - :rtype: :class:`Vector3` - -.. function:: Vector3.setZ( z ) - - Sets z-value of this vector - - :param float z: z-coordinate - :returns: This vector - :rtype: :class:`Vector3` - -.. function:: Vector3.copy( v ) - - Copies value of ``v`` to this vector - - :param Vector3 v: source vector - :returns: This vector - :rtype: :class:`Vector3` - -.. function:: Vector3.add( v1, v2 ) - - Sets this vector to ``v1 + v2`` - - :param Vector3 v1: source vector 1 - :param Vector3 v2: source vector 2 - :returns: This vector - :rtype: :class:`Vector3` - -.. function:: Vector3.addSelf( v ) - - Adds ``v`` to this vector - - :param Vector3 v: source vector - :returns: This vector - :rtype: :class:`Vector3` - -.. function:: Vector3.sub( v1, v2 ) - - Sets this vector to ``v1 - v2`` - - :param Vector3 v1: source vector 1 - :param Vector3 v2: source vector 2 - -.. function:: Vector3.subSelf( v ) - - Subtracts ``v`` from this vector - - :param Vector3 v: source vector - :returns: This vector - :rtype: :class:`Vector3` - -.. function:: Vector3.multiplyScalar( s ) - - Multiplies this vector by scalar ``s`` - - :param float s: scalar - :returns: This vector - :rtype: :class:`Vector3` - -.. function:: Vector3.divideScalar( s ) - - Divides this vector by scalar ``s`` - - Set vector to ``( 0, 0, 0 )`` if ``s == 0`` - - :param float s: scalar - :returns: This vector - :rtype: :class:`Vector3` - -.. function:: Vector3.negate( ) - - Inverts this vector - - :returns: This vector - :rtype: :class:`Vector3` - -.. function:: Vector3.dot( v ) - - Computes dot product of this vector and ``v`` - - :param Vector3 v: vector - :returns: dot product - :rtype: float - -.. function:: Vector3.lengthSq( ) - - Computes squared length of this vector - - :returns: squared length - :rtype: float - -.. function:: Vector3.length( ) - - Computes length of this vector - - :returns: length - :rtype: float - -.. function:: Vector3.lengthManhattan( ) - - Computes Manhattan length of this vector - - http://en.wikipedia.org/wiki/Taxicab_geometry - - :returns: length - :rtype: float - -.. function:: Vector3.normalize( ) - - Normalizes this vector - - :returns: This vector - :rtype: :class:`Vector3` - -.. function:: Vector3.distanceTo( v ) - - Computes distance of this vector to ``v`` - - :param Vector3 v: vector - :returns: squared distance - :rtype: float - -.. function:: Vector3.distanceToSquared( v ) - - Computes squared distance of this vector to ``v`` - - :param Vector3 v: vector - :returns: squared distance - :rtype: float - -.. function:: Vector3.setLength( l ) - - Normalizes this vector and multiplies it by ``l`` - - :returns: This vector - :rtype: :class:`Vector3` - -.. function:: Vector3.cross( a, b ) - - Sets this vector to cross product of ``a`` and ``b`` - - :param Vector3 a: vector - :param Vector3 b: vector - :returns: This vector - :rtype: :class:`Vector3` - -.. function:: Vector3.crossSelf( v ) - - Sets this vector to cross product of itself and ``v`` - - :param Vector3 v: vector - :returns: This vector - :rtype: :class:`Vector3` - -.. function:: Vector3.setPositionFromMatrix( m ) - - Sets this vector extracting position from matrix transform - - :param Matrix4 m: matrix - :returns: This vector - :rtype: :class:`Vector3` - -.. function:: Vector3.setRotationFromMatrix( m ) - - Sets this vector extracting Euler angles rotation from matrix transform - - :param Matrix4 m: matrix - :returns: This vector - :rtype: :class:`Vector3` - -.. function:: Vector3.equals( v ) - - Checks for strict equality of this vector and ``v`` - - :param Vector3 v: vector - :returns: true if this vector equals ``v`` - :rtype: boolean - -.. function:: Vector3.isZero( ) - - Checks if length of this vector is within small epsilon (``0.0001``) - - :returns: true if this vector is zero - :rtype: boolean - -.. ............................................................................... -.. rubric:: Example -.. ............................................................................... - -:: - - var a = new THREE.Vector3( 1, 0, 0 ); - var b = new THREE.Vector3( 0, 1, 0 ); - - var c = new THREE.Vector3(); - c.cross( a, b ); diff --git a/docs/api/core/Vector4.html b/docs/api/core/Vector4.html index eb7a9c92f3ebb7817f38a02c278da58a1a8894cc..7db9fe0643ce2e88afdbf9121d0916d018609eae 100644 --- a/docs/api/core/Vector4.html +++ b/docs/api/core/Vector4.html @@ -1,23 +1,105 @@

[name]

-
todo
+
4D vector.

Constructor

-

[name]()

+

[name]( [page:Float x], [page:Float y], [page:Float z], [page:Float w] )

Properties

-

.[page:Vector3 todo]

+

.[page:Float x]

+ +

.[page:Float y]

+ +

.[page:Float z]

+ +

.[page:Float w]

Methods

-

.todo( [page:Vector3 todo] )

+

.set( [page:Float x], [page:Float y], [page:Float z], [page:Float w] ) [page:Vector4]

+
+Sets value of this vector. +
+ +

.copy( [page:Vector4 v] ) [page:Vector4]

+
+Copies value of *v* to this vector. +
+ +

.add( [page:Vector4 a], [page:Vector4 b] ) [page:Vector4]

+
+Sets this vector to *a + b*. +
+ +

.addSelf( [page:Vector4 v] ) [page:Vector4s]

+
+Adds *v* to this vector. +
+ +

.sub( [page:Vector4 a], [page:Vector4 b] ) [page:Vector4]

+
+Sets this vector to *a - b*. +
+ +

.subSelf( [page:Vector4 v] ) [page:Vector4]

+
+Subtracts *v* from this vector. +
+ +

.multiplyScalar( [page:Float s] ) [page:Vector4]

+
+Multiplies this vector by scalar *s*. +
+ +

.divideScalar( [page:Float s] ) [page:Vector4]

+
+Divides this vector by scalar *s*.
+Set vector to *( 0, 0, 0 )* if *s == 0*. +
+ +

.negate() [page:Vector4]

+
+Inverts this vector. +
+ +

.dot( [page:Vector4 v] ) [page:Float]

+
+Computes dot product of this vector and *v*. +
+ +

.lengthSq() [page:Float]

+
+Computes squared length of this vector. +
+ +

.length() [page:Float]

+
+Computes length of this vector. +
+ +

.normalize() [page:Vector4]

+
+Normalizes this vector. +
+ +

.setLength( [page:Float l] ) [page:Vector3]

+
+Normalizes this vector and multiplies it by *l*. +
+ +

.lerpSelf( [page:Vector4 v], [page:Float alpha] ) [page:Vector4]

+
+Linearly interpolate between this vector and *v* with *alpha* factor. +
+ +

.clone() [page:Vector3]

-todo — todo
+Clones this vector.
diff --git a/docs/api/core/Vector4.rst b/docs/api/core/Vector4.rst deleted file mode 100644 index 164e636f88afbf7e88f9a754d29f67e56a8fc6b2..0000000000000000000000000000000000000000 --- a/docs/api/core/Vector4.rst +++ /dev/null @@ -1,179 +0,0 @@ -Vector4 - 4D vector -------------------- - -.. ............................................................................... -.. rubric:: Constructor -.. ............................................................................... - -.. class:: Vector4( x, y, z, w ) - - 4D vector - - :param float x: x-coordinate - :param float y: y-coordinate - :param float z: z-coordinate - :param float w: w-coordinate - -.. ............................................................................... -.. rubric:: Attributes -.. ............................................................................... - -.. attribute:: Vector4.x - - float - default ``0`` - -.. attribute:: Vector4.y - - float - default ``0`` - -.. attribute:: Vector4.z - - float - default ``0`` - -.. attribute:: Vector4.w - - float - default ``1`` - - -.. ............................................................................... -.. rubric:: Methods -.. ............................................................................... - -.. function:: Vector4.clone( ) - - Clones this vector - - :returns: New instance identical to this vector - :rtype: :class:`Vector4` - -.. function:: Vector4.set( x, y, z, w ) - - Sets value of this vector - - :param float x: x-coordinate - :param float y: y-coordinate - :param float z: z-coordinate - :param float w: w-coordinate - :returns: This vector - :rtype: :class:`Vector4` - -.. function:: Vector4.copy( v ) - - Copies value of ``v`` to this vector - - Sets ``w`` to 1 if ``v.w`` is undefined - - :param Vector4 v: source vector - :returns: This vector - :rtype: :class:`Vector4` - -.. function:: Vector4.add( v1, v2 ) - - Sets this vector to ``v1 + v2`` - - :param Vector4 v1: source vector 1 - :param Vector4 v2: source vector 2 - :returns: This vector - :rtype: :class:`Vector4` - -.. function:: Vector4.addSelf( v ) - - Adds ``v`` to this vector - - :param Vector4 v: source vector - :returns: This vector - :rtype: :class:`Vector4` - -.. function:: Vector4.sub( v1, v2 ) - - Sets this vector to ``v1 - v2`` - - :param Vector4 v1: source vector 1 - :param Vector4 v2: source vector 2 - -.. function:: Vector4.subSelf( v ) - - Subtracts ``v`` from this vector - - :param Vector4 v: source vector - :returns: This vector - :rtype: :class:`Vector4` - -.. function:: Vector4.multiplyScalar( s ) - - Multiplies this vector by scalar ``s`` - - :param float s: scalar - :returns: This vector - :rtype: :class:`Vector4` - -.. function:: Vector4.divideScalar( s ) - - Divides this vector by scalar ``s`` - - Set vector to ``( 0, 0, 0, 1 )`` if ``s == 0`` - - :param float s: scalar - :returns: This vector - :rtype: :class:`Vector4` - -.. function:: Vector4.negate( ) - - Inverts this vector - - :returns: This vector - :rtype: :class:`Vector4` - -.. function:: Vector4.dot( v ) - - Computes dot product of this vector and ``v`` - - :param Vector4 v: vector - :returns: dot product - :rtype: float - -.. function:: Vector4.lengthSq( ) - - Computes squared length of this vector - - :returns: squared length - :rtype: float - -.. function:: Vector4.length( ) - - Computes length of this vector - - :returns: length - :rtype: float - -.. function:: Vector4.normalize( ) - - Normalizes this vector - - :returns: This vector - :rtype: :class:`Vector4` - -.. function:: Vector4.setLength( l ) - - Normalizes this vector and multiplies it by ``l`` - - :returns: This vector - :rtype: :class:`Vector4` - -.. function:: Vector4.lerpSelf( v, alpha ) - - Linearly interpolate between this vector and ``v`` with ``alpha`` factor - - :param Vector4 v: vector - :param float alpha: interpolation factor - :returns: This vector - :rtype: :class:`Vector4` - - -.. ............................................................................... -.. rubric:: Example -.. ............................................................................... - -:: - - var a = new THREE.Vector4( 1, 0, 0, 0 ); \ No newline at end of file diff --git a/docs/api/lights/Light.html b/docs/api/lights/Light.html index eb7a9c92f3ebb7817f38a02c278da58a1a8894cc..e4005f91f1610ea13229dbffd5de517a1369d699 100644 --- a/docs/api/lights/Light.html +++ b/docs/api/lights/Light.html @@ -1,24 +1,18 @@ +[page:Object3D] → +

[name]

-
todo
+
Abstract base class for lights.

Constructor

-

[name]()

+

[name]( [page:Integer hex] )

Properties

-

.[page:Vector3 todo]

- - -

Methods

- -

.todo( [page:Vector3 todo] )

-
-todo — todo
-
+

.[page:Color color]

Source

diff --git a/docs/index.html b/docs/index.html index 7d0d60e2d889751f31f6383c728db70f3b7caa42..7e4e04f40e978f791a563588006355d9a7fed5ec 100644 --- a/docs/index.html +++ b/docs/index.html @@ -346,15 +346,17 @@ if ( xhr.readyState == 4 && ( xhr.status == 200 || xhr.status == 0 ) ) { + // TODO: Set title. + var text = xhr.responseText; text = text.replace(/\[name\]/gi, name); text = text.replace(/\[path\]/gi, path); - text = text.replace(/\[page:(\w+)\]/gi, "$1" ); // [page:name] + text = text.replace(/\[page:(\w+)\]/gi, "[page:$1 $1]" ); // [page:name] to [page:name title] text = text.replace(/\[page:(\w+) ([\w|\.]+)\]/gi, "$2" ); // [page:name title] - text = text.replace(/\[link:([\w|\:|\/|\.|\-]+)\]/gi, "$1" ); // [link:url] - text = text.replace(/\[link:([\w|\:|\/|\.|\-]+) ([\w|\/|\.|\-]+)\]/gi, "$2" ); // [link:url title] - text = text.replace(/\*([\w|\ |\-|\/]+)\*/gi, "$1" ); // * + text = text.replace(/\[link:([\w|\:|\/|\.|\-|\_]+)\]/gi, "[link:$1 $1]" ); // [link:url] to [link:url title] + text = text.replace(/\[link:([\w|\:|\/|\.|\-|\_]+) ([\w|\:|\/|\.|\-|\_]+)\]/gi, "$2" ); // [link:url title] + text = text.replace(/\*([\w|\ |\-|\/|\+|\-|\(|\)|\=|\,|\.]+)\*/gi, "$1" ); // * viewer.innerHTML = '
' + text + '

'; diff --git a/src/core/Vector2.js b/src/core/Vector2.js index b5583e1f117d2d9ef3fd5eaff5e8e4eb38680885..3175d4658ad1d944f48146c98c5271cc89ad8862 100644 --- a/src/core/Vector2.js +++ b/src/core/Vector2.js @@ -34,17 +34,10 @@ THREE.Vector2.prototype = { }, - clone: function () { - - return new THREE.Vector2( this.x, this.y ); - - }, - - - add: function ( v1, v2 ) { + add: function ( a, b ) { - this.x = v1.x + v2.x; - this.y = v1.y + v2.y; + this.x = a.x + b.x; + this.y = a.y + b.y; return this; @@ -59,10 +52,10 @@ THREE.Vector2.prototype = { }, - sub: function ( v1, v2 ) { + sub: function ( a, b ) { - this.x = v1.x - v2.x; - this.y = v1.y - v2.y; + this.x = a.x - b.x; + this.y = a.y - b.y; return this; @@ -105,7 +98,7 @@ THREE.Vector2.prototype = { negate: function() { - return this.multiplyScalar( -1 ); + return this.multiplyScalar( - 1 ); }, @@ -171,6 +164,12 @@ THREE.Vector2.prototype = { return ( this.lengthSq() < 0.0001 /* almostZero */ ); + }, + + clone: function () { + + return new THREE.Vector2( this.x, this.y ); + } }; diff --git a/src/core/Vector3.js b/src/core/Vector3.js index 88e27b52e230fe9645c2ff81821b73516d8b4783..2d7c65ad2f87743cd5df16110a02782451a82bdd 100644 --- a/src/core/Vector3.js +++ b/src/core/Vector3.js @@ -63,18 +63,11 @@ THREE.Vector3.prototype = { }, - clone: function () { - - return new THREE.Vector3( this.x, this.y, this.z ); - - }, - - - add: function ( v1, v2 ) { + add: function ( a, b ) { - this.x = v1.x + v2.x; - this.y = v1.y + v2.y; - this.z = v1.z + v2.z; + this.x = a.x + b.x; + this.y = a.y + b.y; + this.z = a.z + b.z; return this; @@ -100,11 +93,11 @@ THREE.Vector3.prototype = { }, - sub: function ( v1, v2 ) { + sub: function ( a, b ) { - this.x = v1.x - v2.x; - this.y = v1.y - v2.y; - this.z = v1.z - v2.z; + this.x = a.x - b.x; + this.y = a.y - b.y; + this.z = a.z - b.z; return this; @@ -183,7 +176,7 @@ THREE.Vector3.prototype = { negate: function() { - return this.multiplyScalar( -1 ); + return this.multiplyScalar( - 1 ); }, @@ -382,6 +375,12 @@ THREE.Vector3.prototype = { return ( this.lengthSq() < 0.0001 /* almostZero */ ); + }, + + clone: function () { + + return new THREE.Vector3( this.x, this.y, this.z ); + } }; diff --git a/src/core/Vector4.js b/src/core/Vector4.js index 7a19b306e7378fcd8370ebd75e4f319d6ea85626..d9500c53743cb61f9a65d4937e1b4e0b7b374f1c 100644 --- a/src/core/Vector4.js +++ b/src/core/Vector4.js @@ -40,19 +40,12 @@ THREE.Vector4.prototype = { }, - clone: function () { - - return new THREE.Vector4( this.x, this.y, this.z, this.w ); - - }, - - - add: function ( v1, v2 ) { + add: function ( a, b ) { - this.x = v1.x + v2.x; - this.y = v1.y + v2.y; - this.z = v1.z + v2.z; - this.w = v1.w + v2.w; + this.x = a.x + b.x; + this.y = a.y + b.y; + this.z = a.z + b.z; + this.w = a.w + b.w; return this; @@ -69,12 +62,12 @@ THREE.Vector4.prototype = { }, - sub: function ( v1, v2 ) { + sub: function ( a, b ) { - this.x = v1.x - v2.x; - this.y = v1.y - v2.y; - this.z = v1.z - v2.z; - this.w = v1.w - v2.w; + this.x = a.x - b.x; + this.y = a.y - b.y; + this.z = a.z - b.z; + this.w = a.w - b.w; return this; @@ -170,6 +163,12 @@ THREE.Vector4.prototype = { return this; + }, + + clone: function () { + + return new THREE.Vector4( this.x, this.y, this.z, this.w ); + } };