Bläddra i källkod

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 år sedan
förälder
incheckning
e49ec7b031
1 ändrade filer med 2 tillägg och 2 borttagningar
  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;
         }
     }
-} 
+}