ViewportQuad

new Cesium.ViewportQuad(rectangle, material)

视口对齐的四边形。
Name Type Description
rectangle BoundingRectangle optional 定义四边形在视区中位置的 BoundingRectangle
material Material optional 定义四边形视口表面外观的 Material
Example:
const viewportQuad = new Cesium.ViewportQuad(new Cesium.BoundingRectangle(0, 0, 80, 40));
viewportQuad.material.uniforms.color = new Cesium.Color(1.0, 0.0, 0.0, 1.0);

Members

四边形视区的曲面外观。 这可以是几个内置 Material 对象之一,也可以是自定义材质,脚本中使用 Fabric 的 Fabric。

默认材质为 Material.ColorType

Example:
// 1. Change the color of the default material to yellow
viewportQuad.material.uniforms.color = new Cesium.Color(1.0, 1.0, 0.0, 1.0);

// 2. Change material to horizontal stripes
viewportQuad.material = Cesium.Material.fromType(Cesium.Material.StripeType);
See:
定义四边形在视区中的位置的 BoundingRectangle。
Example:
viewportQuad.rectangle = new Cesium.BoundingRectangle(0, 0, 80, 40);
确定是否显示视口四边形基元。
Default Value: true

Methods

销毁此对象持有的 WebGL 资源。 销毁对象允许确定性 释放 WebGL 资源,而不是依赖垃圾回收器来销毁这个对象。

一旦对象被销毁,就不应该使用它;调用 isDestroyed 将导致 DeveloperError 异常。 因此 将返回值 (undefined) 分配给对象,如示例中所示。
Throws:
Example:
quad = quad && quad.destroy();
See:

isDestroyed()boolean

如果此对象已销毁,则返回 true;否则为 false。

如果此对象已销毁,则不应使用;调用 * isDestroyed 将导致 DeveloperError 异常。
Returns:
如果此对象被销毁,则为 True;否则为 false。
See:
ViewerCesiumWidget 将场景渲染到 获取渲染此基元所需的绘制命令。

请勿直接调用此函数。 这记录下来只是为了 列出渲染场景时可能传播的异常:

Throws:
Need help? The fastest way to get answers is from the community and team on the Cesium Forum.