-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Connection limit with error screen (#151)
* Connection limit with error screen * fixes issue preventing tweakpane scrolling --------- Co-authored-by: Marco Gomez <[email protected]>
- Loading branch information
1 parent
26122af
commit 0c0b0b6
Showing
16 changed files
with
237 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 39 additions & 0 deletions
39
packages/3d-web-client-core/src/error-screen/ErrorScreen.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
export class ErrorScreen { | ||
public readonly element: HTMLDivElement; | ||
|
||
private titleBannerText: HTMLDivElement; | ||
private messageText: HTMLDivElement; | ||
|
||
constructor(title: string, message: string) { | ||
this.element = document.createElement("div"); | ||
this.element.style.position = "absolute"; | ||
this.element.style.top = "0"; | ||
this.element.style.left = "0"; | ||
this.element.style.display = "flex"; | ||
this.element.style.alignItems = "center"; | ||
this.element.style.justifyContent = "center"; | ||
this.element.style.flexDirection = "column"; | ||
this.element.style.width = "100%"; | ||
this.element.style.height = "100%"; | ||
this.element.style.background = "linear-gradient(45deg, #111111 0%, #444444 100%)"; | ||
this.element.style.color = "white"; | ||
|
||
this.titleBannerText = document.createElement("div"); | ||
this.titleBannerText.textContent = title; | ||
this.titleBannerText.style.fontSize = "40px"; | ||
this.titleBannerText.style.fontWeight = "bold"; | ||
this.titleBannerText.style.fontFamily = "sans-serif"; | ||
this.element.append(this.titleBannerText); | ||
|
||
this.messageText = document.createElement("div"); | ||
this.messageText.style.textAlign = "center"; | ||
this.messageText.style.fontFamily = "sans-serif"; | ||
this.messageText.style.fontWeight = "bold"; | ||
this.messageText.textContent = message; | ||
this.element.append(this.messageText); | ||
} | ||
|
||
public dispose() { | ||
this.element.remove(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.