|
@@ -94,6 +94,51 @@
|
|
|
[page:Constant MixOperation] 使用反射率来混和两种颜色。uses reflectivity to blend between the two colors.<br />
|
|
|
[page:Constant AddOperation] 用于对两种颜色进行相加。</p>
|
|
|
|
|
|
+ <h2>Stencil Functions</h2>
|
|
|
+ <code>
|
|
|
+ THREE.NeverStencilFunc
|
|
|
+ THREE.LessStencilFunc
|
|
|
+ THREE.EqualStencilFunc
|
|
|
+ THREE.LessEqualStencilFunc
|
|
|
+ THREE.GreaterStencilFunc
|
|
|
+ THREE.NotEqualStencilFunc
|
|
|
+ THREE.GreaterEqualStencilFunc
|
|
|
+ THREE.AlwaysStencilFunc
|
|
|
+ </code>
|
|
|
+ <p>
|
|
|
+ Which stencil function the material uses to determine whether or not to perform a stencil operation.<br />
|
|
|
+ [page:Materials NeverStencilFunc] will never return true.<br />
|
|
|
+ [page:Materials LessStencilFunc] will return true if the stencil reference value is less than the current stencil value.<br />
|
|
|
+ [page:Materials EqualStencilFunc] will return true if the stencil reference value is equal to the current stencil value.<br />
|
|
|
+ [page:Materials LessEqualStencilFunc] will return true if the stencil reference value is less than or equal to the current stencil value.<br />
|
|
|
+ [page:Materials GreaterStencilFunc] will return true if the stencil reference value is greater than the current stencil value.<br />
|
|
|
+ [page:Materials NotEqualStencilFunc] will return true if the stencil reference value is not equal to the current stencil value.<br />
|
|
|
+ [page:Materials GreaterEqualStencilFunc] will return true if the stencil reference value is greater than or equal to the current stencil value.<br />
|
|
|
+ [page:Materials AlwaysStencilFunc] will always return true.<br />
|
|
|
+ </p>
|
|
|
+
|
|
|
+ <h2>Stencil Operations</h2>
|
|
|
+ <code>
|
|
|
+ THREE.ZeroStencilOp
|
|
|
+ THREE.KeepStencilOp
|
|
|
+ THREE.ReplaceStencilOp
|
|
|
+ THREE.IncrementStencilOp
|
|
|
+ THREE.DecrementStencilOp
|
|
|
+ THREE.IncrementWrapStencilOp
|
|
|
+ THREE.DecrementWrapStencilOp
|
|
|
+ THREE.InvertStencilOp
|
|
|
+ </code>
|
|
|
+ <p>
|
|
|
+ Which stencil operation the material will perform on the stencil buffer pixel if the provided stencil function passes.<br />
|
|
|
+ [page:Materials ZeroStencilOp] will set the stencil value to 0.<br />
|
|
|
+ [page:Materials KeepStencilOp] will not change the current stencil value.<br />
|
|
|
+ [page:Materials ReplaceStencilOp] will replace the stencil value with the specified stencil reference value.<br />
|
|
|
+ [page:Materials IncrementStencilOp] will increment the current stencil value by 1.<br />
|
|
|
+ [page:Materials DecrementStencilOp] will decrement the current stencil value by 1.<br />
|
|
|
+ [page:Materials IncrementWrapStencilOp] will increment the current stencil value by 1. If the value increments past 255 it will be set to 0.<br />
|
|
|
+ [page:Materials DecrementWrapStencilOp] will increment the current stencil value by 1. If the value decrements below 0 it will be set to 255.<br />
|
|
|
+ [page:Materials InvertStencilOp] will perform a bitwise iversion of the current stencil value.<br />
|
|
|
+ </p>
|
|
|
|
|
|
<h2>源代码</h2>
|
|
|
|