- This topic has 6 replies, 3 voices, and was last updated 2 years, 4 months ago by Aubrey.
-
AuthorPosts
-
2022-08-04 at 7:18 am #54622AubreyCustomer
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.
2022-08-04 at 5:14 pm #54636CrunchCustomerIterations 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/9ulNotes
*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.aspAttachments:
You must be logged in to view attached files.2022-08-04 at 5:55 pm #54640visualizerCustomerHey Crunch
Is there any tutorial for such simple tricky things? Would be good for Zero programmers like us…lol2022-08-05 at 9:24 am #54646AubreyCustomerThanks 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.
2022-08-10 at 4:35 pm #54726CrunchCustomer@ 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!
2022-08-12 at 7:10 am #54786AubreyCustomerHi 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.
2022-08-16 at 9:44 am #54915AubreyCustomerI 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. -
AuthorPosts
- You must be logged in to reply to this topic.