Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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';
create(scene: Scene): BabylonRectangle {
this.rectangle = new BabylonRectangle(this.props.name)
return this.rectangle
}