Browse Source

- Clean up

Mr.doob 15 years ago
parent
commit
8e5c8debf9

File diff suppressed because it is too large
+ 0 - 0
build/three_debug.js


+ 2 - 2
examples/lines_sphere.html

@@ -58,9 +58,9 @@
 				renderer.setSize(SCREEN_WIDTH, SCREEN_HEIGHT);
 				renderer.setSize(SCREEN_WIDTH, SCREEN_HEIGHT);
 				container.appendChild(renderer.domElement);
 				container.appendChild(renderer.domElement);
 
 
-				// floor
+				// particles
 
 
-				material = new THREE.ColorFillMaterial(0xffffff, 1);
+				material = new THREE.ParticleCircleMaterial(0xffffff, 1);
 
 
 				for (var i = 0; i < 1000; i++) {
 				for (var i = 0; i < 1000; i++) {
 
 

+ 0 - 71
examples/performance-test.html

@@ -1,71 +0,0 @@
-<!DOCTYPE HTML>
-<html lang="en">
-  <head>
-    <title>Performance Tests</title>
-    <script type="text/javascript" src="../src/Three.js"></script>
-    <script type="text/javascript" src="../src/core/Vector2.js"></script>
-    <script type="text/javascript" src="../src/core/Vector3.js"></script>
-    <script type="text/javascript" src="../src/core/Vector4.js"></script>
-    <script type="text/javascript" src="../src/core/Matrix3.js"></script>
-    <script type="text/javascript" src="../src/core/Matrix4.js"></script>
-    <script type="text/javascript" src="../src/core/Vector2.old.js"></script>
-    <script type="text/javascript" src="../src/core/Vector3.old.js"></script>
-    <script type="text/javascript" src="../src/core/Vector4.old.js"></script>
-    <script type="text/javascript" src="../src/core/Matrix3.old.js"></script>
-    <script type="text/javascript" src="../src/core/Matrix4.old.js"></script>
-    <script type="text/javascript">
-    function initTest() {
-      var times = 5000000;
-      //Vector2
-      console.time("Vector2 x " + times);
-      for( var i = 0; i < times; ++i) {
-        var v = new THREE.Vector2();
-      }
-      console.timeEnd("Vector2 x " + times);
-      console.time("Vector2Orig x " + times);
-      for( var i = 0; i < times; ++i) {
-        var v = new THREE.Vector2Orig();
-      }
-      console.timeEnd("Vector2Orig x " + times);
-
-      //Vector3
-      console.time("Vector3 x " + times);
-      for( var i = 0; i < times; ++i) {
-        var v = new THREE.Vector3();
-      }
-      console.timeEnd("Vector3 x " + times);
-      console.time("Vector3Orig x " + times);
-      for( var i = 0; i < times; ++i) {
-        var v = new THREE.Vector3Orig();
-      }
-      console.timeEnd("Vector3Orig x " + times);
-
-      //Vector4
-      console.time("Vector4 x " + times);
-      for( var i = 0; i < times; ++i) {
-        var v = new THREE.Vector4();
-      }
-      console.timeEnd("Vector4 x " + times);
-      console.time("Vector4Orig x " + times);
-      for( var i = 0; i < times; ++i) {
-        var v = new THREE.Vector4Orig();
-      }
-      console.timeEnd("Vector4Orig x " + times);
-
-      //Matrix4
-      console.time("Matrix4 x " + times);
-      for( var i = 0; i < times; ++i) {
-        var v = new THREE.Matrix4();
-      }
-      console.timeEnd("Matrix4 x " + times);
-      console.time("Matrix4Orig x " + times);
-      for( var i = 0; i < times; ++i) {
-        var v = new THREE.Matrix4Orig();
-      }
-      console.timeEnd("Matrix4Orig x " + times);
-    }
-    </script>
-  </head>
-  <body onload="initTest();">
-  </body>
-</html>

+ 0 - 80
src/core/Matrix3.js

@@ -1,80 +0,0 @@
-/**
- * @author mr.doob / http://mrdoob.com/
- * @author supereggbert / http://www.paulbrunt.co.uk/
- */
-
-THREE.Matrix3Orig = function () {
-
-	this.n11 = 1; this.n12 = 0; this.n13 = 0;
-	this.n21 = 0; this.n22 = 1; this.n23 = 0;
-	this.n31 = 0; this.n32 = 0; this.n33 = 1;
-
-	this.identity = function () {
-
-		this.n11 = 1; this.n12 = 0; this.n13 = 0;
-		this.n21 = 0; this.n22 = 1; this.n23 = 0;
-		this.n31 = 0; this.n32 = 0; this.n33 = 1;
-
-	};
-
-	this.assign = function ( m ) {
-
-		this.n11 = m.n11; this.n12 = m.n12; this.n13 = m.n13;
-		this.n21 = m.n21; this.n22 = m.n22; this.n23 = m.n23;
-		this.n31 = m.n31; this.n32 = m.n32; this.n33 = m.n33;
-
-	};
-
-	this.multiplySelf = function ( m ) {
-
-		var n11 = this.n11, n12 = this.n12, n13 = this.n13, n14 = this.n14;
-		var n21 = this.n21, n22 = this.n22, n23 = this.n23, n24 = this.n24;
-		var n31 = this.n31, n32 = this.n32, n33 = this.n33, n34 = this.n34;
-
-		this.n11 = n11 * m.n11 + n12 * m.n21 + n13 * m.n31;
-		this.n12 = n11 * m.n12 + n12 * m.n22 + n13 * m.n32;
-		this.n13 = n11 * m.n13 + n12 * m.n23 + n13 * m.n33;
-
-		this.n21 = n21 * m.n11 + n22 * m.n21 + n23 * m.n31;
-		this.n22 = n21 * m.n12 + n22 * m.n22 + n23 * m.n32;
-		this.n23 = n21 * m.n13 + n22 * m.n23 + n23 * m.n33;
-
-		this.n31 = n31 * m.n11 + n32 * m.n21 + n33 * m.n31;
-		this.n32 = n31 * m.n12 + n32 * m.n22 + n33 * m.n32;
-		this.n33 = n31 * m.n13 + n32 * m.n23 + n33 * m.n33;
-
-	};
-
-	this.inverse = function () {
-
-		var n11 = this.n11, n12 = this.n12, n13 = this.n13, n14 = this.n14;
-		var n21 = this.n21, n22 = this.n22, n23 = this.n23, n24 = this.n24;
-		var n31 = this.n31, n32 = this.n32, n33 = this.n33, n34 = this.n34;
-
-		this.n11 = n11; this.n12 = n21; this.n13 = n31;
-		this.n21 = n12; this.n22 = n22; this.n23 = n32;
-		this.n31 = n13; this.n32 = n23; this.n33 = n33;
-
-	};
-
-	this.clone = function () {
-
-		var m = new THREE.Matrix3();
-
-		m.n11 = this.n11; m.n12 = this.n12; m.n13 = this.n13;
-		m.n21 = this.n21; m.n22 = this.n22; m.n23 = this.n23;
-		m.n31 = this.n31; m.n32 = this.n32; m.n33 = this.n33;
-
-		return m;
-
-	};
-
-	this.toString = function () {
-
-		return "| " + this.n11 + " " + this.n12 + " " + this.n13 + " |\n" +
-			"| " + this.n21 + " " + this.n22 + " " + this.n23 + " |\n" +
-			"| " + this.n31 + " " + this.n32 + " " + this.n33 + " |";
-
-	};
-
-};

+ 2 - 1
src/core/Matrix4.js

@@ -1,6 +1,7 @@
 /**
 /**
- * @author supereggbert / http://www.paulbrunt.co.uk/
  * @author mr.doob / http://mrdoob.com/
  * @author mr.doob / http://mrdoob.com/
+ * @author supereggbert / http://www.paulbrunt.co.uk/
+ * @author philogb / http://blog.thejit.org/
  */
  */
 
 
 THREE.Matrix4 = function () {
 THREE.Matrix4 = function () {

+ 1 - 0
src/core/Vector2.js

@@ -1,5 +1,6 @@
 /**
 /**
  * @author mr.doob / http://mrdoob.com/
  * @author mr.doob / http://mrdoob.com/
+ * @author philogb / http://blog.thejit.org/
  */
  */
 
 
 THREE.Vector2 = function ( x, y ) {
 THREE.Vector2 = function ( x, y ) {

+ 0 - 95
src/core/Vector2.old.js

@@ -1,95 +0,0 @@
-/**
- * @author mr.doob / http://mrdoob.com/
- */
-
-THREE.Vector2Orig = function ( x, y ) {
-
-	this.x = x || 0;
-	this.y = y || 0;
-
-	this.set = function ( x, y ) {
-
-		this.x = x;
-		this.y = y;
-
-	};
-
-	this.copy = function ( v ) {
-
-		this.x = v.x;
-		this.y = v.y;
-
-	};
-
-	this.addSelf = function ( v ) {
-
-		this.x += v.x;
-		this.y += v.y;
-
-	};
-
-	this.add = function ( v1, v2 ) {
-
-		this.x = v1.x + v2.x;
-		this.y = v1.y + v2.y;
-
-	};
-
-	this.subSelf = function ( v ) {
-
-		this.x -= v.x;
-		this.y -= v.y;
-
-	};
-
-	this.sub = function ( v1, v2 ) {
-
-		this.x = v1.x - v2.x;
-		this.y = v1.y - v2.y;
-
-	};
-
-	this.multiplyScalar = function ( s ) {
-
-		this.x *= s;
-		this.y *= s;
-
-	};
-
-	this.unit = function () {
-
-		this.multiplyScalar( 1 / this.length() );
-
-	};
-
-	this.length = function () {
-
-		return Math.sqrt( this.x * this.x + this.y * this.y );
-
-	};
-
-	this.lengthSq = function () {
-
-		return this.x * this.x + this.y * this.y;
-
-	};
-
-	this.negate = function() {
-
-		this.x = - this.x;
-		this.y = - this.y;
-
-	};
-
-	this.clone = function () {
-
-		return new THREE.Vector2Orig( this.x, this.y );
-
-	};
-
-	this.toString = function () {
-
-		return 'THREE.Vector2Orig (' + this.x + ', ' + this.y + ')';
-
-	};
-};

+ 1 - 0
src/core/Vector3.js

@@ -1,6 +1,7 @@
 /**
 /**
  * @author mr.doob / http://mrdoob.com/
  * @author mr.doob / http://mrdoob.com/
  * @author kile / http://kile.stravaganza.org/
  * @author kile / http://kile.stravaganza.org/
+ * @author philogb / http://blog.thejit.org/
  */
  */
 
 
 THREE.Vector3 = function ( x, y, z ) {
 THREE.Vector3 = function ( x, y, z ) {

+ 0 - 166
src/core/Vector3.old.js

@@ -1,166 +0,0 @@
-/**
- * @author mr.doob / http://mrdoob.com/
- * @author kile / http://kile.stravaganza.org/
- */
-
-THREE.Vector3Orig = function ( x, y, z ) {
-
-	this.x = x || 0;
-	this.y = y || 0;
-	this.z = z || 0;
-
-	this.set = function ( x, y, z ) {
-
-		this.x = x;
-		this.y = y;
-		this.z = z;
-
-	};
-
-	this.copy = function ( v ) {
-
-		this.x = v.x;
-		this.y = v.y;
-		this.z = v.z;
-
-	};
-
-	this.add = function( v1, v2 ) {
-
-		this.x = v1.x + v2.x;
-		this.y = v1.y + v2.y;
-		this.z = v1.z + v2.z;
-
-	};
-
-	this.addSelf = function ( v ) {
-
-		this.x += v.x;
-		this.y += v.y;
-		this.z += v.z;
-
-	};
-
-	this.addScalar = function ( s ) {
-
-		this.x += s;
-		this.y += s;
-		this.z += s;
-
-	};
-
-	this.sub = function( v1, v2 ) {
-
-		this.x = v1.x - v2.x;
-		this.y = v1.y - v2.y;
-		this.z = v1.z - v2.z;
-
-	};
-
-	this.subSelf = function ( v ) {
-
-		this.x -= v.x;
-		this.y -= v.y;
-		this.z -= v.z;
-
-	};
-
-	this.cross = function ( v1, v2 ) {
-
-		this.x = v1.y * v2.z - v1.z * v2.y;
-		this.y = v1.z * v2.x - v1.x * v2.z;
-		this.z = v1.x * v2.y - v1.y * v2.x;
-
-	};
-
-	this.crossSelf = function ( v ) {
-
-		var tx = this.x, ty = this.y, tz = this.z;
-
-		this.x = ty * v.z - tz * v.y;
-		this.y = tz * v.x - tx * v.z;
-		this.z = tx * v.y - ty * v.x;
-
-	};
-
-	this.multiplySelf = function ( v ) {
-
-		this.x *= v.x;
-		this.y *= v.y;
-		this.z *= v.z;
-	};
-
-	this.multiplyScalar = function ( s ) {
-
-		this.x *= s;
-		this.y *= s;
-		this.z *= s;
-
-	};
-
-	this.dot = function ( v ) {
-
-		return this.x * v.x + this.y * v.y + this.z * v.z;
-
-	};
-
-	this.distanceTo = function ( v ) {
-
-		return Math.sqrt( this.distanceToSquared( v ) );
-
-	};
-
-	this.distanceToSquared = function ( v ) {
-
-		var dx = this.x - v.x, dy = this.y - v.y, dz = this.z - v.z;
-		return dx * dx + dy * dy + dz * dz;
-
-	};
-
-	this.length = function () {
-
-		return Math.sqrt( this.x * this.x + this.y * this.y + this.z * this.z );
-
-	};
-
-	this.lengthSq = function () {
-
-		return this.x * this.x + this.y * this.y + this.z * this.z;
-
-	};
-
-	this.negate = function () {
-
-		this.x = - this.x;
-		this.y = - this.y;
-		this.z = - this.z;
-
-	};
-
-	this.normalize = function () {
-
-		if (this.length() > 0) {
-
-			this.multiplyScalar( 1 / this.length() );
-
-		} else {
-
-			this.multiplyScalar( 0 );
-
-		}
-
-	};
-
-	this.clone = function () {
-
-		return new THREE.Vector3Orig( this.x, this.y, this.z );
-
-	};
-
-	this.toString = function () {
-
-		return 'THREE.Vector3Orig ( ' + this.x + ', ' + this.y + ', ' + this.z + ' )';
-
-	};
-
-};

+ 1 - 0
src/core/Vector4.js

@@ -1,5 +1,6 @@
 /**
 /**
  * @author supereggbert / http://www.paulbrunt.co.uk/
  * @author supereggbert / http://www.paulbrunt.co.uk/
+ * @author philogb / http://blog.thejit.org/
  */
  */
 
 
 THREE.Vector4 = function ( x, y, z, w ) {
 THREE.Vector4 = function ( x, y, z, w ) {

+ 0 - 78
src/core/Vector4.old.js

@@ -1,78 +0,0 @@
-/**
- * @author supereggbert / http://www.paulbrunt.co.uk/
- */
-
-THREE.Vector4Orig = function ( x, y, z, w ) {
-
-	this.x = x || 0;
-	this.y = y || 0;
-	this.z = z || 0;
-	this.w = w || 1;
-
-	this.set = function ( x, y, z, w ) {
-
-		this.x = x;
-		this.y = y;
-		this.z = z;
-		this.w = w;
-
-	};
-
-	this.copy = function ( v ) {
-
-		this.x = v.x;
-		this.y = v.y;
-		this.z = v.z;
-		this.w = v.w;
-
-	};
-
-	this.add = function ( v1, v2 ) {
-
-		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.addSelf = function ( v ) {
-
-		this.x += v.x;
-		this.y += v.y;
-		this.z += v.z;
-		this.w += v.w;
-
-	};
-
-	this.sub = function ( v1, v2 ) {
-
-		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.subSelf = function ( v ) {
-
-		this.x -= v.x;
-		this.y -= v.y;
-		this.z -= v.z;
-		this.w -= v.w;
-
-	};
-
-	this.clone = function () {
-
-		return new THREE.Vector4Orig( this.x, this.y, this.z, this.w );
-
-	};
-
-	this.toString = function () {
-
-		return 'THREE.Vector4Orig (' + this.x + ', ' + this.y + ', ' + this.z + ', ' + this.w + ')';
-
-	};
-
-};

Some files were not shown because too many files changed in this diff