Comments (4)
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.
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:
- in directory /usr/local/src:
git clone https://github.com/kovacsv/Online3DViewer.git
- 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:
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.
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.
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 thebuild
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)
- Use CDN for third-party libraries HOT 5
- Use CDN for web-ifc
- Loading FCStd model hangs without throwing an error HOT 2
- The page is not loading HOT 13
- load STEP : The model doesn't contain any meshes HOT 1
- Possible to change the SVG icon ? HOT 1
- Apple Vision Pro support
- How to add help button or add website plugin HOT 2
- stp:Failed to import model. The model doesn't contain any meshes. HOT 2
- Mesh edges display error HOT 3
- occt-import-js fetched each time from the CDN HOT 4
- Deployment issue HOT 1
- e.Clone not a function error
- Use perferred user color scheme if not cookie was found
- USDZ support
- too many ads on the website HOT 2
- How to use the point measurement in the JS library HOT 2
- Mesh Display
- 'Embedding Online 3D Viewer in an iframe is not supported' in the new version
- Objects are disappearing when we zoom in
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from online3dviewer.