浏览代码

clearColor is optional

as can be seen on line 70, clearColor can be undefined (or null), so TS optional flag fits nicely.
Raanan Weber 10 年之前
父节点
当前提交
e49ec7b031
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      src/Materials/Textures/babylon.dynamicTexture.ts

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

@@ -65,7 +65,7 @@
             this.getScene().getEngine().updateDynamicTexture(this._texture, this._canvas, invertY === undefined ? true : invertY);
             this.getScene().getEngine().updateDynamicTexture(this._texture, this._canvas, invertY === undefined ? true : invertY);
         }
         }
 
 
-        public drawText(text: string, x: number, y: number, font: string, color: string, clearColor: string, invertY?: boolean, update = true) {
+        public drawText(text: string, x: number, y: number, font: string, color: string, clearColor?: string, invertY?: boolean, update = true) {
             var size = this.getSize();
             var size = this.getSize();
             if (clearColor) {
             if (clearColor) {
                 this._context.fillStyle = clearColor;
                 this._context.fillStyle = clearColor;
@@ -101,4 +101,4 @@
             return newTexture;
             return newTexture;
         }
         }
     }
     }
-} 
+}