Browse Source

* Starting the materials refactoring (testing branching too)

Mr.doob 14 years ago
parent
commit
facf7ff039

+ 24 - 0
src/materials/LineBasicMaterial.js

@@ -0,0 +1,24 @@
+/**
+ * @author mr.doob / http://mrdoob.com/
+ *
+ * params = {
+ * 	color: new THREE.Color(),
+ * 	line_width: [ 0 - 100 ]
+ * }
+ */
+
+THREE.LineColorMaterial = function ( params ) {
+
+	this.params = params;
+
+};
+
+THREE.LineColorMaterial.prototype = {
+
+	toString: function () {
+
+		return 'THREE.LineColorMaterial ( params: ' + this.params + ' )';
+
+	}
+
+};

+ 0 - 20
src/materials/LineColorMaterial.js

@@ -1,20 +0,0 @@
-/**
- * @author mr.doob / http://mrdoob.com/
- */
-
-THREE.LineColorMaterial = function ( hex, opacity, lineWidth ) {
-
-	this.lineWidth = lineWidth || 1;
-	this.color = new THREE.Color( ( opacity !== undefined ? opacity : 1 ) * 0xff << 24 ^ hex );
-
-};
-
-THREE.LineColorMaterial.prototype = {
-
-	toString: function () {
-
-		return 'THREE.LineColorMaterial ( color: ' + this.color + ', lineWidth: ' + this.lineWidth + ' )';
-
-	}
-
-};

+ 0 - 0
src/materials/MeshColorFillMaterial.js → src/materials/MeshBasicMaterial.js


+ 0 - 21
src/materials/MeshBitmapMaterial.js

@@ -1,21 +0,0 @@
-/**
- * @author mr.doob / http://mrdoob.com/
- */
-
-THREE.MeshBitmapMaterial = function ( bitmap, mode ) {
-
-	this.id = THREE.MeshBitmapMaterialCounter.value ++;
-
-	this.bitmap = bitmap;
-	this.mode = mode || THREE.MeshBitmapMaterialMode.UVMAPPING;
-
-	this.toString = function () {
-
-		return 'THREE.MeshBitmapMaterial ( bitmap: ' + this.bitmap + ', mode: ' + this.mode + ', id: ' + this.id + ' )';
-
-	};
-
-};
-
-THREE.MeshBitmapMaterialCounter = { value: 0 };
-THREE.MeshBitmapMaterialMode = { UVMAPPING: 0 };

+ 0 - 17
src/materials/MeshColorStrokeMaterial.js

@@ -1,17 +0,0 @@
-/**
- * @author mr.doob / http://mrdoob.com/
- */
-
-THREE.MeshColorStrokeMaterial = function ( hex, opacity, lineWidth ) {
-
-	this.lineWidth = lineWidth || 1;
-
-	this.color = new THREE.Color( ( opacity !== undefined ? opacity : 1 ) * 0xff << 24 ^ hex );
-
-	this.toString = function () {
-
-		return 'THREE.MeshColorStrokeMaterial ( lineWidth: ' + this.lineWidth + ', color: ' + this.color + ' )';
-
-	};
-
-};

+ 15 - 0
src/materials/MeshLambertMaterial.js

@@ -0,0 +1,15 @@
+/**
+ * @author mr.doob / http://mrdoob.com/
+ */
+
+THREE.MeshColorFillMaterial = function ( hex, opacity ) {
+
+	this.color = new THREE.Color( ( opacity !== undefined ? opacity : 1 ) * 0xff << 24 ^ hex );
+
+	this.toString = function () {
+
+		return 'THREE.MeshColorFillMaterial ( color: ' + this.color + ' )';
+
+	};
+
+};

+ 0 - 0
src/materials/ParticleBitmapMaterial.js → src/materials/ParticleBasicMaterial.js