Jump to content

Dimention ground and plan


Recommended Posts

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.



Link to comment
Share on other sites

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();
Link to comment
Share on other sites

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.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...