ModelLightingOptions.js 802 B

1234567891011121314151617181920212223242526272829
  1. import defaultValue from "../../Core/defaultValue.js";
  2. import LightingModel from "./LightingModel.js";
  3. /**
  4. * Options for configuring the {@link LightingPipelineStage}
  5. *
  6. * @param {object} options An object containing the following options
  7. * @param {LightingModel} [options.lightingModel=LightingModel.UNLIT] The lighting model to use
  8. *
  9. * @alias ModelLightingOptions
  10. * @constructor
  11. *
  12. * @private
  13. */
  14. function ModelLightingOptions(options) {
  15. options = defaultValue(options, defaultValue.EMPTY_OBJECT);
  16. /**
  17. * The lighting model to use, such as UNLIT or PBR. This is determined by
  18. * the primitive's material.
  19. *
  20. * @type {LightingModel}
  21. *
  22. * @private
  23. */
  24. this.lightingModel = defaultValue(options.lightingModel, LightingModel.UNLIT);
  25. }
  26. export default ModelLightingOptions;