Coder Social home page Coder Social logo

Comments (4)

kovacsv avatar kovacsv commented on July 30, 2024

The sharing url is hard-coded in the code. You can make a fork and update this the way you need. You probably only need to modify this file: https://github.com/kovacsv/Online3DViewer/blob/master/source/website/sharingdialog.js

from online3dviewer.

jlpoolen avatar jlpoolen commented on July 30, 2024

I installed this super project on my server and find that if I want to share my model, it appears as if the model has to be processed through your domain: 3dviewer.net
...

Thank you.

[Edited: revised Steps 3 & 4 to include error message when attempting to share a locally loaded file.]

I should have indicated how I set up the server so others reading this Issue can duplicate:

  1. in directory /usr/local/src:
    git clone https://github.com/kovacsv/Online3DViewer.git
  2. in my Apache's htdocs directory, create a link to the project. The manner of accessing the project is critical:
/var/www/salemdata.us/htdocs # ln -s /usr/local/src/Online3DViewer/website 3dviewerB

Note: I linked to the top of the project, e.g. /usr/local/src/Online3DViewer, and then the URL to invoke the project correctly is my server + "3dviewer/website", e.g. https://salemdata.us/3dviewer/website/. I wanted to shorten the URL and remove a directory, so I tried to link directly to the directory "website" with the creation of the link "3dviewerB" that would be accessed with https://salemdata.us/3dviewerB/ and the unfortunate result was a corrupted page:

2024-04-06_12-07

So, it is necessary to point to the top of the project, and then include in the URL "website". At least for now. I'm still exploring this project and I am very impressed with what @kovacsv has created (one-time Patreon minimal donation forthcoming). I followed his suggestion, but rather than fork the project, I just copied what I had staged into a separate directory and changed my soft links. When I started to try and remove the "website" directory in the link, I ran into trouble and got the corrupted page above, so I thought I should share my efforts here so someone else trying to accomplish what I am does not encounter the same problem. I'm not familiar with Node, so what may be standard operating procedure for a developer using Node.js is something I have to grapple with.

from online3dviewer.

kovacsv avatar kovacsv commented on July 30, 2024

Please find the setup instructions in the developer documentation.

After the code modification you need to call npm run create_package. This will generate the entire package in the build folder and this is what you can publish on a web server.

from online3dviewer.

jlpoolen avatar jlpoolen commented on July 30, 2024

Please find the setup instructions in the developer documentation.

After the code modification you need to call npm run create_package. This will generate the entire package in the build folder and this is what you can publish on a web server.

Thank you.

Here's the replacement I made:

janus /usr/local/src/Online3DViewerJLP # date
Sun Apr  7 06:37:11 PM PDT 2024
janus /usr/local/src/Online3DViewerJLP # diff source/website/sharingdialog.js  /usr/local/src/Online3DViewer/source/website/sharingdialog.js 
46c46
<             return 'https://salemdata.us/3dviewer/#' + hashParameters;
---
>             return 'https://3dviewer.net/#' + hashParameters;
83c83
<             embeddingCode += ' src="https://salemdata.us/3dviewer/embed.html#' + hashParameters + '">';
---
>             embeddingCode += ' src="https://3dviewer.net/embed.html#' + hashParameters + '">';
janus /usr/local/src/Online3DViewerJLP # 

I ran npm run create_package and then I created this softlink that points to the correct directory:
ln -s /usr/local/src/Online3DViewerJLP/build/package/website /var/www/salemdata.us/htdocs/3dviewer

Also, in the "built" website directory, there is no ".htaccess" with redirects, so the ".htaccess" file I found under [PROJECT]./website/.htaccess appears to be a file used solely for your development/deployment.

Closing this ticket as I have a working solution that is easily created. Thank you, again.

from online3dviewer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.