Forráskód Böngészése

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

Fix one bug about DynamicTexture's size
David Catuhe 7 éve
szülő
commit
73fa86c97f
1 módosított fájl, 1 hozzáadás és 1 törlés
  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);