mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-15 21:28:40 -09:00
Allow transparent backgrounds in webgl
This commit is contained in:
parent
c0367ada27
commit
2e8e2af15f
1 changed files with 1 additions and 7 deletions
|
|
@ -131,15 +131,9 @@ export default class Term extends React.PureComponent<TermProps> {
|
||||||
this.termWrapperRef?.appendChild(this.termRef);
|
this.termWrapperRef?.appendChild(this.termRef);
|
||||||
|
|
||||||
if (!props.term) {
|
if (!props.term) {
|
||||||
const needTransparency = Color(props.backgroundColor).alpha() < 1;
|
|
||||||
let useWebGL = false;
|
let useWebGL = false;
|
||||||
if (props.webGLRenderer) {
|
if (props.webGLRenderer) {
|
||||||
if (needTransparency) {
|
if (!isWebgl2Supported()) {
|
||||||
console.warn(
|
|
||||||
'WebGL Renderer has been disabled since it does not support transparent backgrounds yet. ' +
|
|
||||||
'Falling back to canvas-based rendering.'
|
|
||||||
);
|
|
||||||
} else if (!isWebgl2Supported()) {
|
|
||||||
console.warn('WebGL2 is not supported on your machine. Falling back to canvas-based rendering.');
|
console.warn('WebGL2 is not supported on your machine. Falling back to canvas-based rendering.');
|
||||||
} else {
|
} else {
|
||||||
// Experimental WebGL renderer needs some more glue-code to make it work on Hyper.
|
// Experimental WebGL renderer needs some more glue-code to make it work on Hyper.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue