new Cesium.ViewportQuad(rectangle, material)

一个视门对齐四角.
Name Type Description
rectangle BoundingRectangle optional BoundingRectangle 定义四角星在视门内的位置.
material Material optional The Material defining the surface appearance of the viewport quad.
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

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.

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:

rectangle : BoundingRectangle

界定四角在景点内位置的圆角.
Example:
viewportQuad.rectangle = new Cesium.BoundingRectangle(0, 0, 80, 40);

show : boolean

确定是否显示视图四原生 .
Default Value: true

Methods

destroy()

Destroys the WebGL resources held by this object. Destroying an object allows for deterministic 释放 WebGL 资源,而不是依赖垃圾收集器来摧毁此对象.

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.
Example:
quad = quad && quad.destroy();
See:

isDestroyed()boolean

如果此对象被销毁, 返回真实; 否则, 错误 .

If this object was destroyed, it should not be used; calling any function other than isDestroyed will result in a DeveloperError exception.
Returns:
如果此天体被销毁, 则属真; 否则, 属假 .
See:

update()

Called when Viewer or CesiumWidget render the scene to 获得使这个原始化所需的绘图命令.

不要直接调用此函数 。 记录下来的只是 列出场景拍摄时可能宣传的例外情况:

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