mirror of
https://github.com/wahyd4/three.js.git
synced 2026-08-13 23:16:07 +10:00
* Starting the materials refactoring (testing branching too)
This commit is contained in:
@@ -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 + ' )';
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
@@ -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 + ' )';
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
@@ -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 };
|
||||
@@ -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 + ' )';
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
@@ -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 + ' )';
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
Reference in New Issue
Block a user