Skip to content

Commit fc82632

Browse files
committed
fix: make compatible with TypeScript 4.3
In TypeScript 4.3, `WebGLObject` was dropped from `lib.dom.d.ts`. This commit replaces uses of `WebGLObject` with `WebGLRenderbuffer|WebGLTexture`. Based on reading TWGL's `createFramebufferInfo(...)` these two are the only possible object types for attachments in `FramebufferInfo`.
1 parent 0a44471 commit fc82632

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/framebuffers.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ const LINEAR = 0x2601;
9494
* @property {number} [level] level for `gl.framebufferTexture2D`. Defaults to 0.
9595
* @property {number} [layer] layer for `gl.framebufferTextureLayer`. Defaults to undefined.
9696
* If set then `gl.framebufferTextureLayer` is called, if not then `gl.framebufferTexture2D`
97-
* @property {WebGLObject} [attachment] An existing renderbuffer or texture.
97+
* @property {WebGLRenderbuffer|WebGLTexture} [attachment] An existing renderbuffer or texture.
9898
* If provided will attach this Object. This allows you to share
9999
* attachments across framebuffers.
100100
* @memberOf module:twgl
@@ -137,7 +137,7 @@ function isRenderbufferFormat(format) {
137137
/**
138138
* @typedef {Object} FramebufferInfo
139139
* @property {WebGLFramebuffer} framebuffer The WebGLFramebuffer for this framebufferInfo
140-
* @property {WebGLObject[]} attachments The created attachments in the same order as passed in to {@link module:twgl.createFramebufferInfo}.
140+
* @property {(WebGLRenderbuffer|WebGLTexture)[]} attachments The created attachments in the same order as passed in to {@link module:twgl.createFramebufferInfo}.
141141
* @property {number} width The width of the framebuffer and its attachments
142142
* @property {number} height The width of the framebuffer and its attachments
143143
* @memberOf module:twgl

0 commit comments

Comments
 (0)