Function createRender2dTexture

  • 创建2d绘图渲染材质

    Parameters

    Returns {
        dispatchEvent: ((eventName, x?, y?) => void);
        dispose: (() => void);
        texture: ((param?) => Texture);
        update: ((cb) => boolean);
    }

    • dispatchEvent: ((eventName, x?, y?) => void)
        • (eventName, x?, y?): void
        • Parameters

          • eventName: "click" | "dblclick" | "mousewheel" | "mouseout" | "mouseup" | "mousedown" | "mousemove" | "contextmenu"
          • Optional x: number | Vector2
          • Optional y: number

          Returns void

    • dispose: (() => void)
        • (): void
        • Returns void

    • texture: ((param?) => Texture)
        • (param?): Texture
        • Parameters

          • Optional param: {
                copyData?: boolean;
                dispose?: boolean;
                expandRect?: number | [number, number, number, number];
                outputImageDebug?: boolean;
            }
            • Optional copyData?: boolean
            • Optional dispose?: boolean
            • Optional expandRect?: number | [number, number, number, number]
            • Optional outputImageDebug?: boolean

          Returns Texture

    • update: ((cb) => boolean)
        • (cb): boolean
        • Parameters

          • cb: ((context) => boolean)
              • (context): boolean
              • Parameters

                Returns boolean

          Returns boolean