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.

External html triggering animation

Home Forums Puzzles External html triggering animation

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #54622
    Aubrey
    Customer

    Hi, I hope someone can help me with a current issue.

    I have an external menu dynamically generated with many items which interacts with a 3d map.

    When someone clicks an item that has and id that matches a name of an object in the scene the camera moves over to that object, or when i rollover the menu item the object highlights.

    I have no issue with accomplishing this manually with puzzles separately for each object/menu item, but what I would like to have it automatically maybe with loops?

    Essentially it should trigger what I already have when someone rollovers and click on the actual object in the scene.

    I hope I managed to explain this succinctly enough, thanks for any help at all.

    #54636
    Crunch
    Customer

    Iterations are a bit tricky at first, but will save you buttloads of time.

    Here is demo of what I think you described
    https://v3d.net/9ul

    Notes
    *come up with naming (eg name + ###) convention for your elements/3d objects to make cycling through them easy.

    *I had put values in for the html buttons out of habit but aren’t required in this setup. HTML values are useful though as they can be picked up by with the onclick – ‘get event property: target.value’ puzzle. Just remember, DIVs don’t have the value property
    https://www.w3schools.com/tags/att_value.asp

    Attachments:
    You must be logged in to view attached files.
    #54640
    visualizer
    Participant

    Hey Crunch
    Is there any tutorial for such simple tricky things? Would be good for Zero programmers like us…lol

    #54646
    Aubrey
    Customer

    Thanks Crunch, I’ll have to mull over that and see if can parse it to what I would need. The menu is generated in wordpress but i’m sorting it out through php so would be no issues adding parameters. The ids are not necessarily sequential. The ids of the buttons match the names of the objects though.

    Will let you know how I go and if you have anything further to add that would be great.

    #54726
    Crunch
    Customer

    @ Aubrey, good luck, run into any problems let me know


    @visualizer
    .. sorry, most of it is stuck in my head.. what I try maintain though is a powerpoint (or word file) where I paste some of the tricks I learn from others or trick i came up with myself… and make notes… My brain seens to be out of disc space so it always purges older material out.. so having the diary, is a nice thing to quickly find a refresher.

    The other resource is this community page.. lots of tricks shared here, gl!

    #54786
    Aubrey
    Customer

    Hi Crunch,
    Still struggling with this a little. I see where your coming at with your example and that would work better if the numbering of the items was more structured but let me explain what i’m after with this a bit more.

    I have external html with a menu of 68 items and the items have an id that match the objects in the verge scene. These names are not necessary numerically sequential and have different letters in the beginning. In the verge scene it is set up so you click on the object that moves the camera to that object and launches a sidebar element with details in the parent html of this site (with help from kdv77kdv). The camera information for this step is brought by custom parameters from blender to verge3d so I do not have to repeat the same puzzles for all 68 items.

    What I would like to have is a listener to find which html element id from my parent web page that the user is rolling over or clicking and hilighting and/or moving the camera to that object (with the same id) via the coordinates that is carried over from the custom parameters of the blender file.

    Is this doable or should i just do a mouseover/mouseout/click for each of the 68 elements?

    Thank you so much for any input.

    #54915
    Aubrey
    Customer

    I finally worked it out from your example Crunch. Thank you once again.
    I was able to take the json from the pages of the custom post type on the site I made to pull the store id in as custom field to build the list in verge3d then use the listener.
    This will save me heaps of time down the road so I dont have to build the puzzles for each menu item.
    I have attached a screen shot if anyone else has this issue.

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