cesium/packages/engine/Source/Scene/Model/ModelLightingOptions.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

30 lines
760 B
JavaScript
Raw Permalink Normal View History

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}
*
* @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) {
options = options ?? Frozen.EMPTY_OBJECT;
2021-07-30 05:10:48 +08:00
2021-08-03 23:24:09 +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;