# StreamModel

Accessors

- `currentFrameIndex`
- `frameCount`
- `name`
- `publishTag`
- `streamId`
- `streamRevision`

Methods

- `addConfigReadyCallback`
- `addConfigReadyCallbackForRevision`
- `addStreamingCompleteCallback`
- `addStreamingCompleteCallbackForRevision`
- `detachFromSession`
- `getBoundingBox`
- `getDefaultCameraConfig`
- `isStreamingActive`
- `isStreamingComplete`
- `pollForStreamConfig_async`
- `rayIntersect`
- `removeAllConfigReadyCallbacks`
- `removeAllStreamingCompleteCallbacks`
- `setGuidingCamera`
- `startStreaming_async`
- `stopStreaming`

## Accessors

`StreamModel.``currentFrameIndex`()

  Gets/sets the current frame index displayed in this model.

  Return type: | number

`StreamModel.``currentFrameIndex`(frameIndex)

  Arguments: | frameIndex (`number`) – None
  Return type: | void

`StreamModel.``frameCount`()

  Gets the number of frames in this model.

  Return type: | number

`StreamModel.``name`()

  Name of the model, primarily used for debugging.

  Return type: | string

`StreamModel.``name`(name)

  Arguments: | name (`string`) – None

  Name of the model.

  Mainly used for debugging.

  Return type: | void

`StreamModel.``publishTag`()

  The publishTag associated with the current stream config or null if no publishTag was set.

  Return type: | string

`StreamModel.``streamId`()

  The stream id of the stream being consumed by this model

  Return type: | string

`StreamModel.``streamRevision`()

  The current streamRevision of the stream being consumed by this model, or undefined if no stream config has been received yet.

  Return type: | number

## Methods

### addConfigReadyCallback

`StreamModel.``addConfigReadyCallback`(callback)

  Arguments: | callback (`ConfigReadyCallback`) – None
  Return type: | void

`StreamModel.``addConfigReadyCallback`(options, callback)

  Arguments: | options (`CallbackOptions`) – None callback (`ConfigReadyCallback`) – None
  Return type: | void

### addConfigReadyCallbackForRevision

`StreamModel.``addConfigReadyCallbackForRevision`(streamRevision, callback)

  Arguments: | streamRevision (`number`) – None callback (`RevisionBoundConfigReadyCallback`) – None
  Return type: | void

### addStreamingCompleteCallback

`StreamModel.``addStreamingCompleteCallback`(callback)

  Arguments: | callback (`StreamingCompleteCallback`) – None
  Return type: | void

`StreamModel.``addStreamingCompleteCallback`(options, callback)

  Arguments: | options (`CallbackOptions`) – None callback (`StreamingCompleteCallback`) – None
  Return type: | void

### addStreamingCompleteCallbackForRevision

`StreamModel.``addStreamingCompleteCallbackForRevision`(streamRevision, callback)

  Arguments: | streamRevision (`number`) – None callback (`RevisionBoundStreamingCompleteCallback`) – None
  Return type: | void

### detachFromSession

`StreamModel.``detachFromSession`()

  Detaches the model from its owner server session. This will permanently stop streaming of the model.

  Return type: | void

### getBoundingBox

`StreamModel.``getBoundingBox`([_options])

  Arguments: | _options (`ModelBoundingBoxOptions`) – optional None

  Returns the `BoundingBox` (in world coordinates) of the current contents of the model

  Note that this method does not support any `ModelBoundingBoxOptions`

  Return type: | BoundingBox

### getDefaultCameraConfig

`StreamModel.``getDefaultCameraConfig`()

  Returns default camera configuration, which is always null for this model.

  Return type: | unknown

### isStreamingActive

`StreamModel.``isStreamingActive`()

  Checks whether the streaming to the model is enabled or not.

  Return type: | boolean

### isStreamingComplete

`StreamModel.``isStreamingComplete`()

  Return type: | boolean

### pollForStreamConfig_async

`StreamModel.``pollForStreamConfig_async`()

  Polls for new data for this model.

  Return type: | Promise <void>

### rayIntersect

`StreamModel.``rayIntersect`(ray)

  Arguments: | ray (`Ray`) – None

  Performs picking on the model using the current frame. Returns null when nothing is hit.

  Return type: | HitItem

### removeAllConfigReadyCallbacks

`StreamModel.``removeAllConfigReadyCallbacks`()

  Return type: | void

### removeAllStreamingCompleteCallbacks

`StreamModel.``removeAllStreamingCompleteCallbacks`()

  Return type: | void

### setGuidingCamera

`StreamModel.``setGuidingCamera`(camera)

  Arguments: | camera (`Camera`) – None

  Sets the guiding camera by watching its changes and using it to guide the streaming.

  Return type: | void

### startStreaming_async

`StreamModel.``startStreaming_async`()

  Starts the streaming from the VizStreamer Service.

  Return type: | Promise <boolean>

### stopStreaming

`StreamModel.``stopStreaming`()

  Stops the streaming from the VizStreamer Service.

  Return type: | void

Conversation saved
HOOPSY BETA

### Hello! I'm HOOPSY

Your Docs generative AI assistant. Ask me anything about HOOPS Envision for Web or choose a sample question below to start a conversation:

What is HOOPS Envision for Web?
What are the latest release notes for HOOPS Envision for Web?
How do I start evaluating HOOPS Envision for Web?
How do I write my first sample application?
How can I get assistance?

HOOPSY may store conversations according to OpenAI's policy. Responses may not always be accurate.

HOOPSY is thinking...