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.

Copy / Clone objects that share puzzle attributes is it possible

Home Forums Puzzles Copy / Clone objects that share puzzle attributes is it possible

Viewing 15 posts - 1 through 15 (of 16 total)
  • Author
    Posts
  • #54607
    netcraft
    Customer

    Hi 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 :D

    #54613
    kdv
    Participant

    show 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.

    #54615
    netcraft
    Customer

    Hi, thx for your reply as i said im new to verge3d.

    https://v3d.net/9hm

    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 scen

    #54620
    kdv
    Participant

    First, 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 the append 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/9up

    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.

    #54621
    netcraft
    Customer

    Man this is exactly what i was looking for you are just absolute genius :) :yahoo: :yahoo:
    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.

    #54624
    kdv
    Participant

    Remove all trash objects

    The initial settings

    Append a new scene and register the drag action for all added objects

    Manipulate all added objects

    https://v3d.net/9up

    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.

    #54641
    netcraft
    Customer

    Thank you, this is amazing. I am very grateful to you, and i admire your knowledge. :good: :good: :good:
    Could you please give me your email address so i could ask some more in future, if necessary ?

    #54642
    kdv
    Participant

    give 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 other when 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 the allAddedObjects 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.

    #54671
    netcraft
    Customer

    Hi, 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 objects

    so do i need to create all completly new set of variables for each new object ?

    and how does variables creating works
    for example :
    getObjectbyName

    how to know what name combination to use ?
    https://v3d.net/9hm

    #54675
    kdv
    Participant

    so 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 the when clicked puzzle

    and then change one puzzle in the append scene puzzle

    That’s all. You can just change scene names to append other objects

    and 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.

    #54688
    netcraft
    Customer

    thank you, i am really grateful
    for people like You, who are keen to share their knowledge.
    :heart:

    #54708
    netcraft
    Customer

    hi, 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 now

    https://v3d.net/a13

    #54709
    kdv
    Participant

    each 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 the drop 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.

    #54721
    netcraft
    Customer

    Cant make it work :(, i sent u mesage on ur email.

    #65737
    David Duperron
    Customer

    Hi @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

Viewing 15 posts - 1 through 15 (of 16 total)
  • You must be logged in to reply to this topic.