Expose texture atlas change event and use in demo

This commit is contained in:
Daniel Imms
2022-07-31 11:16:12 -07:00
parent 266d795179
commit 75ca5006a2
3 changed files with 14 additions and 3 deletions
+2
View File
@@ -240,6 +240,7 @@ function createTerminal(): void {
typedTerm.loadAddon(addons.webgl.instance);
setTimeout(() => {
document.body.appendChild(addons.webgl.instance.textureAtlas);
addons.webgl.instance.onChangeTextureAtlas(e => document.body.appendChild(e));
}, 0);
term.focus();
@@ -506,6 +507,7 @@ function initAddons(term: TerminalType): void {
if (name === 'webgl') {
setTimeout(() => {
document.body.appendChild((addon.instance as WebglAddon).textureAtlas);
(addon.instance as WebglAddon).onChangeTextureAtlas(e => document.body.appendChild(e));
}, 0);
} else if (name === 'unicode11') {
term.unicode.activeVersion = '11';