Appearance
KBE3D / KBCore / Cesium / ViewportQuad
类: ViewportQuad
A viewport aligned quad.
示例
ts
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);参数
The BoundingRectangle defining the quad's position within the viewport.
参数
The Material defining the surface appearance of the viewport quad.
属性
show
show:
boolean
Determines if the viewport quad primitive will be shown.
rectangle
rectangle:
BoundingRectangle
The BoundingRectangle defining the quad's position within the viewport.
示例
ts
viewportQuad.rectangle = new Cesium.BoundingRectangle(0, 0, 80, 40);material
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. <p> The default material is <code>Material.ColorType</code>. </p>
示例
ts
// 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);方法
update()
update():
void
Called when Viewer or CesiumWidget render the scene to get the draw commands needed to render this primitive. <p> Do not call this function directly. This is documented just to list the exceptions that may be propagated when the scene is rendered: </p>
返回
void
isDestroyed()
isDestroyed():
boolean
Returns true if this object was destroyed; otherwise, false. <br /><br /> If this object was destroyed, it should not be used; calling any function other than <code>isDestroyed</code> will result in a DeveloperError exception.
返回
boolean
True if this object was destroyed; otherwise, false.
destroy()
destroy():
void
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. <br /><br /> Once an object is destroyed, it should not be used; calling any function other than <code>isDestroyed</code> will result in a DeveloperError exception. Therefore, assign the return value (<code>undefined</code>) to the object as done in the example.
返回
void
示例
ts
quad = quad && quad.destroy();构造函数
构造函数
new ViewportQuad(
rectangle?:BoundingRectangle,material?:Material):ViewportQuad
参数
rectangle?
material?
返回
ViewportQuad
