How to use the babylonjs-gui.Control.HORIZONTAL_ALIGNMENT_LEFT function in babylonjs-gui

To help you get started, we’ve selected a few babylonjs-gui examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github brianzinn / create-react-app-babylonjs / src / with2DUI.js View on Github external
this.state.allowedMeshes.map(allowedMesh => (
                                    <TextBlock key={`opt--${this.state.clickedMeshName}-${allowedMesh}`} text={'• ' + allowedMesh} color="black" fontSize={28} height={`${60 / this.state.allowedMeshes.length}%`}
                                      textHorizontalAlignment={Control.HORIZONTAL_ALIGNMENT_LEFT}
                                      textVerticalAlignment={Control.VERTICAL_ALIGNMENT_TOP}
                                      paddingLeft="6%"
                                    />
                                  ))
                                }
github brianzinn / create-react-app-babylonjs / src / nonDeclarative.js View on Github external
params.forEach(function(param){
      var header = new TextBlock();
      header.text = param.name+":"+pipeline.depthOfField[param.name].toFixed(2);
      header.height = "40px";
      header.color = "black";
      header.textHorizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT;
      header.paddingTop = "10px";
      UiPanel.addControl(header); 
      var slider = new Slider();
      slider.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT;
      slider.minimum = param.min;
      slider.maximum = param.max;
      slider.color = "#636e72";
      slider.value = pipeline.depthOfField[param.name];
      slider.height = "20px";
      slider.width = "205px";
      UiPanel.addControl(slider); 
      slider.onValueChangedObservable.add(function(v){
          pipeline.depthOfField[param.name] = v;
          header.text = param.name+":"+pipeline.depthOfField[param.name].toFixed(2);
          moveFocusDistance = false;
      })
github brianzinn / create-react-app-babylonjs / src / nonDeclarative.js View on Github external
params.forEach(function(param){
      var header = new TextBlock();
      header.text = param.name+":"+pipeline.depthOfField[param.name].toFixed(2);
      header.height = "40px";
      header.color = "black";
      header.textHorizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT;
      header.paddingTop = "10px";
      UiPanel.addControl(header); 
      var slider = new Slider();
      slider.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_LEFT;
      slider.minimum = param.min;
      slider.maximum = param.max;
      slider.color = "#636e72";
      slider.value = pipeline.depthOfField[param.name];
      slider.height = "20px";
      slider.width = "205px";
      UiPanel.addControl(slider); 
      slider.onValueChangedObservable.add(function(v){
          pipeline.depthOfField[param.name] = v;
          header.text = param.name+":"+pipeline.depthOfField[param.name].toFixed(2);
          moveFocusDistance = false;
      }) 
  })
  scene.activeCameras = [scene.activeCamera, bgCamera];