Dad72 Posted May 6, 2014 Share Posted May 6, 2014 Hi, How can I recover or change the size of a ground and a plan. I wish I could do:ground.width = value;ground.heigth = value;plan.size = value;But I see nothing in the doc, or I can not find. Thanks Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted May 6, 2014 Share Posted May 6, 2014 just scale it: plan.scaling = new BABYLON.Vector3(value, value, 1); davrous 1 Quote Link to comment Share on other sites More sharing options...
Dad72 Posted May 6, 2014 Author Share Posted May 6, 2014 Yes, I thought there was another ways. width and height that was not the scale, as size. Ok, I'll do it like that. thank you Quote Link to comment Share on other sites More sharing options...
gwenael Posted May 7, 2014 Share Posted May 7, 2014 You'll have to wait a little more and you'll be able to use BABYLON.Geometry.Primitives.Ground = function (id, engine, canBeRegenerated, width, height, subdivisions, mesh) and BABYLON.Geometry.Primitives.Plane = function (id, engine, canBeRegenerated, size, mesh). canBeRegenerated must be set to true in your case and you'll be able to do this for example:var myMesh = new BABYLON.Mesh("plane", myScene);// 2 can be replaced by any number (should be positive though)var myPlane = new BABYLON.Geometry.Primitives.Plane("myPlaneGeometry", myScene.getEngine(), true, 2, myMesh);.....myPlane.size = 4; // 4 can be replaced by any number (should be positive though)// here's the magicmyPlane.regenerate(); Quote Link to comment Share on other sites More sharing options...
Dad72 Posted May 7, 2014 Author Share Posted May 7, 2014 it sounds cool. thank you gwenael. I'll wait. gwenael 1 Quote Link to comment Share on other sites More sharing options...
gwenael Posted May 11, 2014 Share Posted May 11, 2014 It has been merged. https://github.com/BabylonJS/Babylon.js/pull/192 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.