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.

swatchyb

Forum Replies Created

Viewing 5 posts - 46 through 50 (of 50 total)
  • Author
    Posts
  • swatchyb
    Customer

    Hi Ivan and Yuri,
    This was working well, but unfortunately the compexity and diversity of items I need to configure made setting session vars (20-30 simultaneous) and putting them in text inputs, clumsy. To really make things dynamic, I am trying to use a query/table of fields in the parent, that dynamically change the id, name and value on loading, with v3d listening for those id’s. On the DOM/html side, this seems to be working.

    for example:
    id name value
    inp_mat1 mat1 ../../assets/media/MAT/CreamBasic.jpg
    inp_mat2 mat2 ../../assets/media/MAT/StoneLace.jpg
    inp_mat3 mat3 ../../assets/media/MAT/TanLace.jpg
    inp_mat4 mat4 ../../assets/media/MAT/BlueLace.jpg

    The problem is that now we are back to v3d only reacting when a space is manually added to a field after load or change despite using the dispatchEvent that you offered and that worked when everything was static (names and id’s).

    <input dmx-bind:id=”Dyn_MAT_id”
    dmx-bind:name=”Dyn_MAT_name”
    type=”text” class=”form-control”
    dmx-bind:value=”MAT_repeat_url”
    onupdated=”Dyn_MAT_id.dispatchEvent(new Event(‘input’));”>

    My coding “coach” gave a try adding a script to help, and diagnose, but with no luck.
    <script>
    function updateInput(elString) {
    console.log(elString);
    var el = document.getElementById(elString);
    console.log(el);
    el.dispatchEvent(new Event(‘input’));
    }
    </script>

    I thought it might be a sequence of events thing – that the html had to load before v3d, so that the id’s would be in place, but it also does not see them in an unload/load to replace (gltf’s) scenario, so not sure that is it.

    As well, sometimes the dynamically/externally referenced gftl’s load on initial launch, and other times they do not. Attached is an example of a console message if that helps.

    Any suggestions very appreciated. /sb

    swatchyb
    Customer

    MAGIC!
    thank you Ivan – this is so cool. that little bit of js opened the gate to the rest of the exciting project.
    thanks again!

    swatchyb
    Customer

    Hi again. continuing on the above…
    SO close to this working beautifully, but have one snag.
    In the parent doc, when a fabric/ material is selected it sets a session variable which in turn populates (dynamic attr) an input (mat1) with the url of the new texture. However, Verge does not respond to that input unless I manually place the cursor in the input and add a space (which seems) to wake up the listener in a way that just programmatically setting the value does not.
    Any suggestions on how to give it a kick?
    Thanks very much again!

    (ps had put the input in a form and submit, which works, but of course refreshes iframe too :-/
    also, everything works on manual entry – the console shows it is listening as I type a value)

    swatchyb
    Customer

    never mind, think I got it using with – get attr value from elem “inp_mat1” in parent.
    I am sure there will be other questions…

    swatchyb
    Customer

    and so it does…great, thanks Yuri!

Viewing 5 posts - 46 through 50 (of 50 total)