Tagged: puzzle clone copy object append
- This topic has 15 replies, 3 voices, and was last updated 1 year, 1 month ago by
kdv.
-
AuthorPosts
-
2022-08-03 at 12:28 pm #54607
netcraft
CustomerHi i`m new to verge3d its a great software love it.
I want to be ablle to add object to scene using ,,append puzzle,, by dragin html button and remove object (small ,,x,, mark on each object) by ,,unload scene puzzle ,, ( drag and drop, same as blender asset menager ) While draggin object it chaneges shape to bounding box , when relase it object apear in intended location with all materials
And most important of all i want to repeat same action sevreal times dragin same htm button to scene and having many copies of the same object all with same blender – limit location constraints and verge – drag move puzzle + change rottation puzzle, is it possible ? do i need any plugins for that
sorry for my poor English TT
i know nothing abut coding and i`m total beginer so if u can help me with this, pleas try to write as simple as it can.
Verge3d is so cool :D2022-08-03 at 2:31 pm #54613kdv
Participantshow your app. link or .zip
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.
2022-08-03 at 3:49 pm #54615netcraft
CustomerHi, thx for your reply as i said im new to verge3d.
left clikck – drag move
right clikck – rotate
chair, counter have location constraints (i want each new copy to have same constraints as first appended object)red cube does triggers ,,append puzzle,, black cube does triggers ,,unload scene,, (is there any better way to reduce data usage ?) in finall version i want to have objest being added to scen by draging objects from the lists (same like blender new asset menager) and droping them on floor.
But now i stuck on trying to be able add another chair with same proporties, all objects will have small x mark (black cube) that will unload them one by one from the scen2022-08-04 at 1:05 am #54620kdv
ParticipantFirst, do not load camera and light objects in the
append scene
puzzle. Disable it.The main problem is that you can choose objects only by their names but the names of chairs are the same. So, the engine looks for the specified name and finds one object that was added first )))
You should rename the appended scene first. Use the
alias name
option in theappend scene
puzzle and a variable, that will change this alias name after every appending. That will give you the possibility to remove the appended scenes separatly. Then you should change names of added objects after scene appending. That requires some scripting…Is that what you wanted?
https://v3d.net/9upPuzzles 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.
2022-08-04 at 1:57 am #54621netcraft
CustomerMan this is exactly what i was looking for you are just absolute genius :)
it’s only few day while i’m using verge3d so i do not understand variables yet, and scripting is like sorcery to me.
Could u share printscreens of puzzles how did u do it? i ll be rlly thankfull.2022-08-04 at 8:47 am #54624kdv
ParticipantRemove all trash objects
The initial settings
Append a new scene and register the drag action for all added objects
Manipulate all added objects
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.
2022-08-04 at 6:20 pm #54641netcraft
CustomerThank you, this is amazing. I am very grateful to you, and i admire your knowledge.
Could you please give me your email address so i could ask some more in future, if necessary ?2022-08-04 at 7:13 pm #54642kdv
Participantgive me your email address
kdv[at]izh[dot]com
One more thing: the last two blocks of puzzles must be located after all other
when clicked
blocks. Otherwise dragging of the added objects will not work ))) Place otherwhen clicked
listeners on the right and higher of these two blocks like on the attached screenshot. And you should add all objects that are supposed to be moved into theallAddedObjects
list.Attachments:
You must be logged in to view attached files.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.
2022-08-06 at 11:44 am #54671netcraft
CustomerHi, I ran into another problem.
all your puzzle setup works just fine (sincerely grateful i ‘ am)
but ultimately there will be added about 50 external objectsso do i need to create all completly new set of variables for each new object ?
and how does variables creating works
for example :
getObjectbyNamehow to know what name combination to use ?
https://v3d.net/9hm2022-08-06 at 1:28 pm #54675kdv
Participantso do i need to create all completly new set of variables for each new object ?
Nope. just use what you have, with some changes.
First, change the initial settings
remove this
and change this
then change thewhen clicked
puzzle
and then change one puzzle in theappend scene
puzzle
That’s all. You can just change scene names to append other objectsand how does variables creating works
just choose Variables in puzzles and press
Create variable
, type in any name you want, without spaces.getObjectByName
it’s not a variable, it’s an external function, that returns an object by its name. don’t change it.
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.
2022-08-06 at 3:55 pm #54688netcraft
Customerthank you, i am really grateful
for people like You, who are keen to share their knowledge.
2022-08-08 at 4:50 pm #54708netcraft
Customerhi, how to replace some
of the above puzzle setup to be able append using html buttons ?
I want to build GUI using webflow
and as final goal
each button initiate dropdown menu with object selections (furnitures)
and keep same actions : move ,rotate, remove functions as they are right now2022-08-08 at 5:15 pm #54709kdv
Participanteach button initiate dropdown menu with object selections (furnitures)
Let’s suppose this menu contains some pictures and these pictures have names that are similar to .gltf scenes. hutten chair.jpg corresponds to hutten chair.gltf. Right?
Then just grab some picture from the menu and drop it into the scene. And use thedrop file
puzzle to get the name of a scene that must be loaded
In any case, whatever method you choose (clicking an html element or dropping a file/picture), the main action is to detect and assign the name of the scene that you want to append.
p.s. You’d better rename all your .gltf scenes replacing spaces with this “_” simbol…
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.
2022-08-10 at 9:52 am #54721netcraft
CustomerCant make it work :(, i sent u mesage on ur email.
2023-08-02 at 1:37 pm #65737David Duperron
CustomerHi @kdv77kdv!
As suggested I try to dig a little bit more bu myself, but I’m struggling to find where is the “getOnjectByName” procedure is defined, and how to call it using the puzzles I have… This procedure is not available in the left panel, and I see no mean to type it manually… I probably missed something there…
Any suggestion/help?And @netcraft, did you manage to make it work finally? Any feedback about this or link to your result?
Regards
David
-
This reply was modified 1 year, 1 month ago by
David Duperron.
-
This reply was modified 1 year, 1 month ago by
-
AuthorPosts
- You must be logged in to reply to this topic.