|
@@ -43,43 +43,45 @@ THREE.Material.prototype.setValues = function ( values ) {
|
|
|
|
|
|
for ( var key in values ) {
|
|
for ( var key in values ) {
|
|
|
|
|
|
- if ( key === 'id' || key === 'setValues' || key === 'clone' ) continue;
|
|
|
|
-
|
|
|
|
var value = values[ key ];
|
|
var value = values[ key ];
|
|
|
|
|
|
if ( this[ key ] !== undefined ) {
|
|
if ( this[ key ] !== undefined ) {
|
|
|
|
|
|
- if ( this[ key ] instanceof THREE.Color ) {
|
|
|
|
-
|
|
|
|
- if ( value instanceof THREE.Color ) {
|
|
|
|
|
|
+ this[ key ] = value;
|
|
|
|
|
|
- this[ key ].copy( value );
|
|
|
|
|
|
+ }
|
|
|
|
|
|
- } else {
|
|
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+};
|
|
|
|
|
|
- this[ key ].setHex( value );
|
|
|
|
|
|
+THREE.Material.prototype.clone = function () {
|
|
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- } else if ( this[ key ] instanceof THREE.Vector3 ) {
|
|
|
|
|
|
+ material.name = this.name;
|
|
|
|
|
|
- this[ key ].copy( value );
|
|
|
|
|
|
+ material.side = this.side;
|
|
|
|
|
|
- } else {
|
|
|
|
|
|
+ material.opacity = this.opacity;
|
|
|
|
+ material.transparent = this.transparent;
|
|
|
|
|
|
- this[ key ] = value;
|
|
|
|
|
|
+ material.blending = this.blending;
|
|
|
|
|
|
- }
|
|
|
|
|
|
+ material.blendSrc = this.blendSrc;
|
|
|
|
+ material.blendDst = this.blendDst;
|
|
|
|
+ material.blendEquation = this.blendEquation;
|
|
|
|
|
|
- }
|
|
|
|
|
|
+ material.depthTest = this.depthTest;
|
|
|
|
+ material.depthWrite = this.depthWrite;
|
|
|
|
|
|
- }
|
|
|
|
|
|
+ material.polygonOffset = this.polygonOffset;
|
|
|
|
+ material.polygonOffsetFactor = this.polygonOffsetFactor;
|
|
|
|
+ material.polygonOffsetUnits = this.polygonOffsetUnits;
|
|
|
|
|
|
-};
|
|
|
|
|
|
+ material.alphaTest = this.alphaTest;
|
|
|
|
|
|
-THREE.Material.prototype.clone = function () {
|
|
|
|
|
|
+ material.overdraw = this.overdraw;
|
|
|
|
|
|
- return new THREE.Material( this );
|
|
|
|
|
|
+ material.visible = this.visible;
|
|
|
|
|
|
};
|
|
};
|
|
|
|
|