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.

Hey, about loading scenarios

Home Forums Puzzles Hey, about loading scenarios

Tagged: 

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #12685
    Citrus sinensis
    Participant

    How do I load a new scenario while preserving the original environment

    #12696

    Hi,

    You can load more JavaScript code in run time using this method:

    var script = document.createElement("script");
    script.src = url;  
    document.head.appendChild(script); 

    You can run this snippet with Puzzles as descibed here

    Took it from here.

    Chief 3D Verger | LinkedIn | Twitter

    #12699
    Citrus sinensis
    Participant

    Thank you for your reply
    It’s difficult for me. Maybe there will be a simpler way?
    For example, in the example given by you (load_unload), can I grab the surrounding environment and then give it to a new scene?

    #12700

    can I grab the surrounding environment and then give it to a new scene?

    yes you can export it to a separate glTF file and load with a new scene

    Chief 3D Verger | LinkedIn | Twitter

    #12701
    Citrus sinensis
    Participant

    Is there a way to read the color above the button and assign it to the object?

    #12763

    It is better to hard-code the color value and not retrieve it from an HTML element or an object. And yes, you can set the material color with Puzzles.
    https://www.soft8soft.com/docs/manual/en/puzzles/Materials.html

    Chief 3D Verger | LinkedIn | Twitter

    #12767
    Citrus sinensis
    Participant

    Thank you very much, I got the results I wanted from your suggestion. Although it is not simple

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