Home › Forums › Programming › GLTF from local host to server
- This topic has 5 replies, 3 voices, and was last updated 3 years, 9 months ago by
hoanghaxd.
-
AuthorPosts
-
2021-01-15 at 10:06 am #37408
rzr87
ParticipantHi there.
This might be answered before but I have an app similar to the Ring demo.
it only launches the GLTF file using logic and its perfect for what I need.
So my question it how so I get this link to work on my server in URL format instead of Localhost format?
http://localhost:8668/player/player.html?load=../applications/ring/ring.gltf&logic=../applications/ring/visual_logic.js
So I can iframe it or have it open on a new tab
2021-01-15 at 11:05 am #37411
Yuri KovelenovStaffyou must first upload the verge3d_package/player folder to your server, to the directory where your web server stores static files. Then you’ll be able to access it using URL
https://yourdomain/player/player.html
plus the relative path to your glTF file as URL parameter.
2021-01-18 at 8:50 am #37452rzr87
ParticipantThanks.
This works. I am getting “You don’t have permission to access this resource” Forbidden error but that must be on the server side.
Another problem that popped up is that my assign Texture puzzle isnt working.
If i open the app with the normal HTML file the replace texture puzzle works but when I open it with link in the above post it doesnt work. the material puzzle works fine in both cases but the textures do not seem to register.I built the app in version 3.3.1 and updated to 3.5 but this didnt resolve it.
any idea on how to fix it?2021-01-18 at 9:22 am #37453
Yuri KovelenovStaffThis is a limitation of this way to deploy Verge3D apps. The puzzle replace texture (also load/append scene, sounds, videos) assumes that the specified path is relative to the html file. As a result, when using the player app rather than application html, the path appears to be wrong.
You can try to change all your relative paths to absolute paths just before uploading to your web server.2021-01-18 at 9:41 am #37458rzr87
ParticipantThanks Yuri, this makes perfect sense. Thanks for all your help
2022-01-26 at 5:15 am #48837hoanghaxd
CustomerDear Yuri.
Can you please explain to me why the files do not show?
https://digitrans.vn/player/player.html?load=../applications/nhan/ring.gltf&logic=../applications/nhan/visual_logic.js
http://localhost:8668/player/player.html?load=../applications/nhan/ring.gltf&logic=../applications/nhan/visual_logic.js
I created and uploaded player folder and upload gltf files follow your guides.Thank you.
-
AuthorPosts
- You must be logged in to reply to this topic.
