方法 Methods
static Cesium.PostProcessStageLibrary.createBlackAndWhiteStage() → PostProcessStage
这一阶段有一个统一的值, This stage has one uniform value, gradations,缩放每个像素的亮度。 , which scales the luminance of each pixel.
返回: Returns:
static Cesium.PostProcessStageLibrary.createBlurStage() → PostProcessStageComposite
本阶段有以下制服: This stage has the following uniforms: delta, sigma, 和 , and stepSize.
delta and sigma 用于计算高斯滤波器的权重。等式是 are used to compute the weights of a Gaussian filter. The equation is exp((-0.5 * delta * delta) / (sigma * sigma))。默认值为 . The default value for delta is 1.0。默认值为 . The default value for sigma is 2.0.
stepSize 是到下一个纹素的距离。默认为 is the distance to the next texel. The default is 1.0.
返回: Returns:
static Cesium.PostProcessStageLibrary.createBrightnessStage() → PostProcessStage
这一阶段有一个统一的值, This stage has one uniform value, brightness,缩放每个像素的饱和度。 , which scales the saturation of each pixel.
返回: Returns:
static Cesium.PostProcessStageLibrary.createDepthOfFieldStage() → PostProcessStageComposite
景深模拟相机对焦。场景中对焦的物体将是清晰的,而未对焦的物体将是模糊的。 Depth of field simulates camera focus. Objects in the scene that are in focus will be clear whereas objects not in focus will be blurred.
本阶段有以下制服: This stage has the following uniforms: focalDistance, delta, sigma, 和 , and stepSize.
focalDistance 是设置相机焦点时距相机的距离(以米为单位)。 is the distance in meters from the camera to set the camera focus.
delta, sigma, 和 , and stepSize 与以下属性相同 are the same properties as PostProcessStageLibrary#createBlurStage。模糊应用于焦点之外的区域。 . The blur is applied to the areas out of focus.
返回: Returns:
static Cesium.PostProcessStageLibrary.createEdgeDetectionStage() → PostProcessStage
当位于边缘时,将颜色写入输出纹理,并将 alpha 设置为 1.0。 Writes the color to the output texture with alpha set to 1.0 when it is on an edge.
本阶段有以下制服: This stage has the following uniforms: color and length
color是突出显示边缘的颜色。默认为 is the color of the highlighted edge. The default isColor#BLACK.length是边缘的长度(以像素为单位)。默认为 is the length of the edges in pixels. The default is0.5.
2D 不支持此阶段。 This stage is not supported in 2D.
返回: Returns:
示例: Example:
// multiple silhouette effects
const yellowEdge = Cesium.PostProcessStageLibrary.createEdgeDetectionStage();
yellowEdge.uniforms.color = Cesium.Color.YELLOW;
yellowEdge.selected = [feature0];
const greenEdge = Cesium.PostProcessStageLibrary.createEdgeDetectionStage();
greenEdge.uniforms.color = Cesium.Color.LIME;
greenEdge.selected = [feature1];
// draw edges around feature0 and feature1
postProcessStages.add(Cesium.PostProcessStageLibrary.createSilhouetteStage([yellowEdge, greenEdge]);
static Cesium.PostProcessStageLibrary.createLensFlareStage() → PostProcessStage
本阶段有以下制服: This stage has the following uniforms: dirtTexture, starTexture, intensity, distortion, ghostDispersal,
haloWidth, dirtAmount, 和 , and earthRadius.
dirtTexture是为了模拟镜头上的污垢而采样的纹理。 is a texture sampled to simulate dirt on the lens.starTexture是为耀斑的星形图案采样的纹理。 is the texture sampled for the star pattern of the flare.intensity是一个标量乘以镜头光斑的结果。默认值为 is a scalar multiplied by the result of the lens flare. The default value is2.0.distortion是影响色彩效果失真的标量值。默认值为 is a scalar value that affects the chromatic effect distortion. The default value is10.0.ghostDispersal是一个标量,指示光晕效果距纹理中心的距离。默认值为 is a scalar indicating how far the halo effect is from the center of the texture. The default value is0.4.haloWidth是一个标量,表示来自重影扩散的光晕宽度。默认值为 is a scalar representing the width of the halo from the ghost dispersal. The default value is0.4.dirtAmount是表示镜头上污垢量的标量。默认值为 is a scalar representing the amount of dirt on the lens. The default value is0.4.earthRadius是地球的最大半径。默认值为 is the maximum radius of the earth. The default value isEllipsoid.WGS84.maximumRadius.
返回: Returns:
static Cesium.PostProcessStageLibrary.createNightVisionStage() → PostProcessStage
返回: Returns:
static Cesium.PostProcessStageLibrary.createSilhouetteStage(edgeDetectionStages) → PostProcessStageComposite
轮廓效果将边缘检测通道中的颜色与输入颜色纹理进行合成。 A silhouette effect composites the color from the edge detection pass with input color texture.
此阶段有以下制服: This stage has the following uniforms when edgeDetectionStages is undefined: color and length
color 是突出显示边缘的颜色。默认为 is the color of the highlighted edge. The default is Color#BLACK.
length 是边缘的长度(以像素为单位)。默认为 is the length of the edges in pixels. The default is 0.5.
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
edgeDetectionStages |
Array.<PostProcessStage> | 可选 optional 一系列边缘检测后处理阶段。 An array of edge detection post process stages. |
返回: Returns:
此阶段需要 WEBGL_depth_texture 扩展。 This stage requires the WEBGL_depth_texture extension.
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
scene |
Scene | 现场。 The scene. |
返回: Returns:
另见: See:
此阶段需要 WEBGL_depth_texture 扩展。 This stage requires the WEBGL_depth_texture extension.
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
scene |
Scene | 现场。 The scene. |
返回: Returns:
另见: See:
此阶段需要 WEBGL_depth_texture 扩展。 This stage requires the WEBGL_depth_texture extension.
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
scene |
Scene | 现场。 The scene. |
返回: Returns:
另见: See:
此阶段需要 WEBGL_depth_texture 扩展。 This stage requires the WEBGL_depth_texture extension.
| 名称 Name | 类型 Type | 说明 Description |
|---|---|---|
scene |
Scene | 现场。 The scene. |
