Pryme8 Posted April 2, 2016 Share Posted April 2, 2016 - How do I create a Null Object? (A Object without a mesh but still everything else) - How do I change the settings of a created mesh after its made? Is disposing it and recreating with new setting the only option? I know for scale and things on a box you dont have to but what if I want to change the tessellation of a cone without rebuilding? - Do we have methods for fillets and chamfers? - I know we have the ability to subtract meshs from one another and merge them, but do we have process for others like excluding and containing? Quote Link to comment Share on other sites More sharing options...
MasterSplinter Posted April 2, 2016 Share Posted April 2, 2016 I think what you are looking for is new BABYLON.Mesh(name, scene); I think because the way webGL works and the way most people deal with meshes is that you need to create a new one. There is no method that I know of for fillets or chamfers. I'm not sure on the final question. Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted April 2, 2016 Author Share Posted April 2, 2016 How do I have a user save a json file on their computer locally? I don't want people to have to paste on a text file then remember to change it to the proper extension. and can you help dig up some math documentation on creation of parametric solids with chamfer? I'll do the scripting I just need the source. I've got my reference for basic parametric but I want to cover chamfers as well! Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted April 2, 2016 Author Share Posted April 2, 2016 Computing Handbook, Third Edition: Computer Science and Software Engineering doea anyone have a copy of this sitting around? Quote Link to comment Share on other sites More sharing options...
MasterSplinter Posted April 2, 2016 Share Posted April 2, 2016 Honestly, that's a stack overflow question. I'm sure there's a way to cache Json Quote Link to comment Share on other sites More sharing options...
jerome Posted April 2, 2016 Share Posted April 2, 2016 about changing the mesh after its creation without rebuilding it, you can't ... actually, you can easily change the vertex positions (http://doc.babylonjs.com/tutorials/How_to_dynamically_morph_a_mesh#other-shapes-updatemeshpositions or by using updateVerticesData() methods ) but you can't change the vertex and index numbers and relationships, so the way the internal geometry is designed, without setting a new VertexBuffer under the hood, it is to say buy rebuilding something The middle way would be to keep the same mesh but to apply the method setVerticesData(). This is the same logical mesh but a new VBO is created when called. So not a good idea to call it each frame for instance. If your issue is to change the mesh level of detail, it's managed by BJS : http://doc.babylonjs.com/tutorials/How_to_use_LOD Quote Link to comment Share on other sites More sharing options...
JohnK Posted April 2, 2016 Share Posted April 2, 2016 Save JSON file - @JCPalmer showed me a way of doing this. The code I used is in the dodownload function here https://github.com/Cubees/Cubees.github.io/blob/master/factory/shared/exporter.js Wingnut 1 Quote Link to comment Share on other sites More sharing options...
Wingnut Posted April 2, 2016 Share Posted April 2, 2016 @Pryme8 - That darned serializer keeps popping-up into your view, doesn't it? Four different people have mentioned it to you, now, right? Have you done a search for 'serializer" on our github source repo? Have you done tests and watched it work? Have you watched our sceneLoader "cast" a serialized mesh into a BJS-ready mesh? There's SO many ways that you could answer your own questions, right? It's okay to ask questions, of course. But I happen to know that you are near-genius, and could gun-down your own answers in the drop of a hat and the blink of an eye. What was it... 3 days ago... when I told you about the serializer, via PM? sigh. (Wingy ruffles your hair playfully and shakes his head in disapproval). What are we going to do with you, P8? Where is your calling? Are you taking time to eat, sometimes? heh Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted April 2, 2016 Author Share Posted April 2, 2016 I think maybe I'm having a disconnect from different terminology. I'm gonna take a step back and read the replys agian see if I'm not just being dense. Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted April 2, 2016 Author Share Posted April 2, 2016 And no my girlfriends been getting mad that I keep forgetting to eat some days... Too much to do, I go to bed dreaming of script and wake up with answers so I never do breakfast and usually not lunch cause I'm trying to get them down... Wingnut 1 Quote Link to comment Share on other sites More sharing options...
Wingnut Posted April 2, 2016 Share Posted April 2, 2016 That's all well and good, but, you didn't answer my questions. Have you tried any of the things I mentioned? Maybe try a playground where you output a mesh with the serializer and then deserialized back into a mesh (like a sceneLoader might do)? If so, what did you discover? Anything fun/interesting? Do you see how exporting/importing json is not a BJS thing, but instead a JS->browser thing? Do you see how... the serialization and sceneLoad are really the "borders" of BJS, and beyond those, other systems take over? It seems that sometimes these points of separation... are troubled waters for you, P-man. Thoughts? GameMonetize 1 Quote Link to comment Share on other sites More sharing options...
Pryme8 Posted April 2, 2016 Author Share Posted April 2, 2016 oooooo ok I get what your saying, we are having a miss communication... ill show you later today what im working on and it will all make sense. Quote Link to comment Share on other sites More sharing options...
Wingnut Posted April 2, 2016 Share Posted April 2, 2016 Sorry bud. I guess I need a flow diagram. Important thing is that you're getting answers to your questions from those who DO understand. 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.