This is outdated info. Proper documentation will come in time.
Any stream that’s sent through speckle can be viewed online.
That’s quite simple. Just head over to https://app.speckle.works/viewer/ and click the red plus button in the corner.
This is a companion discussion topic for the original entry at https://speckle.works/doc/onlineviewer/
Hi, I have some issues with ModelVeiwer. There is no Veiws, Versions and Multistream preview.
,
How can I fix it?
Hey Mykola! fixing is usually via a pull request with a lotta code. The viewer is outdated, though @mswaidan is working on updating it now.
I think he just merged his latest changes - so maybe if you do a git pull master in the viewer you might be better off! To add more streams, just add more stream ids to the url, separated by commas: https://s003.speckle.works/view/?ryuFyiHuz,rkf6JoHuf
and massive kudos for installing your own server and deploying stuff!
How to setup the model viewer running on a separate nodejs server on another machine than the speckle server:
A. use the ?serverUrl=http://YOURSERVER:3000 as a query for the running model viewer.
B. use a config file for the serverUrl as follows:
-
edit the speckleConfig.js and config.js and add the following line inside the var SpkAppConfig = {
serverUrl: ‘http://YOURSERVER:3000’,
-
edit the main.js file and change the ‘if ( window.location.href.includes( ‘?’ ) ) {’ with:
if ( window.location.href.includes( ‘?’ ) ) {
let query = qp.toObject( window.location.href.split( ‘?’ )[ 1 ] )
if ( query.server )
Store.state.server = query.server + ‘/api/v1’
else
if (window.SpkAppConfig.serverUrl != null)
Store.state.server = window.SpkAppConfig.serverUrl + ‘/api/v1’
else
Store.state.server = window.location.origin + ‘/api/v1’
if( query.streams )
Store.state.initStreams = query.streams.split(’,’)
} else {
if (window.SpkAppConfig.serverUrl != null)
Store.state.server = window.SpkAppConfig.serverUrl + ‘/api/v1’
else
Store.state.server = window.location.origin + ‘/api/v1’
}