BlendFunction.js 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. import freezeObject from '../Core/freezeObject.js';
  2. import WebGLConstants from '../Core/WebGLConstants.js';
  3. /**
  4. * Determines how blending factors are computed.
  5. *
  6. * @exports BlendFunction
  7. */
  8. var BlendFunction = {
  9. /**
  10. * The blend factor is zero.
  11. *
  12. * @type {Number}
  13. * @constant
  14. */
  15. ZERO : WebGLConstants.ZERO,
  16. /**
  17. * The blend factor is one.
  18. *
  19. * @type {Number}
  20. * @constant
  21. */
  22. ONE : WebGLConstants.ONE,
  23. /**
  24. * The blend factor is the source color.
  25. *
  26. * @type {Number}
  27. * @constant
  28. */
  29. SOURCE_COLOR : WebGLConstants.SRC_COLOR,
  30. /**
  31. * The blend factor is one minus the source color.
  32. *
  33. * @type {Number}
  34. * @constant
  35. */
  36. ONE_MINUS_SOURCE_COLOR : WebGLConstants.ONE_MINUS_SRC_COLOR,
  37. /**
  38. * The blend factor is the destination color.
  39. *
  40. * @type {Number}
  41. * @constant
  42. */
  43. DESTINATION_COLOR : WebGLConstants.DST_COLOR,
  44. /**
  45. * The blend factor is one minus the destination color.
  46. *
  47. * @type {Number}
  48. * @constant
  49. */
  50. ONE_MINUS_DESTINATION_COLOR : WebGLConstants.ONE_MINUS_DST_COLOR,
  51. /**
  52. * The blend factor is the source alpha.
  53. *
  54. * @type {Number}
  55. * @constant
  56. */
  57. SOURCE_ALPHA : WebGLConstants.SRC_ALPHA,
  58. /**
  59. * The blend factor is one minus the source alpha.
  60. *
  61. * @type {Number}
  62. * @constant
  63. */
  64. ONE_MINUS_SOURCE_ALPHA : WebGLConstants.ONE_MINUS_SRC_ALPHA,
  65. /**
  66. * The blend factor is the destination alpha.
  67. *
  68. * @type {Number}
  69. * @constant
  70. */
  71. DESTINATION_ALPHA : WebGLConstants.DST_ALPHA,
  72. /**
  73. * The blend factor is one minus the destination alpha.
  74. *
  75. * @type {Number}
  76. * @constant
  77. */
  78. ONE_MINUS_DESTINATION_ALPHA : WebGLConstants.ONE_MINUS_DST_ALPHA,
  79. /**
  80. * The blend factor is the constant color.
  81. *
  82. * @type {Number}
  83. * @constant
  84. */
  85. CONSTANT_COLOR : WebGLConstants.CONSTANT_COLOR,
  86. /**
  87. * The blend factor is one minus the constant color.
  88. *
  89. * @type {Number}
  90. * @constant
  91. */
  92. ONE_MINUS_CONSTANT_COLOR : WebGLConstants.ONE_MINUS_CONSTANT_COLOR,
  93. /**
  94. * The blend factor is the constant alpha.
  95. *
  96. * @type {Number}
  97. * @constant
  98. */
  99. CONSTANT_ALPHA : WebGLConstants.CONSTANT_ALPHA,
  100. /**
  101. * The blend factor is one minus the constant alpha.
  102. *
  103. * @type {Number}
  104. * @constant
  105. */
  106. ONE_MINUS_CONSTANT_ALPHA : WebGLConstants.ONE_MINUS_CONSTANT_ALPHA,
  107. /**
  108. * The blend factor is the saturated source alpha.
  109. *
  110. * @type {Number}
  111. * @constant
  112. */
  113. SOURCE_ALPHA_SATURATE : WebGLConstants.SRC_ALPHA_SATURATE
  114. };
  115. export default freezeObject(BlendFunction);