Explorar o código

Merge pull request #4136 from finscn/fix-wrong-checking

Fix one bug about DynamicTexture's size
David Catuhe %!s(int64=7) %!d(string=hai) anos
pai
achega
73fa86c97f
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/Materials/Textures/babylon.dynamicTexture.ts

+ 1 - 1
src/Materials/Textures/babylon.dynamicTexture.ts

@@ -35,7 +35,7 @@
             } else {
                 this._canvas = document.createElement("canvas");
 
-                if (options.width) {
+                if (options.width || options.width === 0) {
                     this._texture = this._engine.createDynamicTexture(options.width, options.height, generateMipMaps, samplingMode);
                 } else {
                     this._texture = this._engine.createDynamicTexture(options, options, generateMipMaps, samplingMode);