How the Example Works#

Startup Logic#

  1. When USD Viewer (the Kit application) starts, it is ready to stream itself and await requests from a client.

  2. As the web client (the web viewer sample) starts, it connects to the app and presents the stream.

  3. The web client then requests USD Viewer to load an asset.

  4. USD Viewer notifies the web client when the asset is loaded.

  5. The web client requests the top level USD prims in the USD stage.

  6. USD Viewer responds with a list that the web client presents in its UI.

Session Logic#

Once the startup process is complete, USD Viewer and the web client are idly awaiting user interaction.

When a user selects a USD Prim in the web client list, the web client requests the app to make the selection in the stage. In the same way, when a user selects something in the viewport, USD Viewer requests the Web Client to update the selection in its list.

Also, as a user interacts with the web client listing, the web client will ask USD Viewer for more members of the USD stage in order to reflect the USD prim structure in the UI.