We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

Can’t open specific model from external link

Home Forums General Questions Can’t open specific model from external link

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #54272
    krazy4
    Customer

    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!

    #54289
    xeon
    Customer

    I 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.com

    functionality:
    – 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.com

    #54383
    krazy4
    Customer

    Thanks for the response, I will try this and get back if it works

    #54385
    kdv
    Participant

    maybe 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. 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 meaning at all.

    #54398
    krazy4
    Customer

    thanks @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!

    #54401
    kdv
    Participant

    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

    Well, that’s exactly what was offered above )))
    …/Test.html – appends nothing
    …/Test.html?cube – appends cube.gltf
    …/Test.html?farmer – appends farmer.gltf

    Show you links that lead to a different tables…

    Puzzles and JS. 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 meaning at all.

    #54403
    krazy4
    Customer

    @kdv77kdv can you give me this project folder? so I can see the puzzles and html?

    #54404
    kdv
    Participant

    You 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. 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 meaning at all.

    #54460
    krazy4
    Customer

    @kdv77kdv Thanks for the screenshot, it worked finally :)

Viewing 9 posts - 1 through 9 (of 9 total)
  • You must be logged in to reply to this topic.