2025-03-12 05:50:04 +08:00
|
|
|
import Frozen from "../../Core/Frozen.js";
|
2021-07-30 05:10:48 +08:00
|
|
|
import LightingModel from "./LightingModel.js";
|
|
|
|
|
|
|
|
|
|
/**
|
2021-08-03 23:24:09 +08:00
|
|
|
* Options for configuring the {@link LightingPipelineStage}
|
|
|
|
|
*
|
2023-02-10 16:35:41 +08:00
|
|
|
* @param {object} options An object containing the following options
|
2021-07-30 05:10:48 +08:00
|
|
|
* @param {LightingModel} [options.lightingModel=LightingModel.UNLIT] The lighting model to use
|
2021-08-03 23:24:09 +08:00
|
|
|
*
|
2021-08-19 19:28:20 +08:00
|
|
|
* @alias ModelLightingOptions
|
2021-08-19 05:15:22 +08:00
|
|
|
* @constructor
|
|
|
|
|
*
|
2021-08-03 23:24:09 +08:00
|
|
|
* @private
|
2021-07-30 05:10:48 +08:00
|
|
|
*/
|
2022-08-11 06:22:27 +08:00
|
|
|
function ModelLightingOptions(options) {
|
2025-03-12 05:50:04 +08:00
|
|
|
options = options ?? Frozen.EMPTY_OBJECT;
|
2021-07-30 05:10:48 +08:00
|
|
|
|
2021-08-03 23:24:09 +08:00
|
|
|
/**
|
2021-08-06 23:07:20 +08:00
|
|
|
* The lighting model to use, such as UNLIT or PBR. This is determined by
|
|
|
|
|
* the primitive's material.
|
2021-08-03 23:24:09 +08:00
|
|
|
*
|
|
|
|
|
* @type {LightingModel}
|
|
|
|
|
*
|
|
|
|
|
* @private
|
|
|
|
|
*/
|
2025-03-04 03:03:53 +08:00
|
|
|
this.lightingModel = options.lightingModel ?? LightingModel.UNLIT;
|
2021-07-30 05:10:48 +08:00
|
|
|
}
|
2022-08-11 06:22:27 +08:00
|
|
|
|
|
|
|
|
export default ModelLightingOptions;
|