Forum Replies Created
-
AuthorPosts
-
grimmyCustomer
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.
grimmyCustomerAny word on this?
grimmyCustomerFor 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.grimmyCustomerThe 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.
grimmyCustomerI 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.)
grimmyCustomerActually 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.grimmyCustomerSomething like this would be perfect, but it doesn’t seem to work..
Attachments:
You must be logged in to view attached files.grimmyCustomerUnless 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.grimmyCustomerPerfect! Thank You!
grimmyCustomer+1 for Cinema4D here :)
grimmyCustomerAh wait. I see it now..its in Object Data Properties/Verge3D Settings. :)
grimmyCustomerIn 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); } };
grimmyCustomerI 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..
grimmyCustomerThanks 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.
grimmyCustomerI would love this..with materials of course! :)
-
AuthorPosts