|
@@ -6157,12 +6157,12 @@ var BABYLON;
|
|
|
_StencilState.prototype.reset = function () {
|
|
|
this._stencilTest = false;
|
|
|
this._stencilMask = 0xFF;
|
|
|
- this._stencilFunc = 0x0207; //WebGLRenderingContext.ALWAYS;
|
|
|
+ this._stencilFunc = BABYLON.Engine.ALWAYS;
|
|
|
this._stencilFuncRef = 1;
|
|
|
this._stencilFuncMask = 0xFF;
|
|
|
- this._stencilOpStencilFail = 0x1E00; //WebGLRenderingContext.KEEP;
|
|
|
- this._stencilOpDepthFail = 0x1E00; //WebGLRenderingContext.KEEP;
|
|
|
- this._stencilOpStencilDepthPass = 0x1E01; //WebGLRenderingContext.REPLACE;
|
|
|
+ this._stencilOpStencilFail = BABYLON.Engine.KEEP;
|
|
|
+ this._stencilOpDepthFail = BABYLON.Engine.KEEP;
|
|
|
+ this._stencilOpStencilDepthPass = BABYLON.Engine.REPLACE;
|
|
|
this._isStencilTestDirty = true;
|
|
|
this._isStencilMaskDirty = true;
|
|
|
this._isStencilFuncDirty = true;
|
|
@@ -6533,6 +6533,111 @@ var BABYLON;
|
|
|
}
|
|
|
BABYLON.Tools.Log("Babylon.js engine (v" + Engine.Version + ") launched");
|
|
|
}
|
|
|
+ Object.defineProperty(Engine, "NEVER", {
|
|
|
+ get: function () {
|
|
|
+ return Engine._NEVER;
|
|
|
+ },
|
|
|
+ enumerable: true,
|
|
|
+ configurable: true
|
|
|
+ });
|
|
|
+ Object.defineProperty(Engine, "ALWAYS", {
|
|
|
+ get: function () {
|
|
|
+ return Engine._ALWAYS;
|
|
|
+ },
|
|
|
+ enumerable: true,
|
|
|
+ configurable: true
|
|
|
+ });
|
|
|
+ Object.defineProperty(Engine, "LESS", {
|
|
|
+ get: function () {
|
|
|
+ return Engine._LESS;
|
|
|
+ },
|
|
|
+ enumerable: true,
|
|
|
+ configurable: true
|
|
|
+ });
|
|
|
+ Object.defineProperty(Engine, "EQUAL", {
|
|
|
+ get: function () {
|
|
|
+ return Engine._EQUAL;
|
|
|
+ },
|
|
|
+ enumerable: true,
|
|
|
+ configurable: true
|
|
|
+ });
|
|
|
+ Object.defineProperty(Engine, "LEQUAL", {
|
|
|
+ get: function () {
|
|
|
+ return Engine._LEQUAL;
|
|
|
+ },
|
|
|
+ enumerable: true,
|
|
|
+ configurable: true
|
|
|
+ });
|
|
|
+ Object.defineProperty(Engine, "GREATER", {
|
|
|
+ get: function () {
|
|
|
+ return Engine._GREATER;
|
|
|
+ },
|
|
|
+ enumerable: true,
|
|
|
+ configurable: true
|
|
|
+ });
|
|
|
+ Object.defineProperty(Engine, "GEQUAL", {
|
|
|
+ get: function () {
|
|
|
+ return Engine._GEQUAL;
|
|
|
+ },
|
|
|
+ enumerable: true,
|
|
|
+ configurable: true
|
|
|
+ });
|
|
|
+ Object.defineProperty(Engine, "NOTEQUAL", {
|
|
|
+ get: function () {
|
|
|
+ return Engine._NOTEQUAL;
|
|
|
+ },
|
|
|
+ enumerable: true,
|
|
|
+ configurable: true
|
|
|
+ });
|
|
|
+ Object.defineProperty(Engine, "KEEP", {
|
|
|
+ get: function () {
|
|
|
+ return Engine._KEEP;
|
|
|
+ },
|
|
|
+ enumerable: true,
|
|
|
+ configurable: true
|
|
|
+ });
|
|
|
+ Object.defineProperty(Engine, "REPLACE", {
|
|
|
+ get: function () {
|
|
|
+ return Engine._REPLACE;
|
|
|
+ },
|
|
|
+ enumerable: true,
|
|
|
+ configurable: true
|
|
|
+ });
|
|
|
+ Object.defineProperty(Engine, "INCR", {
|
|
|
+ get: function () {
|
|
|
+ return Engine._INCR;
|
|
|
+ },
|
|
|
+ enumerable: true,
|
|
|
+ configurable: true
|
|
|
+ });
|
|
|
+ Object.defineProperty(Engine, "DECR", {
|
|
|
+ get: function () {
|
|
|
+ return Engine._DECR;
|
|
|
+ },
|
|
|
+ enumerable: true,
|
|
|
+ configurable: true
|
|
|
+ });
|
|
|
+ Object.defineProperty(Engine, "INVERT", {
|
|
|
+ get: function () {
|
|
|
+ return Engine._INVERT;
|
|
|
+ },
|
|
|
+ enumerable: true,
|
|
|
+ configurable: true
|
|
|
+ });
|
|
|
+ Object.defineProperty(Engine, "INCR_WRAP", {
|
|
|
+ get: function () {
|
|
|
+ return Engine._INCR_WRAP;
|
|
|
+ },
|
|
|
+ enumerable: true,
|
|
|
+ configurable: true
|
|
|
+ });
|
|
|
+ Object.defineProperty(Engine, "DECR_WRAP", {
|
|
|
+ get: function () {
|
|
|
+ return Engine._DECR_WRAP;
|
|
|
+ },
|
|
|
+ enumerable: true,
|
|
|
+ configurable: true
|
|
|
+ });
|
|
|
Object.defineProperty(Engine, "ALPHA_DISABLE", {
|
|
|
get: function () {
|
|
|
return Engine._ALPHA_DISABLE;
|
|
@@ -8741,6 +8846,23 @@ var BABYLON;
|
|
|
Engine._TEXTURETYPE_UNSIGNED_INT = 0;
|
|
|
Engine._TEXTURETYPE_FLOAT = 1;
|
|
|
Engine._TEXTURETYPE_HALF_FLOAT = 2;
|
|
|
+ // Depht or Stencil test Constants.
|
|
|
+ Engine._NEVER = 0x0200; // Passed to depthFunction or stencilFunction to specify depth or stencil tests will never pass. i.e. Nothing will be drawn.
|
|
|
+ Engine._ALWAYS = 0x0207; // Passed to depthFunction or stencilFunction to specify depth or stencil tests will always pass. i.e. Pixels will be drawn in the order they are drawn.
|
|
|
+ Engine._LESS = 0x0201; // Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is less than the stored value.
|
|
|
+ Engine._EQUAL = 0x0202; // Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is equals to the stored value.
|
|
|
+ Engine._LEQUAL = 0x0203; // Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is less than or equal to the stored value.
|
|
|
+ Engine._GREATER = 0x0204; // Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is greater than the stored value.
|
|
|
+ Engine._GEQUAL = 0x0206; // Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is greater than or equal to the stored value.
|
|
|
+ Engine._NOTEQUAL = 0x0205; // Passed to depthFunction or stencilFunction to specify depth or stencil tests will pass if the new depth value is not equal to the stored value.
|
|
|
+ // Stencil Actions Constants.
|
|
|
+ Engine._KEEP = 0x1E00;
|
|
|
+ Engine._REPLACE = 0x1E01;
|
|
|
+ Engine._INCR = 0x1E02;
|
|
|
+ Engine._DECR = 0x1E03;
|
|
|
+ Engine._INVERT = 0x150A;
|
|
|
+ Engine._INCR_WRAP = 0x8507;
|
|
|
+ Engine._DECR_WRAP = 0x8508;
|
|
|
// Updatable statics so stick with vars here
|
|
|
Engine.CollisionsEpsilon = 0.001;
|
|
|
Engine.CodeRepository = "src/";
|
|
@@ -37292,12 +37414,12 @@ var BABYLON;
|
|
|
engine.setStencilFunctionReference(this._instanceGlowingMeshStencilReference);
|
|
|
if (this.outerGlow) {
|
|
|
currentEffect.setFloat("offset", 0);
|
|
|
- engine.setStencilFunction(WebGLRenderingContext.NOTEQUAL);
|
|
|
+ engine.setStencilFunction(BABYLON.Engine.NOTEQUAL);
|
|
|
engine.draw(true, 0, 6);
|
|
|
}
|
|
|
if (this.innerGlow) {
|
|
|
currentEffect.setFloat("offset", 1);
|
|
|
- engine.setStencilFunction(WebGLRenderingContext.EQUAL);
|
|
|
+ engine.setStencilFunction(BABYLON.Engine.EQUAL);
|
|
|
engine.draw(true, 0, 6);
|
|
|
}
|
|
|
// Restore Cache
|