Request

Response

    Version 8 preview
    This page documents a preview of the Viewer SDK v8. APIs and content can still change before the final release.

    Visibility States

    Hiding or de-emphasizing content is one of the most common viewer interactions: isolate a selected part, ghost everything else to preserve spatial context, or suppress irrelevant geometry entirely. The VisibilityState enum β€” Visible, Ghosted, Hidden β€” maps the same three-state model that the Viewer uses for its built-in isolate and ghost operations onto programmatically created instances, so your custom geometry behaves consistently with loaded content.

    The three states have distinct visual meanings. - Visible is the default β€” the instance is fully rendered with its assigned material - Ghosted renders the instance as a semi-transparent shape - Hidden removes the instance from the frame entirely, as if it did not exist

    This example creates a single blue box and cycles it through all three states, updating a visible label so the current state is always clear.

    To change the visibility state we pass a VisibilityState constant to InstanceCollection3D.setVisibilityState on the InstanceCollection3D.