StreamModel
Methods
addConfigReadyCallbackaddConfigReadyCallbackForRevisionaddStreamingCompleteCallbackaddStreamingCompleteCallbackForRevisiondetachFromSessiongetBoundingBoxgetDefaultCameraConfigisStreamingActiveisStreamingCompletepollForStreamConfig_asyncrayIntersectremoveAllConfigReadyCallbacksremoveAllStreamingCompleteCallbackssetGuidingCamerastartStreaming_asyncstopStreaming
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
- frameIndex (
-
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 - name (
-
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
- callback (
-
StreamModel.addConfigReadyCallback(options, callback) Arguments: - options (
CallbackOptions) – None - callback (
ConfigReadyCallback) – None
Return type: void
- options (
addConfigReadyCallbackForRevision
-
StreamModel.addConfigReadyCallbackForRevision(streamRevision, callback) Arguments: - streamRevision (
number) – None - callback (
RevisionBoundConfigReadyCallback) – None
Return type: void
- streamRevision (
addStreamingCompleteCallback
-
StreamModel.addStreamingCompleteCallback(callback) Arguments: - callback (
StreamingCompleteCallback) – None
Return type: void
- callback (
-
StreamModel.addStreamingCompleteCallback(options, callback) Arguments: - options (
CallbackOptions) – None - callback (
StreamingCompleteCallback) – None
Return type: void
- options (
addStreamingCompleteCallbackForRevision
-
StreamModel.addStreamingCompleteCallbackForRevision(streamRevision, callback) Arguments: - streamRevision (
number) – None - callback (
RevisionBoundStreamingCompleteCallback) – None
Return type: void
- streamRevision (
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 modelNote that this method does not support any
ModelBoundingBoxOptionsReturn type: BoundingBox - _options (
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
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 - ray (
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 - camera (