All Downloads are FREE. Search and download functionalities are using the official Maven repository.

main.cesium.ViewportQuad.kt Maven / Gradle / Ivy

The newest version!
// Automatically generated - do not modify!

@file:JsModule("cesium")

@file:Suppress(
    "EXTERNAL_CLASS_CONSTRUCTOR_PROPERTY_PARAMETER",
)

package cesium

/**
 * A viewport aligned quad.
 * ```
 * const viewportQuad = new ViewportQuad(new BoundingRectangle(0, 0, 80, 40));
 * viewportQuad.material.uniforms.color = new Color(1.0, 0.0, 0.0, 1.0);
 * ```
 * @see Online Documentation
 *
 * @constructor
 * @property [rectangle] The [BoundingRectangle] defining the quad's position within the viewport.
 * @property [material] The [Material] defining the surface appearance of the viewport quad.
 * @see Online Documentation
 */
external class ViewportQuad(
    var rectangle: BoundingRectangle = definedExternally,
    var material: Material = definedExternally,
) {
    /**
     * Determines if the viewport quad primitive will be shown.
     * @see Online Documentation
     */
    var show: Boolean

    /**
     * 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:
     * @see Online Documentation
     */
    fun update()

    /**
     * Returns true if this object was destroyed; otherwise, false.
     *
     * If this object was destroyed, it should not be used; calling any function other than
     * `isDestroyed` will result in a [DeveloperError] exception.
     * @return True if this object was destroyed; otherwise, false.
     * @see Online Documentation
     */
    fun isDestroyed(): Boolean

    /**
     * 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
     * `isDestroyed` will result in a [DeveloperError] exception.  Therefore,
     * assign the return value (`undefined`) to the object as done in the example.
     * ```
     * quad = quad && quad.destroy();
     * ```
     * @see Online Documentation
     */
    fun destroy()
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy