Skip to content
This repository was archived by the owner on Oct 22, 2021. It is now read-only.

Commit 1b4d3d5

Browse files
committed
feat: enable xterm.js webgl renderer
1 parent 39c3f2d commit 1b4d3d5

File tree

4 files changed

+137
-118
lines changed

4 files changed

+137
-118
lines changed

package-lock.json

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/classes/terminal.class.js

+2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ class Terminal {
77
const {AttachAddon} = require("xterm-addon-attach");
88
const {FitAddon} = require("xterm-addon-fit");
99
const {LigaturesAddon} = require("xterm-addon-ligatures");
10+
const {WebglAddon} = require("xterm-addon-webgl");
1011
this.Ipc = require("electron").ipcRenderer;
1112

1213
this.port = opts.port || 3000;
@@ -137,6 +138,7 @@ class Terminal {
137138
let fitAddon = new FitAddon();
138139
this.term.loadAddon(fitAddon);
139140
this.term.open(document.getElementById(opts.parentId));
141+
this.term.loadAddon(new WebglAddon());
140142
let ligaturesAddon = new LigaturesAddon();
141143
this.term.loadAddon(ligaturesAddon);
142144
this.term.attachCustomKeyEventHandler(e => {

0 commit comments

Comments
 (0)