We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d216793 commit 30ea09fCopy full SHA for 30ea09f
1 file changed
v3/src/renderer/webgl/WebGLRenderer.js
@@ -122,6 +122,8 @@ WebGLRenderer.prototype = {
122
123
createTexture: function (source, width, height)
124
{
125
+ width = source ? source.width : width;
126
+ height = source ? source.height : height;
127
var pot = ((width & (width - 1)) == 0 && (height & (height - 1)) == 0);
128
var gl = this.gl;
129
var filter = gl.NEAREST;
@@ -139,7 +141,7 @@ WebGLRenderer.prototype = {
139
141
filter = gl.NEAREST;
140
142
}
143
- if (typeof width === 'number' && typeof height === 'number')
144
+ if (!source && typeof width === 'number' && typeof height === 'number')
145
146
source.glTexture = this.resourceManager.createTexture(
147
0,
0 commit comments