I am using Babylon v6.2.0, I tried changing the color of my mesh, but it always turns black for some reason. What am I doing wrong here?
Code:
const model = await SceneLoader.ImportMeshAsync(
"",
fileURL,
fileName,
scene,
undefined,
".glb"
);
const test = model.meshes.filter((mesh) => {
return mesh.id === "ColorMesh";
})[0];
const colorMesh = new PBRMaterial("colorMesh", scene);
colorMesh.albedoColor = Color3.FromHexString(
"#FFFFFF"
);
test.material = colorMesh;