How to use the babylonjs-gui.Control.VERTICAL_ALIGNMENT_TOP 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 BabylonJS / Editor / src / editor / tools / default-scene.ts View on Github external
public static CreateLabel (gui: AdvancedDynamicTexture, mesh: Mesh, str: string, lines: boolean, width: string, height: string): Rectangle {
        // PBR GUI
        const label = new Rectangle(str);
        label.background = 'black'
        label.height = height;
        label.alpha = 0.5;
        label.width = width;
        label.cornerRadius = 20;
        label.thickness = 1;
        label.linkOffsetY = 30;
        label.top = '0%';
        label.zIndex = 5;
        label.verticalAlignment = Control.VERTICAL_ALIGNMENT_TOP;
        label.horizontalAlignment = Control.HORIZONTAL_ALIGNMENT_RIGHT;
        gui.addControl(label);

        const text = new TextBlock();
        text.text = str;
        text.color = 'white';
        label.addControl(text);
    
        if (!lines) {
            label.linkWithMesh(mesh);
            return label;
        }

        var line = new Line();
        line.alpha = 0.5;
        line.lineWidth = 5;
github brianzinn / create-react-app-babylonjs / src / with2DUI.js View on Github external
{this.state.showModal === true &&
                    
                      
                        
                          
                            
                              
                                
                                <button height="75%" width="18%" background="white" name="close-icon">
                                  
                                </button>
                              
                            
                            
                              
                              
                                {
github brianzinn / create-react-app-babylonjs / src / remixMeshMashup / index.js View on Github external
<button width="{0.2}" background="#FFAF00" name="button">
                            
                              
                              
                            
                          </button>
                        
                    
                  
                
                
                  
                    
                      
                    
                  
                
                {this.state.model &amp;&amp;
                  
                }