Move atlas parts into webgl/

This commit is contained in:
Daniel Imms
2019-05-18 23:30:10 -07:00
parent f42e53f15a
commit 6922156d07
18 changed files with 642 additions and 25 deletions
+26
View File
@@ -0,0 +1,26 @@
/**
* Copyright (c) 2017 The xterm.js authors. All rights reserved.
* @license MIT
*/
import { Terminal, ITerminalAddon } from 'xterm';
import { WebglRenderer } from './WebglRenderer';
export class WebglRendererAddon implements ITerminalAddon {
private _terminal: Terminal | undefined;
constructor() {}
public activate(terminal: Terminal): void {
if (!terminal.element) {
throw new Error('Cannot activate WebglRendererAddon before Terminal.open');
}
this._terminal = terminal;
const core = (terminal as any)._core;
this._terminal.setRenderer(new WebglRenderer(core, core._colorManager.colors));
}
public dispose(): void {
throw new Error('WebglRendererAddon.dispose Not yet implemented');
}
}