Problem to show own model on three.js viewer

Hello !

I am playing with the new viewer API and now that I have tested some nice things with the provided streams, I would like to see if it is still working with our own models, which are on our own server. I am not sure how I should proceed. I am working on the provided codes on github (Alex/API2.0 branch), and I just changed the link for the streams to something looking like this :

const getStream = () => {
return ( “”) }

I also provided the authentification token, and changed some part of “UrlHelper.ts” file to match “projects” and “models” instead of “streams” and “commits” in the url. The url object returned seems to be the right one.

I am getting the following error : “Uncaught (in promise) Error: Unexpected object url format.”
As I am very new to the topic, I would like to know if I am missing to do something very basic to make it work ?

Thanks for you help.

Hi @i0np

I have a feeling the changes you made to URLHelper might not be 100% right. In order to test this theory, try to give it a public stream in the new url format,. like for example this one, take the output and paste it in your browser. If it’s correct it should take you straight to the stream.

Generally, back converting the URLs works like https://<server-address>/streams/<projectId>/branches/<modelId>, so if you modified URlHelper to just replace models with commits it wouldn’t give you correct results.


1 Like

Thanks a lot ! It seems to be working with the url you provided, and it was easier for me to understand what I needed to do, and what I was doing wrong.

However I still have issues with connection to our server. I don’t think I can access it with url containing “streams”. But I will now speak with our team about it, and I hope it will help.

In any case, thanks again for your answer, I’ll come back to you when I understand a bit more where the problem could be, if the problem persists.

1 Like