Просмотр исходного кода

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 лет назад
Родитель
Сommit
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);
         }
 
-        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();
             if (clearColor) {
                 this._context.fillStyle = clearColor;
@@ -101,4 +101,4 @@
             return newTexture;
         }
     }
-} 
+}