Pryme8 Posted January 18, 2018 Share Posted January 18, 2018 So for this: I have tried a bunch of different way to move the lines with the tiles. Initially I thought maybe parenting was not working but it seems it is when I translate the tile through the console. http://pryme8.github.io/TSO/ <- anywhere on the script even after the TSO object is created and I loop through the meshs changing their position it seems like the parenting is not working. VS http://pryme8.github.io/TSO/index2.html Where if you go into the console and do like "tso.deck[0].mesh.position.x = 2;" that will move the tile and the lines as expected. What the heck? Quote Link to comment Share on other sites More sharing options...
Gijs Posted January 18, 2018 Share Posted January 18, 2018 It doesn't work in the console either, only the first three tiles work, which also work in your first link And you have " tso.deck[0].position.x = 2;" instead of " tso.deck[0].mesh.position.x = 2;" in this post Pryme8 1 Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted January 18, 2018 Author Share Posted January 18, 2018 On that version the first three are the only ones with lines so far. Ive got 12 done, but have not uploaded it yet. And yeah tso.deck[0].mesh.position.x = 2; is the correct thing thanks for that catch on my post.works as expected in console. *EDIT** I just updated index2 so you can paste: for(var i=0; i<tso.deck.length; i++){tso.deck.mesh.position.x=i;} into the console and it should move the tiles as expected with parenting.but if I do this anywhere but in the console the parenting does not work. Quote Link to comment Share on other sites More sharing options...
RaananW Posted January 19, 2018 Share Posted January 19, 2018 so, want to show when it is not working? the tso object is not referenced anywhere in your code. So, nowhere can we see what isn't working. The console is working, but this is the only thing we can do. Also, as always, would be great to have this isolated in the playground (if you feel like it is a bug). Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted January 19, 2018 Author Share Posted January 19, 2018 5 hours ago, RaananW said: so, want to show when it is not working? the tso object is not referenced anywhere in your code. So, nowhere can we see what isn't working. The console is working, but this is the only thing we can do. Also, as always, would be great to have this isolated in the playground (if you feel like it is a bug). I had that up for a while, I moved on and to a new version. I can upload an example one again when I get to work today. And it was in the actual TSO object that it was not working or anywhere else on the script for that matter I had it running after the creating of the TSO object : https://github.com/Pryme8/Pryme8.github.io/blob/9b93d5f66903fcb5d759753c8665a6ffbb4899c9/TSO/index.html#L1775 and when the tile was created as well even though in this version it shows it commented out: https://github.com/Pryme8/Pryme8.github.io/blob/a2811e78a93155a799b14e373400fa5dff7f4bc0/TSO/index.html#L82 Ill keep an working broken example up here when I get a chance. ***UPDATE*** http://pryme8.github.io/TSO/ should have the example now. Odd thing is it looks like it is working sometimes while others it does not, if you keep refreshing you may see the behavior. Maybe I just need to wrap it in a timeout and see if its a timing issue. Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted January 19, 2018 Author Share Posted January 19, 2018 Actually I can say with almost certainty its a timing issue... now that I see that behavior. Sooo solved I guess? Still kinda odd cause the parenting should of happened way before I call the positioning but hey whatever. Quote Link to comment Share on other sites More sharing options...
Gijs Posted January 19, 2018 Share Posted January 19, 2018 7 minutes ago, Pryme8 said: Actually I can say with almost certainty its a timing issue... now that I see that behavior. Sooo solved I guess? Still kinda odd cause the parenting should of happened way before I call the positioning but hey whatever. I just noticed that on my local version it only works sometimes, so it really does seem to be a timing issue. But it doesn't happen on the stable version from what I've seen: https://cdn.babylonjs.com/babylon.js Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted January 19, 2018 Author Share Posted January 19, 2018 Who likes working in a stable environment though? Quote Link to comment Share on other sites More sharing options...
RaananW Posted January 19, 2018 Share Posted January 19, 2018 you know, you pasted a localhost link. Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted January 19, 2018 Author Share Posted January 19, 2018 whoops: http://pryme8.github.io/TSO/index2.html Just keep refreshing this page and the behavior should switch. Pretty positive its timing, but that does not make sense do to Order of Ops. Even with a 20 ms buffer it seems to work every time. So its is for sure 100% a timing issue. http://pryme8.github.io/TSO/ Quote Link to comment Share on other sites More sharing options...
RaananW Posted January 22, 2018 Share Posted January 22, 2018 I refreshed a few times and didn't see any different behavior, thou I don't know what the actual behavior should be. Setting this aside, look at the waterfall of network loads: The red arrow is just there to show that there are 12 whole seconds (!) of computation. What is so complex that it blocks the entire execution for 12 whole seconds? I would say this is your problem. Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted January 22, 2018 Author Share Posted January 22, 2018 4 hours ago, RaananW said: I refreshed a few times and didn't see any different behavior, thou I don't know what the actual behavior should be. Setting this aside, look at the waterfall of network loads: The red arrow is just there to show that there are 12 whole seconds (!) of computation. What is so complex that it blocks the entire execution for 12 whole seconds? I would say this is your problem. thats from the textures being generated, later ill do that in async so it wont be an issue. Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted January 24, 2018 Author Share Posted January 24, 2018 *EDIT* nevermind I figured it out. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.