提交 59e227d2 编写于 作者: G Garrett Johnson

update Material.json and add `stencilMask` to THREE.legacy

上级 5dac4127
...@@ -1311,6 +1311,21 @@ Object.defineProperties( Material.prototype, { ...@@ -1311,6 +1311,21 @@ Object.defineProperties( Material.prototype, {
console.warn( 'THREE.' + this.type + ': .shading has been removed. Use the boolean .flatShading instead.' ); console.warn( 'THREE.' + this.type + ': .shading has been removed. Use the boolean .flatShading instead.' );
this.flatShading = ( value === FlatShading ); this.flatShading = ( value === FlatShading );
}
},
stencilMask: {
get: function () {
console.warn( 'THREE.' + this.type + ': .stencilMask has been removed. Use .stencilFuncMask instead.' );
return this.stencilFuncMask;
},
set: function ( value ) {
console.warn( 'THREE.' + this.type + ': .stencilMask has been removed. Use .stencilFuncMask instead.' );
this.stencilFuncMask = value;
} }
} }
......
...@@ -50,24 +50,6 @@ function Material() { ...@@ -50,24 +50,6 @@ function Material() {
this.stencilZPass = KeepStencilOp; this.stencilZPass = KeepStencilOp;
this.stencilWrite = false; this.stencilWrite = false;
Object.defineProperty( this, 'stencilMask', {
set: function ( value ) {
console.warn( 'Material.stencilMask has been removed. Use Material.stencilFuncMask instead.' );
this.stencilFuncMask = value;
},
get: function () {
console.warn( 'Material.stencilMask has been removed. Use Material.stencilFuncMask instead.' );
return this.stencilFuncMask;
}
} );
this.clippingPlanes = null; this.clippingPlanes = null;
this.clipIntersection = false; this.clipIntersection = false;
this.clipShadows = false; this.clipShadows = false;
...@@ -277,9 +259,10 @@ Material.prototype = Object.assign( Object.create( EventDispatcher.prototype ), ...@@ -277,9 +259,10 @@ Material.prototype = Object.assign( Object.create( EventDispatcher.prototype ),
data.depthWrite = this.depthWrite; data.depthWrite = this.depthWrite;
data.stencilWrite = this.stencilWrite; data.stencilWrite = this.stencilWrite;
data.stencilWriteMask = this.stencilWriteMask;
data.stencilFunc = this.stencilFunc; data.stencilFunc = this.stencilFunc;
data.stencilRef = this.stencilRef; data.stencilRef = this.stencilRef;
data.stencilMask = this.stencilMask; data.stencilFuncMask = this.stencilFuncMask;
data.stencilFail = this.stencilFail; data.stencilFail = this.stencilFail;
data.stencilZFail = this.stencilZFail; data.stencilZFail = this.stencilZFail;
data.stencilZPass = this.stencilZPass; data.stencilZPass = this.stencilZPass;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册