Interface Facet

A facet is an adapter between a domain concept and a uniform value parameter in a WebGL shader program. An object implementing the Facet interface is capable of setting uniform values on a FacetVisitor (which is usually implemented by a Material).

interface Facet {
    addRef?(): number;
    release?(): number;
    setUniforms(visitor: FacetVisitor): void;
}

Hierarchy (view full)

Implemented by

Methods

  • Increments the reference count of an Shareable instance.

    Returns number

    The new reference count. This value is intended to be used only for testing purposes.

  • Decrements the reference count of an Shareable instance.

    Returns number

    The new reference count. This value is intended to be used only for testing purposes.

  • Sets one of more uniform values on the FacetVisitor.

    Parameters

    • visitor: FacetVisitor

      A visitor to the Facet, usually a Material implementation.

    Returns void