Explorar o código

fixed type error on drawText API

Zcating %!s(int64=5) %!d(string=hai) anos
pai
achega
cf3674d975
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  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 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();
         if (clearColor) {
             this._context.fillStyle = clearColor;