Home › Forums › General Questions › Can’t open specific model from external link
Tagged: external links, scene load
- This topic has 8 replies, 3 voices, and was last updated 2 years, 4 months ago by krazy4.
-
AuthorPosts
-
2022-07-21 at 7:56 am #54272krazy4Customer
Hi,
I am working on a configurator which is all done except a couple things:
1. I have create an interface where object can be loaded/unloaded or hidden/unhidden. Now I am linking a website to this interface but I want specific model to be loaded when user clicks respective links. e.g. if user clicks table on xyz.com, it will lead to the interface with table loaded and if user clicks chair on xyz.com, it will lead to the same interface but with chair loaded. The reason I want both in same website is that user can click next/previous button on the interface to change to table or chair. This leads to next question.
2. I understand we can use logics to get object from list but what if we always want to get the next object from the list depending on which object is loaded. e.g. if we have object number 2 loaded, I need object number 3 when we click next button.
Thanks in advance!
2022-07-21 at 8:43 pm #54289xeonCustomerI am not sure I completely understand but I will try to assist and maybe work through this a bit.
Assumptions
– You have created an interface on xyz.com
– you have GLTF models also stored on xyz.com
– you have a Verge3d app also on xyz.comfunctionality:
– on a page within xyz.com there are links to a “chair”, a “table”, etc.
– When a user clicks on these links you want to display the 3d “chair” or “table” based on what link was pressed.
– the verge3d app will not appear unless the user specifically requests the app via a link otherwise it is hidden?
– the application will reconfigure based on the link?If this is correct you can add a variable to the end of your href. Could be something like:
a href=”myapp.html & Key=chair”. There are many variations depending on how you want to implement but you can then read in this variable and then hide or show based on the input.In many scenarios, the application is on screen and the HTML links/buttons are just part of the application. Then you can use basic HTML on event puzzles to hide or show objects.
Regarding Lists. Once a list is created you can traverse the list using the “in list get #” puzzle. You can get the list length using “length of”. You can use “in list find first/last occurrence of item” and it will return a position number of the item you are currently at.
Example: Your list contains three items: chair, table, sofa
You would us the “length” puzzle and it would return a value of 3.
Keep in mind positions are 0 based, so chair is at position 0, table at position 1, and sofa at position 3.Since you know the value of the item in the list you would call “in list find first occurrence and you would get a value if the value in your list is “table” the puzzle would return a value of 1.
You could then increment this returned value of 1 or decrement the value to go backwards and use “in list get #” to return the text value of the either “chair” or “sofa” depending on whether you added or subtracted.Xeon
Route 66 Digital
Interactive Solutions - https://www.r66d.com
Tutorials - https://www.xeons3dlab.com2022-07-25 at 2:01 pm #54383krazy4CustomerThanks for the response, I will try this and get back if it works
2022-07-25 at 2:48 pm #54385kdvParticipantmaybe this will help
modify urls to specific models by adding thier names in the end of urls
.../index.html
–>.../index.html?table
, then read these names and append corresponding scenes.Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2022-07-26 at 7:50 am #54398krazy4Customerthanks @xeon had to experiment here and there around your suggestions but now it’s working fine. Thanks for this but the other thing is not very clear.
@kdv77kdv I tried your suggestion but it’s not working. Maybe I dint explain it well. So trying to explain again:I have a website where there are 20 different styles of table photos but it doesn’t have any puzzles, it’s a simple website. When we click any of the table, it takes us to the customizer.
Now I’m offering 20 types of table tops for each table which will be visible in customizer only.
I have one verge3d interface with all table tops in it and all tables are saved as separate gltf files.
What I want now is when user click suppose table 4, this verge 3d interface will open with table4.gltf loaded in it and when user clicks table 7, this verge 3d interface will open with table7.gltf loaded in it.
Also, index.html has preloader which leads to verge3d interface after loading.
I don’t know Java so lil specific instructions will be helpful :)
Thanks a lot!
2022-07-26 at 8:50 am #54401kdvParticipantWhat I want now is when user click suppose table 4, this verge 3d interface will open with table4.gltf loaded in it and when user clicks table 7, this verge 3d interface will open with table7.gltf loaded in it
Well, that’s exactly what was offered above )))
…/Test.html – appends nothing
…/Test.html?cube – appends cube.gltf
…/Test.html?farmer – appends farmer.gltfShow you links that lead to a different tables…
Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2022-07-26 at 9:02 am #544032022-07-26 at 9:21 am #54404kdvParticipantYou can use puzzles only to create logic, without scripting… You can use
#
instead of?
. The result will be the same.
Test.html is the default .html, created by the App manager. You can see it in the browser console…Also, index.html has preloader which leads to verge3d interface after loading.
If the loader and v3d interface urls are different then you should read the loader url, find .gltf name in it and append this name to the v3d interface url…
Puzzles and JS coding. Fast and expensive.
If you don’t see the meaning in something it primarily means that you just don’t see it but not the absence of the meaning at all.
2022-07-28 at 1:32 pm #54460 -
AuthorPosts
- You must be logged in to reply to this topic.