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.

Pandern

Forum Replies Created

Viewing 10 posts - 31 through 40 (of 40 total)
  • Author
    Posts
  • in reply to: Show HTML element at click #59378
    Pandern
    Customer

    Just for fun, as I was already talking to chatGPT, I asked it your question, and I am amazed how helpful this AI tool will be. Not to discard the awesome help that kdv77kdv offer here on the forums.

    Can you explain to me (like I’m five):
    How do I get a div element to show up at click on an 3D element in verge3d?
    (being hidden at init, then shown at click)

    Please describe all steps – this is the only thing holding me back from building a website with Verge3d.

    Sure! Here’s how you can make a div element show up when you click on a 3D element in Verge3D:

    First, you will need to create a div element in your HTML code. You can do this by using the <div> tag. Make sure to give your div element an id so you can reference it in your JavaScript code.

    Next, you will need to create a 3D element in your Verge3D scene. You can do this using the create_object function in your JavaScript code.

    Once you have both the div element and the 3D element, you will need to use JavaScript to hide the div element when the page loads. You can do this by setting the display property of the div element to none.

    Now, you will need to add an event listener to the 3D element that listens for a “click” event. When the 3D element is clicked, the event listener will be triggered and will run a function that shows the div element. You can do this by setting the display property of the div element to block.

    Finally, you will need to make sure that the div element is positioned properly on the page so that it is visible when it is shown. You can do this using the position property of the div element.

    I hope this helps! Let me know if you have any questions.

    ———————
    Can you give me an example?

    Certainly! Here is an example of how you can make a div element show up when you click on a 3D element in Verge3D:

    <!-- HTML code -->
    <div id="myDiv">This is my div element!</div>
    
    <!-- JavaScript code -->
    // Create a 3D element
    var my3DElement = create_object("box");
    
    // Hide the div element when the page loads
    document.getElementById("myDiv").style.display = "none";
    
    // Add an event listener to the 3D element that listens for a "click" event
    my3DElement.addEventListener("click", function() {
      // Show the div element when the 3D element is clicked
      document.getElementById("myDiv").style.display = "block";
    });

    I hope this helps! Let me know if you have any questions.

    ————
    How do i do this with puzzles in verge3d

    To show a div element when you click on a 3D element using puzzles in Verge3D, you can follow these steps:

    First, you will need to create a div element in your HTML code. You can do this by using the <div> tag. Make sure to give your div element an id so you can reference it in your JavaScript code.

    Next, you will need to create a 3D element in your Verge3D scene. You can do this using the create_object function in your JavaScript code.

    In the Verge3D puzzle editor, create a “Click” puzzle and connect it to the 3D element you created in step 2.

    In the puzzle editor, create a “Set Property” puzzle and connect it to the “Click” puzzle. Set the property you want to change (in this case, the display property of the div element) and the value you want to set it to (in this case, block).

    In the puzzle editor, create a “Run JS” puzzle and connect it to the “Click” puzzle. In the JavaScript code for this puzzle, use the document.getElementById function to get a reference to the div element, and set its display property to none. This will hide the div element when the page loads.

    Finally, you will need to make sure that the div element is positioned properly on the page so that it is visible when it is shown. You can do this using the position property of the div element.

    I hope this helps! Let me know if you have any questions.

    in reply to: Verge3D 4.2 pre3 available! #58535
    Pandern
    Customer

    Yes :wacko: I found out that I had installed 4.1.1 and not the preview. My fault :wacko:

    in reply to: Verge3D 4.2 pre3 available! #58455
    Pandern
    Customer

    The connector (slot-based) puzzle in the advanced menu is now missing. Will this be permanently gone?

    I have used it extensively in an app I’m developing, and have to remove them all now to get the puzzles inside them to work.

    in reply to: Real time 3D text in Verge 3D with source file #55022
    Pandern
    Customer

    I really like your tutorials. Keep up the good work :good:

    in reply to: Custom preloader help needed please! #49102
    Pandern
    Customer

    It works when you load the content of the iframe in main site in a new window:
    https://contempomobile.com/wp-content/uploads/verge3d/1020/1%20Caravan%20New.html

    So, it might be in the html code where you put the iframe. Others might see the problem, but i wanna just come with a friendly advise: do not include spaces in file name or URL’s, all those %20 is sure not helping you in any way

    PAN

    in reply to: Verge3D 3.7 for 3ds Max is out! #41708
    Pandern
    Customer

    Will there be an update to 3.7 for maya as well? I’m eager to try the new “get style” puzzle as it might be exactly what ive been missing for a project.

    in reply to: Puzzles button in app manager #37484
    Pandern
    Customer

    Thank you, Yuri :yahoo:

    in reply to: Vinyl wrap configurator – car #36195
    Pandern
    Customer

    https://cdn.soft8soft.com/AROAJSY2GOEHMOFUVPIOE:4dab95f1d5/applications/NGdigital_folievelger/index.html

    The demo/prototype is done. I’m quite pleased with it. Now the customer will design their own GUI.

    :yahoo:

    Pandern
    Customer

    Great job! I was wondering if specular color will be implemented in future releases? It is quite crucial for rendering objects with baked textures.

    in reply to: Vinyl wrap configurator – car #35432
    Pandern
    Customer

    Thats great, Yuri! Porting of the scooter demo would be very helpful.

    I realise that this section is for finished projects, not WIPs, so I’m gonna update this thread a couple of more times. I’ve played a bit more with the shading possibilities in maya and the gltf is updated with more variations.

    PAN

    new shaders

    Attachments:
    You must be logged in to view attached files.
Viewing 10 posts - 31 through 40 (of 40 total)