Extract canvas/webgl code to separate component

This commit is contained in:
Mononaut
2022-06-14 00:33:48 +00:00
parent c5bcf76353
commit 225decd286
13 changed files with 1128 additions and 1033 deletions

View File

@@ -81,12 +81,12 @@ export class MempoolBlockComponent implements OnInit, OnDestroy {
}
setTxPreview(event: TransactionStripped | void): void {
this.previewTx = event
this.previewTx = event;
}
}
function detectWebGL () {
const canvas = document.createElement("canvas");
const gl = canvas.getContext("webgl") || canvas.getContext("experimental-webgl");
return (gl && gl instanceof WebGLRenderingContext)
function detectWebGL() {
const canvas = document.createElement('canvas');
const gl = canvas.getContext('webgl') || canvas.getContext('experimental-webgl');
return (gl && gl instanceof WebGLRenderingContext);
}