Using Plane Mesh in BabylonJS

Hi Everyone! I’m beginning with BabylonJS by migrating a Three project manipulating vertices of a plane with a ShaderMaterial. I’ve been successful in changing most of the code to babylonjs but I’m stumped with the Plane lacking segment divisions in Babylonjs. With three, one can name the number of segment divisions of the plane geometry but it seems like this is not possible in babylonjs? I’ve also played around with the TiledPlane but this one seems to tile the shadermaterials vs actually applying the shader to the whole plane. Is there anything close to the plane in three or maybe an example of a plane with vertex displacement in babylonjs I can use a reference?

use increaseVertices(int) to increase the subdivision

var plan = BABYLON.Mesh.CreatePlane("plane", 100, scene, true);
plan.rotation.x = 1.57;
plan.increaseVertices(100);// add subdivision
3 Likes