Hello ,
I am trying to read .babylon file from local file system (by selecting file from file dialog) by clicking on a babylonjs GUI button. Can someone tell me how do i do it?
Note: i am using bablonjs framework inside an electron app
let button = BABYLON.GUI.Button.CreateSimpleButton(
butName,
text
);
button.width = 0.6;
button.height = "40px";
button.color = "white";
button.fontSize = "12";
button.background = "grey";
button.horizontalAlignment = GUI.Control.HORIZONTAL_ALIGNMENT_CENTER;
button.verticalAlignment = GUI.Control.VERTICAL_ALIGNMENT_TOP;
impButton.onPointerClickObservable.add(function(state) {
// i need to invoke a file dialog here and select the .babylon file
});