Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
create(scene: Scene): BabylonButton3D {
this.button3D = new BabylonButton3D(this.props.name)
// console.log("created button", this.props.name)
let text: TextBlock | undefined = undefined
let image: BabylonImage | undefined = undefined
if (this.props.imageUrl) {
image = new BabylonImage(`${this.props.name}-image`, this.props.imageUrl)
}
if (this.props.text) {
text = new TextBlock()
text.text = this.props.text
if (this.props.fontColor) {
text.color = this.props.fontColor.toHexString()
var startGameButton = function (panel) {
var button = new GUI.Button3D();
panel.addControl(button);
button.onPointerUpObservable.add(function () {
//reset score
updateScore(0);
addSpheres(scene);
button.isVisible = false;
});
var text1 = new GUI.TextBlock();
text1.text = "Start Game";
text1.color = "white";
text1.fontSize = 24;
button.content = text1;
}
var scene: Scene = createScene();