- This topic has 6 replies, 3 voices, and was last updated 1 year, 3 months ago by calbrecht.
-
AuthorPosts
-
2023-08-07 at 4:17 pm #65850calbrechtCustomer
Hi,
I’m trying to append/unload GLTFs using the same input field type pulldown. The behavior would be that when I make a selection in my pulldown it appends the related gltf, then if I select a different option in my pulldown it then unloads the current option and appends the new one to my parent scene.
If I look into the example you have Load Unload it uses one button to append and another to unload.
Do you have a puzzle example where you use one pulldown to append/unload gltfs?Thanks,
Cris2023-08-07 at 8:27 pm #65855mashud008CustomerPlease check the Scenes panel, and here is the load/ unload puzzle. Follow the puzzle scene example and load/unload the demo file.
2023-08-07 at 11:15 pm #65860kdvParticipantI’m trying to append/unload GLTFs using the same input field type pulldown
Puzzles and JS coding. 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 the meaning at all.
2023-08-08 at 2:50 pm #65889mashud008Customeron an event “click” and add the element “button_add”
2023-08-10 at 3:42 pm #65967calbrechtCustomerThanks for the feedback, but I should probably be a little more clear.
See the puzzle I have (attached), this works for looping through my pulldown options and appending the gltf. Now, what I don’t know is how to unload the current gltf and append the new one using the very same pulldown.As you can see in the screenshot it loops through and checks if the gltf is loaded or not. I have the flag ‘false’ or ‘true’ and it is conditionally set.
What I’m looking for is to if not in the scene load the gltf, then unload when another one was selected.
I hope this is a little more comprehensive now!
Thanks for the help.
CrisAttachments:
You must be logged in to view attached files.2023-08-10 at 4:18 pm #65969kdvParticipantAbsolutely senseless and useless condition.
With the empty text field it always returns “true” (the main scene
app.scene
is always loaded). “Else” will never be perfomed.Within one condition you are trying either append or load (will never be loaded) the same .gltf file. So it’s really hard to understand what you reaaly want do do. Do you want it to be appended to the current main scene or do you want it to be the main scene? For the first case puzzles are above, in the second case there is no need to unload the current scene (it will be replaced automatically).
Puzzles and JS coding. 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 the meaning at all.
2023-08-10 at 5:07 pm #65971calbrechtCustomerThank you Kdv, I got it!
I want to append GLTFs to main main scene, not to replace everything.
I will make few adjustments and test, will let you know if I’m good or still need some guidance.
Thanks again -
AuthorPosts
- You must be logged in to reply to this topic.