提交 156c32a1 编写于 作者: G Garrett Johnson

Change stencil parameters to be in line with other material parameter and constant names

上级 4ef4b6d8
......@@ -143,22 +143,20 @@ export var RGBADepthPacking = 3201;
export var TangentSpaceNormalMap = 0;
export var ObjectSpaceNormalMap = 1;
// StencilOp
export var ZERO = 0;
export var KEEP = 7680;
export var REPLACE = 7681;
export var INCR = 7682;
export var DECR = 7683;
export var INCR_WRAP = 34055;
export var DECR_WRAP = 34056;
export var INVERT = 5386;
export var ZeroStencilOp = 0;
export var KeepStencilOp = 7680;
export var ReplaceStencilOp = 7681;
export var IncrementStencilOp = 7682;
export var DecrementStencilOp = 7683;
export var IncrementWrapStencilOp = 34055;
export var DecrementWrapStencilOp = 34056;
export var InvertStencilOp = 5386;
// StencilFunc
export var NEVER = 512;
export var LESS = 513;
export var EQUAL = 514;
export var LEQUAL = 515;
export var GREATER = 516;
export var NOTEQUAL = 517;
export var GEQUAL = 518;
export var ALWAYS = 519;
export var NeverStencilFunc = 512;
export var LessStencilFunc = 513;
export var EqualStencilFunc = 514;
export var LessEqualStencilFunc = 515;
export var GreaterStencilFunc = 516;
export var NotEqualStencilFunc = 517;
export var GreaterEqualStencilFunc = 518;
export var AlwaysStencilFunc = 519;
import { EventDispatcher } from '../core/EventDispatcher.js';
import { NoColors, FrontSide, FlatShading, NormalBlending, LessEqualDepth, AddEquation, OneMinusSrcAlphaFactor, SrcAlphaFactor } from '../constants.js';
import { NoColors, FrontSide, FlatShading, NormalBlending, LessEqualDepth, AddEquation, OneMinusSrcAlphaFactor, SrcAlphaFactor, AlwaysStencilFunc, KeepStencilOp } from '../constants.js';
import { _Math } from '../math/Math.js';
/**
......@@ -40,7 +40,13 @@ function Material() {
this.depthTest = true;
this.depthWrite = true;
this.stencil = null;
this.stencilFunc = AlwaysStencilFunc;
this.stencilRef = 0;
this.stencilMask = 0xff;
this.stencilFail = KeepStencilOp;
this.stencilZFail = KeepStencilOp;
this.stencilZPass = KeepStencilOp;
this.stencilWrite = true;
this.clippingPlanes = null;
this.clipIntersection = false;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册