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): BabylonHolographicButton {
this.holographicButton = new BabylonHolographicButton(this.props.name)
this.holographicButton.text = this.props.text
if (this.props.imageUrl) {
this.holographicButton.imageUrl = this.props.imageUrl
}
if (this.props.onClick) {
// onPointerClickObservable has some issues...
this.holographicButton.onPointerDownObservable.add(() => {
this.props.onClick(this.holographicButton!)
})
}
return this.holographicButton
}