一个与视口对齐的四边形。
| 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 : Material
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:
-
DeveloperError :此对象已被销毁,即已调用 destroy()。
Example:
quad = quad && quad.destroy();
See:
Returns:
如果此对象已被销毁则为 true,否则为 false。
See:
Throws:
-
DeveloperError :this.material 必须已定义。
-
DeveloperError :this.rectangle 必须已定义。
