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.

grimmy

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 25 total)
  • Author
    Posts
  • in reply to: My Verge 3D Experience #47759
    grimmy
    Customer

    Hi Thanks for your responses.

    Xeon: I’d hoped my forum posts were detailed enough to demonstrate the issues and I thought that adding a picture of the puzzle would demonstrate clearly what I was trying to do. Additionally I thought I’d also clearly highlighted what I’d already tried, I only come to the forums once I’ve exhausted most possibilities and yes, I have read the manual but this didn’t help with any of my issues.

    I still have no clue how to
    -do a loop with a delay
    -the hide issue not working (yes I tried all those things you mentioned as I said in my post)

    However, you have given me a clue about the single threaded nature could be affecting the annotations (there are only 5 annotations)..so maybe a slightly delay when I create the annotations might fix this…However, because I cant seem to figure out how to add a delay in a loop I’m still stuck here too. :(

    Thanks again.

    in reply to: How Do I Create a Loop Which Iterates Every Second. #47717
    grimmy
    Customer

    Any word on this? :scratch:

    in reply to: How Do I Create a Loop Which Iterates Every Second. #47556
    grimmy
    Customer

    For example..this gives me the error: Uncaught SyntaxError: Illegal continue statement: no surrounding iteration statement

    Same if I use the ‘every’ puzzle.

    Attachments:
    You must be logged in to view attached files.
    in reply to: Hide not working #47552
    grimmy
    Customer

    The object is a mesh (I think?, its an imported gltf scene) and the parent is an empty. I’ve tried hiding both the empty and the mesh/imported gltf but nothing happens.

    in reply to: How Do I Create a Loop Which Iterates Every Second. #47343
    grimmy
    Customer

    I tried using that in a loop but it didnt seem to work. I get an error when I put the ‘continue to next iteration’ puzzle inside the every x seconds puzles (which in turn is inside the loop.)

    in reply to: Trouble animating all objects in a list #47278
    grimmy
    Customer

    Actually Im having a very similar problem using the ‘Append Scene’ and When Loaded Do..’ puzzle within a ‘For Each item’ loop.

    Basically the code loads in various objects/scenes and then I try to position them at the same positions is object in a list. However, only the last object seems to ever get positioned.

    I tried using the same trick as before by creating an external function to run on each cycle but it still only positions the last one. Any ideas?

    Cheers

    Attachments:
    You must be logged in to view attached files.
    in reply to: Any easy way to retrieve nested JSON data? #47272
    grimmy
    Customer

    Something like this would be perfect, but it doesn’t seem to work.. :cry:

    Attachments:
    You must be logged in to view attached files.
    in reply to: Trouble animating all objects in a list #47245
    grimmy
    Customer

    Unless anyone knows of a better way, I found that passing each of iterations to a separate function which contains the animation code seems to do the trick. See image. :)

    Attachments:
    You must be logged in to view attached files.
    in reply to: Setting Properties on an Object #47213
    grimmy
    Customer

    Perfect! Thank You!

    in reply to: Verge3D for Cinema4D (Call for Discussion) #47192
    grimmy
    Customer

    +1 for Cinema4D here :)

    in reply to: Blender Lines Demo Example #47132
    grimmy
    Customer

    Ah wait. I see it now..its in Object Data Properties/Verge3D Settings. :) :good:

    in reply to: Can V3d receive window.postMessage events? #31557
    grimmy
    Customer

    In order to send a bunch of data to the v3d iframe you can do this:

    Parent:

    var myIframe = document.getElementById('v3d_iframe');
    myIframe.contentWindow.postMessage(
        {
            event_id: 'myMessage',
            data: {
                v1: 'value1', 
                v2: 'value2'
            }
        }, 
        "*" ); 

    v3d iFrame (in my_awesome_app.js for example):

    window.onmessage =  function(event) {
        if(event.data.event_id === 'myMessage'){
            console.log(event.data.data);
        }
    };
    in reply to: Can V3d receive window.postMessage events? #31553
    grimmy
    Customer

    I have the solution for anyone wishing to try the same thing:

    In my parent app I send the message like so:

    var myIframe = document.getElementById('v3d_iframe');//Note:I have set the ID of my iframe to v3d_iframe
    
    myIframe.contentWindow.postMessage('myMsg', '*');

    In my awesom_application.js script I make a message listener like so:

    window.onmessage = function(event){
        if (event.data == 'myMsg') {
            console.log('myMsg Message received!');
        }
    };

    However I still don’t know how I would go about sending more data (variables) to the v3d window…if anyone has any ideas let me know..

    in reply to: Can V3d receive window.postMessage events? #31551
    grimmy
    Customer

    Thanks for this but I tried a few variations and cant get it to work. Maybe my situation is slightly different to those described in the manual(?):

    I have a parent app which has the verge3d app embedded as an iframe. I want the parent app to perform some function on the v3d<iframe>. Im using postMessage from the parent app to send something to the iframe but I’m just not sure how the v3d iframe picks up the message.

    in reply to: Obj Export #30053
    grimmy
    Customer

    I would love this..with materials of course! :)

Viewing 15 posts - 1 through 15 (of 25 total)