adam Posted September 4, 2016 Share Posted September 4, 2016 Right now if you create a rectangular ground mesh, you get rectangular quads: http://www.babylonjs-playground.com/#WJPB9#21 This isn't ideal when deforming the mesh, so I decided add an option for subdivisionX and subdivisionZ on GroundMesh: http://www.babylonjs-playground.com/#WJPB9#20 I got it working with sides here: http://www.babylonjs-playground.com/#WJPB9#22 I haven't tested _getFacetAt, _initHeightQuads, or _computeHeightQuads yet, so they probably aren't working properly. Dad72 and Pryme8 2 Quote Link to comment Share on other sites More sharing options...
adam Posted September 4, 2016 Author Share Posted September 4, 2016 It looks like in Blender they refer to them as Y subdivisions. Quote Link to comment Share on other sites More sharing options...
Dad72 Posted September 4, 2016 Share Posted September 4, 2016 It's a cool option. You will make a PR of this feature? Quote Link to comment Share on other sites More sharing options...
adam Posted September 4, 2016 Author Share Posted September 4, 2016 22 minutes ago, Dad72 said: You will make a PR of this feature? yes Quote Link to comment Share on other sites More sharing options...
adam Posted September 4, 2016 Author Share Posted September 4, 2016 The getHeightAtCoordinates appears to be working (click the ground): http://www.babylonjs-playground.com/#WJPB9#24 jerome and Dad72 2 Quote Link to comment Share on other sites More sharing options...
adam Posted September 4, 2016 Author Share Posted September 4, 2016 What version of Typescript is BJS using? I compiled my changes locally and it changed a ton of js files. Edit: It changed the order of the parens toward the end of the js files. I was using typescript 1.8.10 . Quote Link to comment Share on other sites More sharing options...
adam Posted September 5, 2016 Author Share Posted September 5, 2016 https://github.com/BabylonJS/Babylon.js/pull/1339 Quote Link to comment Share on other sites More sharing options...
jerome Posted September 5, 2016 Share Posted September 5, 2016 welcome in TS hell Well, the best way I found not to have TS conflicts (nor github ones) is this one : use the TS version installed by the task "install" provided with BJS in Babylonjs/Tools/Gulp : (as root/admin) npm install this will install the right ts version, compiler, with gulp etc then to compile and build BJS : gulp typescript Quote Link to comment Share on other sites More sharing options...
adam Posted September 5, 2016 Author Share Posted September 5, 2016 3 hours ago, jerome said: use the TS version installed by the task "install" provided I thought I did that. I followed these instructions: http://pixelcodr.com/tutos/contribute/contribute.html Quote Link to comment Share on other sites More sharing options...
jerome Posted September 5, 2016 Share Posted September 5, 2016 well, you PR seems to be quite nice because there are only 3 modified TS files. No matter if tonZ of JS files are recompiled on the fly ... Quote Link to comment Share on other sites More sharing options...
adam Posted September 6, 2016 Author Share Posted September 6, 2016 I originally was going to call the new options: subdivisionX, subdivisionZ, but then I changed my mind after seeing that in Blender it is subdivisionX, subdivisionY. Today I'm second guessing myself. Maybe my original thought of subdivisionX, subdivisionZ makes more sense. Although, when you create a ground mesh there is an option for height and no depth, which sort of fits with subdivisionY. :/ 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.