A viewport aligned quad.
参数名称 | 类型 | 描述信息 |
---|---|---|
rectangle |
BoundingRectangle |
可选
The BoundingRectangle defining the quad's position within the viewport. |
material |
Material |
可选
The Material defining the surface appearance of the viewport quad. |
使用示例:
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);
成员(属性)
material : Material
The surface appearance of the viewport quad. This can be one of several built-in
Material
objects or a custom material, scripted with
Fabric.
The default material is Material.ColorType
.
使用示例:
// 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);
参考:
The BoundingRectangle defining the quad's position within the viewport.
使用示例:
viewportQuad.rectangle = new Cesium.BoundingRectangle(0, 0, 80, 40);
Determines if the viewport quad primitive will be shown.
-
默认值:
true
方法
Destroys the WebGL resources held by this object. Destroying an object allows for deterministic
release of WebGL resources, instead of relying on the garbage collector to destroy this object.
Once an object is destroyed, it should not be used; calling any function other than
Once an object is destroyed, it should not be used; calling any function other than
isDestroyed
will result in a DeveloperError
exception. Therefore,
assign the return value (undefined
) to the object as done in the example.
Throws:
-
DeveloperError : This object was destroyed, i.e., destroy() was called.
使用示例:
quad = quad && quad.destroy();
参考:
Returns true if this object was destroyed; otherwise, false.
If this object was destroyed, it should not be used; calling any function other than
If this object was destroyed, it should not be used; calling any function other than
isDestroyed
will result in a DeveloperError
exception.
返回值:
True if this object was destroyed; otherwise, false.
Called when
Viewer
or CesiumWidget
render the scene to
get the draw commands needed to render this primitive.
Do not call this function directly. This is documented just to list the exceptions that may be propagated when the scene is rendered:
Throws:
-
DeveloperError : this.material must be defined.
-
DeveloperError : this.rectangle must be defined.