StencilFunction.js 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. import freezeObject from '../Core/freezeObject.js';
  2. import WebGLConstants from '../Core/WebGLConstants.js';
  3. /**
  4. * Determines the function used to compare stencil values for the stencil test.
  5. *
  6. * @exports StencilFunction
  7. */
  8. var StencilFunction = {
  9. /**
  10. * The stencil test never passes.
  11. *
  12. * @type {Number}
  13. * @constant
  14. */
  15. NEVER : WebGLConstants.NEVER,
  16. /**
  17. * The stencil test passes when the masked reference value is less than the masked stencil value.
  18. *
  19. * @type {Number}
  20. * @constant
  21. */
  22. LESS : WebGLConstants.LESS,
  23. /**
  24. * The stencil test passes when the masked reference value is equal to the masked stencil value.
  25. *
  26. * @type {Number}
  27. * @constant
  28. */
  29. EQUAL : WebGLConstants.EQUAL,
  30. /**
  31. * The stencil test passes when the masked reference value is less than or equal to the masked stencil value.
  32. *
  33. * @type {Number}
  34. * @constant
  35. */
  36. LESS_OR_EQUAL : WebGLConstants.LEQUAL,
  37. /**
  38. * The stencil test passes when the masked reference value is greater than the masked stencil value.
  39. *
  40. * @type {Number}
  41. * @constant
  42. */
  43. GREATER : WebGLConstants.GREATER,
  44. /**
  45. * The stencil test passes when the masked reference value is not equal to the masked stencil value.
  46. *
  47. * @type {Number}
  48. * @constant
  49. */
  50. NOT_EQUAL : WebGLConstants.NOTEQUAL,
  51. /**
  52. * The stencil test passes when the masked reference value is greater than or equal to the masked stencil value.
  53. *
  54. * @type {Number}
  55. * @constant
  56. */
  57. GREATER_OR_EQUAL : WebGLConstants.GEQUAL,
  58. /**
  59. * The stencil test always passes.
  60. *
  61. * @type {Number}
  62. * @constant
  63. */
  64. ALWAYS : WebGLConstants.ALWAYS
  65. };
  66. export default freezeObject(StencilFunction);