Skip to content

Commit eaae512

Browse files
committed
feat: add wrapS & wrapT property of the framebuffer
1 parent ad90a22 commit eaae512

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

src/renderer/Framebuffer.js

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,20 @@ const Framebuffer = Class.create(/** @lends Framebuffer.prototype */ {
130130
*/
131131
magFilter: NEAREST,
132132

133+
/**
134+
* texture wrapS
135+
* @type {GLenum}
136+
* @default gl.CLAMP_TO_EDGE
137+
*/
138+
wrapS: CLAMP_TO_EDGE,
139+
140+
/**
141+
* texture wrapS
142+
* @type {GLenum}
143+
* @default gl.CLAMP_TO_EDGE
144+
*/
145+
wrapT: CLAMP_TO_EDGE,
146+
133147
/**
134148
* texture data
135149
* @type {TypedArray}
@@ -364,8 +378,8 @@ const Framebuffer = Class.create(/** @lends Framebuffer.prototype */ {
364378
width: this.width,
365379
height: this.height,
366380
image: this.data,
367-
wrapS: CLAMP_TO_EDGE,
368-
wrapT: CLAMP_TO_EDGE
381+
wrapS: this.wrapS,
382+
wrapT: this.wrapT
369383
});
370384

371385
const glTexture = texture.getGLTexture(state);

0 commit comments

Comments
 (0)