thiendv Posted November 30, 2016 Share Posted November 30, 2016 On 18/10/2016 at 3:55 AM, Wingnut said: Yeah, I understand... it won't evolve well. Yeah, I was thinking... detach the old, snap-on the new. I don't think we will be getting too advanced... currently. Nice and simple. Here's a quickie: http://www.babylonjs-playground.com/#BUWYF#21 The buttons work! (targeting URL's, not functions, yet). I borrowed some code from an earlier project. This stuff is easy... and fun. I like working with it. @thiendv spoke of changing colors with the menu, so, I suppose that will be a challenge. Could try a color picker, I suppose... but... maybe just a "new random color" button, for now. I haven't got the "right click again... to close menu" working yet. If someone wants to activate THAT for us, that would be okay with me. I haven't done much hiding/disposing of canvas2D things, so if anyone wants to advance that, I wouldn't complain. Hi, @Wingnut, thanks for your help very much. I spent many time for create model my house, after that, i load my model for your code, It error because" $ is not define" Can you explain for me, thanks you! Quote Link to comment Share on other sites More sharing options...
Wingnut Posted November 30, 2016 Author Share Posted November 30, 2016 @thiendv That sounds like missing jquery. Please see http://jquery-howto.blogspot.com/2013/02/referenceerror-jquery-is-not-defined.html thx. My playground demo is failing due to ... um... not sure. Possibly https GET from new playground... not enjoyed by all. Hopefully, that is not affecting your project, @thiendv. Please check your "net" or "network" tab in your browser F12 Dev Tools. See if jQuery is failing to load. Keep us posted. Quote Link to comment Share on other sites More sharing options...
adam Posted November 30, 2016 Share Posted November 30, 2016 1 hour ago, thiendv said: " $ is not define" I often get this error toward the end of the month, too. Wingnut and max123 2 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted November 30, 2016 Share Posted November 30, 2016 Regarding .js in the repo, it is removed as you can find everything in /dist/preview release/babylon.max.js You can also fork the repo and run /tools/gulp/gulp typescript (And it will generate all .js for you) Quote Link to comment Share on other sites More sharing options...
thiendv Posted December 1, 2016 Share Posted December 1, 2016 8 hours ago, Wingnut said: @thiendv That sounds like missing jquery. Please see http://jquery-howto.blogspot.com/2013/02/referenceerror-jquery-is-not-defined.html thx. My playground demo is failing due to ... um... not sure. Possibly https GET from new playground... not enjoyed by all. Hopefully, that is not affecting your project, @thiendv. Please check your "net" or "network" tab in your browser F12 Dev Tools. See if jQuery is failing to load. Keep us posted. I follow your instructions. i insert link script jquery from google host. But my menu not fix on screen. it run every where. Can you help me fix it. thanks you Quote Link to comment Share on other sites More sharing options...
Wingnut Posted December 1, 2016 Author Share Posted December 1, 2016 Hi @thiendv, sorry to hear you have problems. http://www.babylonjs-playground.com/#BUWYF#40 1. In this playground, does right-click on mesh... switch menu ON/OFF? 2. Does left-click on "b0Service" button... change mesh color? 3. Did something change to make menu begin failing? WAS working, now failing? (perhaps clear browser cache and ensure using LATEST BabylonJS) 4. Can you zip your entire project and offer to us for public download? Thx for info. I will try to help. Tell me many details, if you can. Zip and publish if you can. Thx! Quote Link to comment Share on other sites More sharing options...
thiendv Posted December 1, 2016 Share Posted December 1, 2016 On 1/12/2016 at 6:49 PM, Wingnut said: Hi @thiendv, sorry to hear you have problems. http://www.babylonjs-playground.com/#BUWYF#40 1. In this playground, does right-click on mesh... switch menu ON/OFF? 2. Does left-click on "b0Service" button... change mesh color? 3. Did something change to make menu begin failing? WAS working, now failing? (perhaps clear browser cache and ensure using LATEST BabylonJS) 4. Can you zip your entire project and offer to us for public download? Thx for info. I will try to help. Tell me many details, if you can. Zip and publish if you can. Thx! Thanks you, i try many time, but B0sevrvice don't work, and i really want to change some object' texture not all mesh as demo. I try function boservices but not good. It's my zip file : you run default file. Thanks Quote Link to comment Share on other sites More sharing options...
Wingnut Posted December 1, 2016 Author Share Posted December 1, 2016 Hi @thiendv, thx for the rar. Fixed... http://webpages.charter.net/wingthing/misc/Thiendv_Default2.rar (It is ONLY the .htm file. You can list folder contents with http://webpages.charter.net/wingthing/ ) I set each mesh.isPickable = true ... each mesh in .babylon file. Before that, right clicks happened on HdrSkyBox (as you could see in JS console). This is why moving camera with menu open... caused the menu to move around like crazy ... because menu and camera was INSIDE-OF the mesh used for tracked node. The menu (and camera) was "within" the tracked mesh (the source used by menu_grp). Kind of funny. It did not work well. heh Anyway, you need to carefully set SOME mesh .isPickable = true... and OTHER mesh .isPickable = false. Perhaps, add small invisible box parented to camera. Then check at beginning of createMenu()... if cameraBox intersectsMesh with source, then return. In other words if camera is intersecting the source mesh (source mesh = right-clicked mesh), then do not allow right-click menu to open. It is an idea, but might not work. I have never done tests to check if all mesh inside a skybox... intersectsMesh with that containing skybox. I predict YES. Other subject: b0Service was failing because ecran1 was undefined... inside b0Service() function. (ecran1 = scene.getMeshByName("Tivi") failed to find that name.) Watch your JS console carefully... it tells good info. I use console.log(anything) and console.dir(some object) ... VERY often. It is my friend. I have put a console.log("b0Service run") inside b0Service() function, now. It is working. INSIDE of b0Service... you could enter... scene.getMeshByName("plane").material.diffuseColor = new BABYLON.Color3(Math.random(), Math.random(), Math.random()); Something fun like that. I hope this helps. Good luck. Nice scene! ---------------------------- For those at the luge track campfire project, http://www.babylonjs-playground.com/#1YOCO9#1 Simple block "sled" doing a "physics slide" off-of an icy ramp, over and over. I stare and think about things (like sledding hills and toboggan jumping). Notice I forgot to reset the sled's rotation upon sled reset. More fun, somehow. Perhaps, this sled will soon have applyImpulse steering, on-board camera (actually available now), and a bumpy terrain to do toboggan jumping. Maybe spray some snow particles. LOOK OUT! Too fun! SO many sledding options available in BJS, eh? thiendv 1 Quote Link to comment Share on other sites More sharing options...
Wingnut Posted December 10, 2016 Author Share Posted December 10, 2016 Hi gang! Lately, I was pondering HOW OFTEN I use random colors. We currently have Color3.Blue() and Color3.Green(), etc. Does anyone see a reason why Color3.Random() would be a bad idea? When I used to work-with CSS often, I had 3 utility funcs for color... randomColor(), lightRandomColor() and darkRandomColor(). That might be overkill, for us... but, perhaps not. And, how many of you are tired of typing new BABYLON.StandardMaterial(blah, bah)? Would you like... myMesh.materialize("standardMaterialName"); ? How about a step further... myMesh.colorize("standardMaterialName"); Both of these would add a standardMaterial to myMesh.material property. The 2nd one would set a random diffuseColor on that material, too. That's really fancy. But making materials (for me, mostly colorizing with a random color)... is one of the slowest things about coding a scene. Am I asking for the moon and stars (imagining too large)? Would such "tools" contaminate the mesh class? Perhaps. Thoughts, anyone? (thx) On the sledding project, I've started assembly of my bobsled... using parametric shapes. Doing okay, so far. http://www.babylonjs-playground.com/#PBVEM#47 Activate lines 83-89, and the ribbon.createInstance() seems to cause trouble. hmm. Perhaps ribbons hate instancing. Clones are working better. kbye Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted December 11, 2016 Share Posted December 11, 2016 Not a big fan of materialize stuff but we could clearly provide a Color3.Random(). I think it's a good and not expensive idea. Fancy doing the PR? (Pretty please!!! You know that you will have to do this leap of faith one day or another You already did it for the doc!) Wingnut 1 Quote Link to comment Share on other sites More sharing options...
Wingnut Posted December 11, 2016 Author Share Posted December 11, 2016 Thanks for the reply, DK. Unfortunately, that is a huge "leap of faith" because of the TypeScript. Fear of github. Fear of writing crappy code. Fear of TypeScript. Fear of the few text editors that can deal with it. Four layers of fear? (I lost count) I once tried to install Visual Studio Express, and I aborted the install half-way, because I thought I was going to run out of hard drive space... with all the needed/unneeded BS it was installing. And that is the "express" version? Holy crap! Every step BJS takes towards automation... pushes many users a step further away-from contributing, in my opinion. That is happening to me, anyway. I am enjoying BJS just fine... without becoming a core framework coder. There is a reason that you ping davrous for audio and VJ's, and ping Temechon for docs, and ping Raanan for physics, and Nockawa for Canvas2d, and Jerome for meshBuilder. It is because those people are most-familiar and most-acclimated with those systems. I ping core programmers when I feel I have a potentially useful framework mod. Why? Because core programmers are most familiar and acclimated with the core coding system. Plus, I didn't ping at all, because I believe "ping into duty" is somewhat unkind and assuming. I just propose the idea and asked for opinions. Others can read my ideas, or not. As a quick aside, DK... you once said that you have your notifications turned-off, and that pinging YOU does nothing. That comment hurt the forum. YOU ping others quite often, and then say that you ignore YOUR pings FROM others? Not good. You kicked the forum in the gut... with that one. Perhaps I misunderstood something, though. Anyway, BJS is growing/changing SO FAST that I don't even have a wise game plan for a "big picture"... for docs, speak nothing of being smart enough to write any newer docs. I'm still months of work behind... with the spelling/grammar checking. AND, I should be doing 5-10 illustrations per day... just to flesh-out the current docs. Shit, there's a hundred "Wingnut SHOULD BE DOING" issues... here in my wheelbarrow. I have a self-imposed guilt-trip going... about JUST the docs. Should I add learning TypeScript and VS to that? hmm. Ohhh, the fleshing of the Class Docs! Oh my God. Two years of dedicated-to-that-task work to do, there. (Wingy rubs a nearby brain tumor and sighs dejectedly with guilt complex). I got a forum of mostly-missing experts, or experts who answer with 1-2 cryptic lines of response... which I often need to "cover". And, I want to try to have some fun, sometimes, myself. I'm old. And retired. Do I deserve some fun, playing with BJS and showing/sharing the fun things I make with it? Sure I do. Not enough time in the day for all. But, still, I have high hopes for a MUCH MUCH EASIER TypeScript coding environment, someday. I know I make mountains out of mole hills (over-worry). But I don't want to deal with .d.ts, and I don't want to deal with Visual Studio's many annoyances. Things will get better for TypeScript, and perhaps I will still be alive... when it is ready. Meantime, it is most-wise for me to kindly "ping" core coders... and use their vast coding knowledge and "big picture" experience... to determine if my ideas are good/bad. Smart thinking on my part, right? I submit my ideas to "the experts group" for wisdom-weighing (I propose things). This is a safe system. Many eyes see my idea, and they are very smart eyes. (They know what JS "closure" means.) The people who are experts at turning the BIG knobs and throwing the BIG switches... do that better than anyone else, yes? Would you want a 7 year old building a highway overpass? Nooo. The 7 yr old is being wise... when he leaves overpass building to those who build overpasses. Ping the overpass builders, kid. I think MANY forum users think in this way. We don't want to disturb the Gods or screw-up their code. Nobody wants that. It would/could damage "team" (BJS framework). We all DO read typescript, lots more now that the JS is difficult to glean-out of the BJS max distribution un-pretti-ness. We are all learning it, slowly but surely. There IS forward movement in the direction of your hopes, DK. But, it APPEARS to be a HUGE multiple-hassle task, and I feel like a low-rank soldier entering an officer's club. I don't belong there... at least not yet. I don't want to start hating BJS because of the insane tools needed to code it. I'd rather make a sledding hill. You see my point, don't you? You understand my perspective perfectly. Remember back when you were a normal human, DK? Some of us are still in the neighborhood of being normal humans (non-insane-power-coders). hehe. We're really not in any hurry to leave Normalville. Some of us still want to get laid, and you can't woo most girls... talking about VS type declarations, scoping, and extension "decorating". Sorry for the long comment, but, you needed to (re-)see how the view looks... from here in Normalville (the place you left at age 14). You're still "normal". You are a normal super-God programmer, webGL expert, and framework big-picture seer. You guys are VERY normal when you are within groups of other God programmers. You are quite abnormal (unusual) when viewed by a 7-yr old like myself. heh. A 7-yr old should NEVER hammer-on the found mortar shell, to try to see what it is and how it works. We take the dangerous munitions to the experts, and they handle it. Wise, right? Thoughts? More bobsled? Ok here we go. I need to get the normals on the side fins/foils (foils 3-6), and on the tail section... adjusted somehow. Or perhaps tail and side-fins have proper normals, and the rest of the sled... is wrong. hmm. Should I "ping" @jerome to request advice? I'm scared, now. heh. Are there other "normals" experts nearby? Got ideas/thoughts? thx. gryff 1 Quote Link to comment Share on other sites More sharing options...
Wingnut Posted December 11, 2016 Author Share Posted December 11, 2016 Let's talk about "The Royi Incident" a bit more. I think that is where Deltakosh told us that he doesn't listen to pings (while he fires-off pings like a popcorn machine) Royi Bernthal... a man with a BIG plan, and he is 1000% motivated to kick its butt. But there are lots of "movers and shakers" on the forum. Some are shoved-from-behind by money worries, some by class deadlines, some by work deadlines, and some... by pure coding enjoyment. For whatever reason these power-enthusiasts are being "pushed"... they still are pushed. In doing that, they "wring-out" every sponge within view. For Royi... he needed Deltakosh's experience... or at least ONLY big-dogs who have done LOTS of performance testing. I know Royi's long-term goal (though I am told to not-divulge). I know it is a BIG one... where scene load/optimizing is a huge factor. (It is so... with many JS-WebGL projects). Meantime... Royi "seemed" to start asking more questions... than doing tests/research. But we should understand that hearing Deltakosh talk about HIS performance experience... is one of the only sources to get good answers about scene load. Royi started "wringing the sponge"... and Deltakosh DID respond... but... Royi was going fast, and started being/seeming a bit impatient for answers. But (lots of "but" in this post)... we MUST remember how motivated Royi was/is... and WHY he was searching for info... seemingly somewhat "frantic" and possibly viewed as inconsiderate. Royi is on a galloping horse... and we should try to recognize those type of people and be a bit forgiving, and a bit honored that they chose the BJS horse to ride. Just my opinion. Royi and I have done some personal messages. He's a pretty good guy, and doesn't quite understand why folks have hit him with sticks, at times. Some of it... is because we don't yet understand Royi. He gallops past the forum at 150 KPH, sprays a pile of questions and looks for answers... all in .5 seconds! It is because of who he is and how he operates. As soon as everyone understands what is happening, we can all deal with the situation in a much kinder and more-tolerant way. ARE pings... "assuming" and somewhat unkind? Let's talk about them... and perhaps pat Royi on the head and tell him we love him, even though he's weird. Pryme8 is another of similar style. It is difficult to get onto his frequency, because he is always traveling along in a top fuel dragster. NasimiAsl is another... living on a 1000 mph asteroid... yet killer coder/idea guy. And I consider MYSELF... pretty weird, too. Lots of different flavors of weird... running around this joint. Ok, back to pings. hmm. Where's the docs for this darned forum software? How can we "hint" that we are requesting advice from a certain person, without annoying them? What is a "ping" or "notification"... supposed to be used-for? hmm. Even though I sort-of changed the subject to "the theory of pinging", feel free to comment about anything, here, as always. Party on! gryff 1 Quote Link to comment Share on other sites More sharing options...
gryff Posted December 11, 2016 Share Posted December 11, 2016 @Wingnut : I have given you a like for your last two posts. Not because I agree with everything you have said, but just because you brought up some issues that have been on my mind too. I don't have any answers, but it is good to get these issues out in the open. And just a thought that I might add to yours - some people on this forum are "givers", some just "takers". This latter group can just be short term visitors (students maybe?), and then those that are long term who use the forum but give very little or even nothing back. And you Wingy - the "giver in chief" cheers, gryff Wingnut 1 Quote Link to comment Share on other sites More sharing options...
Nabroski Posted December 11, 2016 Share Posted December 11, 2016 @Wingnut maybe you find a better way for this playground one day, who knows. $("x-splitbox > [splitter]").remove(),$("#jsEditor").css("opacity",".9"),$("#editorButton").hover(function(){$("#jsEditor").fadeTo("slow",.1)},function(){$("#jsEditor").fadeTo("slow",1)});var elm=$("#canvasZone");elm.insertBefore(elm.prev()),$("#editorButton").trigger("click"),setTimeout(function(){$("#editorButton").trigger("click")},100),setTimeout(function(){$("newButton").trigger("click"),createNewScript()},150),setTimeout(function(){$("newButton").trigger("click"),loadScriptFromIndex(4)},200),function(e){e.fn.drags=function(o){o=e.extend({handle:"",cursor:"move"},o);var t=this;t.css("cursor",o.cursor).on("mousedown",function(o){var n=t.outerWidth(),r=t.outerHeight(),i=t.offset().top+r-o.pageY,c=t.offset().left+n-o.pageX;1===o.which&&(e(window).on("keydown",function(o){18==o.witch&&console.log("ja"),e(window).on("mousemove",function(o){t.addClass("drag"),e(".drag").offset({top:o.pageY+i-r,left:o.pageX+c-n})})}),e(window).on("keyup",function(t){e(window).on("mouseup",function(o){1===o.which&&(e("#jsEditor").removeClass("drag"),e(window).off("mouseup mousemove"))}),o.preventDefault()}))})}}(jQuery);var createScene=function(){var e=new BABYLON.Scene(engine);$("#jsEditor").drags({},function(e){});new BABYLON.ArcRotateCamera("camera",.5*Math.PI,1,15,BABYLON.Vector3.Zero(),e),new BABYLON.HemisphericLight("light1",new BABYLON.Vector3(0,1,0),e);return e}; you can drag the editor with ALT KEY around thats the best part. also click on our new debug layer. show/hide editor hover editorbutton only chrome support. edge has a different layer handle. (outstanding as always) Best Quote Link to comment Share on other sites More sharing options...
Wingnut Posted December 12, 2016 Author Share Posted December 12, 2016 Hi Nabs. Well, I don't know what all that is... but I'm pretty sure o.witch should be o.which. Friggin' annoying English language, eh? I pasted it into the editor (on my bobsled PG demo), (and adjusted witch/which)... and hit RUN. It went to the Materials demo. The editor window went-away and would not come back. Editor+/- button... does nothing. *shrug* (firefox) But yeah, DOM-hacking on the playground is fun, eh? I've done a little bit, a long time ago. What should this block of jQuery stuff... do? (if you don't mind me asking) Quote Link to comment Share on other sites More sharing options...
Nabroski Posted December 12, 2016 Share Posted December 12, 2016 Thank you for the response its an pre-alpha version on snapping editor window. I actually have no time to code, here is an unminified version. In case someone will contribute. YOU HAVE TO CLICK PRESSED ALT KEY DRAG THAN CLICK EDITOR BUTTON ONCE TO GET FULL WINDOW. $("x-splitbox > [splitter]").remove(), $("#jsEditor").css("opacity", ".9"), $("#editorButton").hover(function() { $("#jsEditor").fadeTo("slow", .1) }, function() { $("#jsEditor").fadeTo("slow", 1) }); var elm = $("#canvasZone"); elm.insertBefore(elm.prev()),/* $("#editorButton").trigger("click"), setTimeout(function() { $("#editorButton").trigger("click") }, 100), setTimeout(function() { $("newButton").trigger("click"), createNewScript() }, 150), setTimeout(function() { $("newButton").trigger("click"), loadScriptFromIndex(4) }, 200),*/ function(e) { e.fn.drags = function(o) { o = e.extend({ handle: "", cursor: "move" }, o); var t = this; t.css("cursor", o.cursor).on("mousedown", function(o) { var n = t.outerWidth(), r = t.outerHeight(), i = t.offset().top + r - o.pageY, c = t.offset().left + n - o.pageX; 1 === o.which && (e(window).on("keydown", function(o) { 18 == o.which && e(window).on("mousemove", function(o) { t.addClass("drag"), e(".drag").offset({ top: o.pageY + i - r, left: o.pageX + c - n }) }) }), e(window).on("keyup", function(t) { e(window).on("mouseup", function(o) { 1 === o.which && (e("#jsEditor").removeClass("drag"), e(window).off("mouseup mousemove")) }), o.preventDefault() })) }) } }(jQuery); var createScene = function() { var e = new BABYLON.Scene(engine); $("#jsEditor").drags(); var arcR =new BABYLON.ArcRotateCamera("camera", .5 * Math.PI, 1, 15, BABYLON.Vector3.Zero(), e); arcR.attachControl(canvas),new BABYLON.HemisphericLight("light1", new BABYLON.Vector3(0, 1, 0), e); var shp= BABYLON.Mesh.CreateSphere("sphere1", 16, 2, e); shp.position.y = 1; BABYLON.Mesh.CreateGround("ground1", 6, 6, 2, e); return e } Wingnut 1 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted December 12, 2016 Share Posted December 12, 2016 Going back to contribution to Babylon.js: Recently @Sebavan did a great work simplifying first start: http://doc.babylonjs.com/generals/how_to_start It is a step by step process and we are eager to get feedback on it (to simplify it even more). This could be a GREAT opportunity for you Wingy. Obviously at the very end I can do it but I would love to have you contributing to the core code (Even if I thank you so much for all the help you bring to the forum) Wingnut 1 Quote Link to comment Share on other sites More sharing options...
jerome Posted December 12, 2016 Share Posted December 12, 2016 Hi Wingnut, I could help (I'm simply really busy with my pro job and something I need/hope to complete before the end of this year) of course. Please tell me briefly (unfortunately, no time to spend on this nice forum these weeks) what you're trying to achieve ? btw, I noticed the strange behavior of ribbon instances.. and have no idea why it behaves that way for now. Quote Link to comment Share on other sites More sharing options...
Wingnut Posted December 12, 2016 Author Share Posted December 12, 2016 Thanks Jerome! [scene] I was trying to get the tail section... to be the same color as the rest of the body. And the side fins are a different color, too (dark on bottom). But the tail section has good specular shine, and so do side fins. SO... I think... tail section and side fins have GOOD normals. All the rest of it... has... um... inverted normals or something similar. Not sure. Trying for consistent colors. *shrug* Don't concern yourself at all. No client, no deadlines, just a fun project. I'll add the showNormals displayer and study things. Party on! update: oops, showNormals doesn't work so well on this monster. Need to do some serious bakeCurrentTransformIntoVertices(), first. Quote Link to comment Share on other sites More sharing options...
jerome Posted December 13, 2016 Share Posted December 13, 2016 really weird... I need to check this... maye it's more related to the way the facets are build in each part of the ship Quote Link to comment Share on other sites More sharing options...
Wingnut Posted December 13, 2016 Author Share Posted December 13, 2016 Thx. I tried rotating the nose cowl (hemi)... top to bottom, to see if the normals were better that way. No change. I also tried a computeNormals() as best I know how (not very best) (lines 28-32). No change. I gotta say, though... modeling with math and parametric shapes... is REALLY FUN! High performance, no modeling software... easily make dynamic changes to the sled... just too cool. Remember WAY back... when I asked if you could do a dynamic building/house generator, @jerome? Nod. Not too long after that, @NasimiAsl gave us his excellent skyskraper generator. Unfortunately, few can use it, because we need to be a robot to program it. Still, a VERY VERY powerful system. All in all, I love generating models from math, and Jerome, your world famous parametric shapes system... is SO FRIGGIN' NICE for doing that. SO much power. Thanks for making that system for us! Well done. I love my bobsled, so far (version #71 - mergedMeshes). Yeah, I KNOW 2-man bobsleds don't have that rear cowling piece... but that is where the BMW Turbo-Fan cold-thrust jet engine will be located... should we ever need some extra speed. While assembling that thing, I kept thinking about merging meshes and parenting. How was I going to make this into a single model, so I could wrap an invisible physics-active box around it, or use a single Cannon meshImposter on it? (for when we take it to the sledding hill) I don't use MergeMeshes very often. But there it is in lines 279-302 (of the #71 version), and it does the merging JUST FINE. Previously, I had nightmare images of the ugly, twisted indices that we often see with CSG Boolean ADDS. But nope, nice, clean wireframe after the merge... everything looking wonderful, and all items can be rotated with a single bobsled rotation in the render loop (line 306). I have good superglue! I can glue all the pieces together into one single model! YAY! No ugly indices connections seen in wireframe. YAY AGAIN! I have never really understood when and where to use subMeshes. Just for fun last night, I added console.log(bobsled.subMeshes.length); in the line 305 area (after the giant mesh-merge). I was curious if MergeMeshes put all 27 bobsled "pieces" into that array, during the merge. It didn't. I may have to hack BABYLON.Mesh.MergeMeshes and make it DO that. (oh, manually add them to subMeshes array, you say? how boring.) Why would I want all 27 pieces... stored in bobsled.subMeshes? I dunno. I guess... I want to see if I can get a ref to the fins/foils... during the game... and change their angles. Aero-trim, ya know? Change the down-force on the sled runners, while piloting the thing down a sledding hill full of children, sending them li'l snotty-nosed mitten-chewers... flying. Comedy attempts aside, yes, having refs to sub-mesh (pieces that I super-glued together)... would be handy. Question is... would I need to re-merge the pieces... after I did some in-game airfoil rotations? hmm. Advice welcome. Sledding hill still to come. Volunteers? We need bumps/jumps (moguls). It needs a real slant/grade... for the physics. It COULD have a curvy "groove" cut into it, but I really don't want to "model" the hill (in modeling software). I want it dynamic... made with math and numbers-bending. This is why I asked about on-the-fly tunnels and landscapes. But we have time at the beginning of the game... to wait for a generator to finish an entire sledding mountain. No problem. One problem is... shading the bumps. At real-life ski hills, it is very difficult to "see" the shape of an upcoming bump/jump. Everything is white... very little depth shading. In BJS land... it is even worse. Shadows/shading is very necessary on our sledding hill... because we want to steer our bobsled to the MOST DANGEROUS jumps. (We're men, remember?) Yes, I know, we are talking about taking an Olympics-grade 2-man bobsled... down a kids sledding hill, but that's what we men do (stupid things involving high speeds and dangers). It's part of our nature. Comments welcome. Those older questions... "What is a forum ping? Is it rude and assuming? What does 'impatience' look-like, in relation to pinging?"... those are all open for discussion yet, too. Party on! Quote Link to comment Share on other sites More sharing options...
ragingclaw Posted December 13, 2016 Share Posted December 13, 2016 The angle of the dangle is proportional to the heat of the beat. Quote Link to comment Share on other sites More sharing options...
Wingnut Posted December 14, 2016 Author Share Posted December 14, 2016 Speaking of angled danglings, early tests applying a Cannon MeshImpostor to our merged-mesh bobsled... are not looking healthy. We're falling through the ground/ramp/slide. http://www.babylonjs-playground.com/#1YOCO9#3 Just started fiddling with it. I still need to leave the obligatory slaughtered goat at the CannonJS altar. That should help. I had to scale-down the bobsled MUCH (line 190) bobsled.scaling = new BABYLON.Vector3(.03, .03, .03) But still, a red box of approximately this size WAS sliding down the ramp just fine. There is no "real" reason why the bobsled shouldn't stay atop the slide. SO, I need to look for "unreal" reasons. For those who don't know the history of physics engine things... falling-through other physics engine things... it is often caused by things not having enough size. Sometimes... fall-thru can be corrected with increasing mesh sizes. I may do some sizing tests... and lots of other tests. Using the boxImpostor... works better, but... it's just not the same. "Tiz the season to be sledding... fa la la la la... la la... la... la. Start the jets and set a heading... fa la la la la... la la... la... la." Party on! UPDATE: I forgot, meshImpostors only work with sphereImpostors. I might need to create a compoundImpostor-of-spheres, or a piece of cloth (spheres cross-linked together)... to create a custom impostor for the sled. Quote Link to comment Share on other sites More sharing options...
NasimiAsl Posted December 14, 2016 Share Posted December 14, 2016 @Wingnut what exactly you wanna make Quote Link to comment Share on other sites More sharing options...
Wingnut Posted December 14, 2016 Author Share Posted December 14, 2016 I have no "what exactly" goals determined. Everything flexible. I/We want to try all methods/ideas (for sledding fun). Main things... should seem fast, should be fun. "Fast" is not always easy to do... in JS/webGL. Maybe first person view, maybe chase view, maybe every view. I have never made a sledding sim, so I don't know what is wise and what is not. All things okay. With cockpit view, less need for physics. Player only sees nose cowl. Chase view... different. Players see entire sled... from behind. Should canvas "shake" when speeds increase? Does shaking make it more difficult to pilot? Perhaps, huh? Should sled allow tumbling during accident? Should sled be able to fly far-distances with jumping? If so, should foils be able to roll, pitch, and yaw the sled, while airborne? Should we allow extreme banked corners (such as your tunnels)? Does screen shake more when inertia is high? What "exactly" do YOU think would be fast and fun, Naz? All ideas and demos welcome. Use my bobsled or not. Main objectives: Experiment, learn, and have sledding fun. No bosses, no plans, no deadlines. Everyone free to try everything. All track types (mountains, tunnels, tube-tracks, waterpark slides). All sled types, all camera views, physics engines or fake physics or no physics. Understand, @NasimiAsl? Sledding party. ALL kinds of fun... allowed and encouraged. Skiing, saucers, and inner-tube riding, too. Use full imagination. FOR ME, I will probably begin with basic ski hill with moguls/jumps, so I can more-easily test sled steering methods. Sled steering for physics engines... quite different than sled steering for non-physics. Wide open ski hill... likely allows more steering/jumping. Luge track, half-pipe, tunnel-riding... less free-steering allowed/needed, and only low-altitude jumping (hops). Then, HOW to make scenery go past sides of camera FAST... to sim speed? Wide-open sledding hill... more difficult to make scenery pass quickly near sides of camera. Tunnel or luge/bobsled track, easier for that. Should we try everything? I think so. Wanted "feel" (nature): https://www.youtube.com/watch?v=C-y70ZOSzE0 (man-made): https://www.youtube.com/watch?v=otMZkKRFkrA 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.