Hey!!!
I been trying to edit a script i saw on another website and realized it wasnt going well and the author never responded to my question so Im going to figure it out myself. I saw this PG:
https://www.babylonjs-playground.com/#LXZPJK#3
Ive tried to edit it by making multiple planes with no luck. Here is my code:
//split image between sides
var f = new BABYLON.Vector4(0.5,0, 1, 1); // front image = half the whole image along the width
var b = new BABYLON.Vector4(0,0, 0.5, 1); // back image = second half along the width
var plane0 = BABYLON.MeshBuilder.CreatePlane("plane0", {height:-1, width: 0.665, sideOrientation: BABYLON.Mesh.DOUBLESIDE, frontUVs: f, backUVs: b}, scene);
var mat = new BABYLON.StandardMaterial("", scene);
mat.diffuseTexture = new BABYLON.Texture("image/sw.jpg", scene);
plane0.material = mat;
//split image between sides
var f = new BABYLON.Vector4(0.5,0, 1, 1); // front image = half the whole image along the width
var b = new BABYLON.Vector4(0,0, 0.5, 1); // back image = second half along the width
var plane1 = BABYLON.MeshBuilder.CreatePlane("plane1", {height:1, width: 0.665, sideOrientation: BABYLON.Mesh.DOUBLESIDE, frontUVs: f, backUVs: b}, scene);
var mat = new BABYLON.StandardMaterial("", scene);
mat.diffuseTexture = new BABYLON.Texture("image/sw.jpg", scene);
plane1.material = mat;
Question: How do I make rows of planes(would like 16 planes in total)? Also I have an image but it shows on both sides…how do I have one image on one side and a different image on the other side?
,
Mekaboo