Selaa lähdekoodia

Merge pull request #7197 from Zcating/master

Fixed type error in parameters of DynamicTexture.drawText
David Catuhe 5 vuotta sitten
vanhempi
commit
4a731d7ec3
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      src/Materials/Textures/dynamicTexture.ts

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

@@ -146,7 +146,7 @@ export class DynamicTexture extends Texture {
      * @param invertY defines the direction for the Y axis (default is true - y increases downwards)
      * @param invertY defines the direction for the Y axis (default is true - y increases downwards)
      * @param update defines whether texture is immediately update (default is true)
      * @param update defines whether texture is immediately update (default is true)
      */
      */
-    public drawText(text: string, x: number, y: number, font: string, color: string, clearColor: string, invertY?: boolean, update = true) {
+    public drawText(text: string, x: number | null | undefined, y: number | null | undefined, 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;