CustomShaderTranslucencyMode.js 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  1. /**
  2. * An enum for controling how {@link CustomShader} handles translucency compared with the original
  3. * primitive.
  4. *
  5. * @enum {number}
  6. *
  7. * @experimental This feature is using part of the 3D Tiles spec that is not final and is subject to change without Cesium's standard deprecation policy.
  8. */
  9. const CustomShaderTranslucencyMode = {
  10. /**
  11. * Inherit translucency settings from the primitive's material. If the primitive used a
  12. * translucent material, the custom shader will also be considered translucent. If the primitive
  13. * used an opaque material, the custom shader will be considered opaque.
  14. *
  15. * @type {number}
  16. * @constant
  17. */
  18. INHERIT: 0,
  19. /**
  20. * Force the primitive to render the primitive as opaque, ignoring any material settings.
  21. *
  22. * @type {number}
  23. * @constant
  24. */
  25. OPAQUE: 1,
  26. /**
  27. * Force the primitive to render the primitive as translucent, ignoring any material settings.
  28. *
  29. * @type {number}
  30. * @constant
  31. */
  32. TRANSLUCENT: 2,
  33. };
  34. export default Object.freeze(CustomShaderTranslucencyMode);