@xterm/addon-webgl 0.20.0-beta.266 → 0.20.0-beta.268

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xterm/addon-webgl",
3
- "version": "0.20.0-beta.266",
3
+ "version": "0.20.0-beta.268",
4
4
  "author": {
5
5
  "name": "The xterm.js authors",
6
6
  "url": "https://xtermjs.org/"
@@ -23,8 +23,8 @@
23
23
  "prepublishOnly": "npm run package",
24
24
  "start": "node ../../demo/start"
25
25
  },
26
- "commit": "a374c6c5af995d09f1387780064725ed7b202e43",
26
+ "commit": "0b6fd2e8b2ee5bdaf6607076f6fae3b2e4ea0d44",
27
27
  "peerDependencies": {
28
- "@xterm/xterm": "^6.1.0-beta.267"
28
+ "@xterm/xterm": "^6.1.0-beta.269"
29
29
  }
30
30
  }
@@ -220,7 +220,7 @@ export class GlyphRenderer extends Disposable {
220
220
  public updateCell(x: number, y: number, code: number, bg: number, fg: number, ext: number, chars: string, width: number, lastBg: number): void {
221
221
  // Since this function is called for every cell (`rows*cols`), it must be very optimized. It
222
222
  // should not instantiate any variables unless a new glyph is drawn to the cache where the
223
- // slight slowdown is acceptable for the developer ergonomics provided as it's a once of for
223
+ // slight slowdown is acceptable for the developer ergonomics provided as it's a one-off for
224
224
  // each glyph.
225
225
  this._updateCell(this._vertices.attributes, x, y, code, bg, fg, ext, chars, width, lastBg);
226
226
  }
@@ -69,7 +69,7 @@ export class TextureAtlas implements ITextureAtlas {
69
69
  private _overflowSizePage: AtlasPage | undefined;
70
70
 
71
71
  private _tmpCanvas: HTMLCanvasElement;
72
- // A temporary context that glyphs are drawn to before being transfered to the atlas.
72
+ // A temporary context that glyphs are drawn to before being transferred to the atlas.
73
73
  private _tmpCtx: CanvasRenderingContext2D;
74
74
 
75
75
  private _workBoundingBox: IBoundingBox = { top: 0, left: 0, bottom: 0, right: 0 };
@@ -152,7 +152,7 @@ export class TextureAtlas implements ITextureAtlas {
152
152
  }
153
153
 
154
154
  private _createNewPage(): AtlasPage {
155
- // Try merge the set of the 4 most used pages of the largest size. This is is deferred to a
155
+ // Try merge the set of the 4 most used pages of the largest size. This is deferred to a
156
156
  // microtask to ensure it does not interrupt textures that will be rendered in the current
157
157
  // animation frame which would result in blank rendered areas. This is actually not that
158
158
  // expensive relative to drawing the glyphs, so there is no need to wait for an idle callback.
@@ -1125,7 +1125,7 @@ function clearColor(imageData: ImageData, bg: IColor, fg: IColor, enableThreshol
1125
1125
  // were covered (fg=#8ae234, bg=#c4a000).
1126
1126
  const threshold = Math.floor((Math.abs(r - fgR) + Math.abs(g - fgG) + Math.abs(b - fgB)) / 12);
1127
1127
 
1128
- // Set alpha channel of relevent pixels to 0
1128
+ // Set alpha channel of relevant pixels to 0
1129
1129
  let isEmpty = true;
1130
1130
  for (let offset = 0; offset < imageData.data.length; offset += 4) {
1131
1131
  // Check exact match
package/src/WebglAddon.ts CHANGED
@@ -40,7 +40,7 @@ export class WebglAddon extends Disposable implements ITerminalAddon, IWebglApi
40
40
  };
41
41
  const gl = document.createElement('canvas').getContext('webgl2', contextAttributes) as IWebGL2RenderingContext;
42
42
  if (!gl) {
43
- throw new Error('Webgl2 is only supported on Safari 16 and above');
43
+ throw new Error('WebGL2 is only supported on Safari 16 and above');
44
44
  }
45
45
  }
46
46
  super();
@@ -664,10 +664,10 @@ export class WebglRenderer extends Disposable implements IRenderer {
664
664
  this.dimensions.device.canvas.height = this._terminal.rows * this.dimensions.device.cell.height;
665
665
  this.dimensions.device.canvas.width = this._terminal.cols * this.dimensions.device.cell.width;
666
666
 
667
- // The the size of the canvas on the page. It's important that this rounds to nearest integer
667
+ // The size of the canvas on the page. It's important that this rounds to nearest integer
668
668
  // and not ceils as browsers often have floating point precision issues where
669
669
  // `window.devicePixelRatio` ends up being something like `1.100000023841858` for example, when
670
- // it's actually 1.1. Ceiling may causes blurriness as the backing canvas image is 1 pixel too
670
+ // it's actually 1.1. Ceiling may cause blurriness as the backing canvas image is 1 pixel too
671
671
  // large for the canvas element size.
672
672
  this.dimensions.css.canvas.height = Math.round(this.dimensions.device.canvas.height / this._devicePixelRatio);
673
673
  this.dimensions.css.canvas.width = Math.round(this.dimensions.device.canvas.width / this._devicePixelRatio);
@@ -23,12 +23,12 @@ declare module '@xterm/addon-webgl' {
23
23
  public readonly onChangeTextureAtlas: IEvent<HTMLCanvasElement>;
24
24
 
25
25
  /**
26
- * An event that is fired when the a new page is added to the texture atlas.
26
+ * An event that is fired when a new page is added to the texture atlas.
27
27
  */
28
28
  public readonly onAddTextureAtlasCanvas: IEvent<HTMLCanvasElement>;
29
29
 
30
30
  /**
31
- * An event that is fired when the a page is removed from the texture atlas.
31
+ * An event that is fired when a page is removed from the texture atlas.
32
32
  */
33
33
  public readonly onRemoveTextureAtlasCanvas: IEvent<HTMLCanvasElement>;
34
34