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

Commit

Permalink
feat: enable xterm.js webgl renderer
Browse files Browse the repository at this point in the history
  • Loading branch information
GitSquared committed Aug 25, 2021
1 parent 39c3f2d commit 1b4d3d5
Show file tree
Hide file tree
Showing 4 changed files with 137 additions and 118 deletions.
1 change: 1 addition & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions src/classes/terminal.class.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ class Terminal {
const {AttachAddon} = require("xterm-addon-attach");
const {FitAddon} = require("xterm-addon-fit");
const {LigaturesAddon} = require("xterm-addon-ligatures");
const {WebglAddon} = require("xterm-addon-webgl");
this.Ipc = require("electron").ipcRenderer;

this.port = opts.port || 3000;
Expand Down Expand Up @@ -137,6 +138,7 @@ class Terminal {
let fitAddon = new FitAddon();
this.term.loadAddon(fitAddon);
this.term.open(document.getElementById(opts.parentId));
this.term.loadAddon(new WebglAddon());
let ligaturesAddon = new LigaturesAddon();
this.term.loadAddon(ligaturesAddon);
this.term.attachCustomKeyEventHandler(e => {
Expand Down
Loading

0 comments on commit 1b4d3d5

Please sign in to comment.