* Starting the materials refactoring (testing branching too)

This commit is contained in:
Mr.doob
2010-11-12 04:37:36 +00:00
parent b978e9e592
commit facf7ff039
7 changed files with 39 additions and 58 deletions
+24
View File
@@ -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 + ' )';
}
};
-20
View File
@@ -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 + ' )';
}
};
-21
View File
@@ -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 };
-17
View File
@@ -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
View File
@@ -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 + ' )';
};
};