Ricebandit Posted January 21, 2016 Share Posted January 21, 2016 I'm a TOTAL noob with BabylonJS, so please correct me if I'm wrong on this. It looks like the size option for Mesh.CreatePlane isn't working as intended. I'm looking to define the dimensions of a plane with this: var plane = new BABYLON.Mesh.CreatePlane("plane_0", {width:10, height:5}, scene); However, this results in the plane not being drawn in. When I look at the git version of Mesh>>babylon.mesh.js Mesh.CreatePlane is assigning the size parameter to both width and height: Mesh.CreatePlane = function (name, size, scene, updatable, sideOrientation) { var options = { size: size, width: size, height: size, sideOrientation: sideOrientation, updatable: updatable }; return BABYLON.MeshBuilder.CreatePlane(name, options, scene); }; I dug into the minimized version and applied it like this to make it work as intended: CreatePlane=function(t,i,r,n,o){var s={size:i,width:i.width,height:i.height,sideOrientation:o,updatable:n}; Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 21, 2016 Share Posted January 21, 2016 Hello size is a number,you have to call it with: var plane = BABYLON.Mesh.CreatePlane("plane_0", 10, scene); To specify size more precisely, you can use the MeshBuilder: var plane = BABYLON.MeshBuilder.CreatePlane("plane_0", {width:10, height:5}, scene); benjydel 1 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.