The engine that drive CanvasKit-WASM

Constructors

Properties

Methods

Constructors

Properties

apps: (LocalApp | App)[] = []
ck: CanvasKit
plugins: GlobalPlugin[] = []

Methods

  • Creating a browser app.

    Parameters

    • element: HTMLCanvasElement

      The <canvas> tag.

    Returns App

    App

  • Creating a local(nodejs/denojs) app

    Parameters

    • width: number
    • height: number

    Returns LocalApp

    LocalApp

  • Initializing a CarEngine

    Parameters

    • canvasKitWasmFile: string

      The path of canvaskit.wasm. In common, the file is under bin in npm package canvaskit-wasm

    Returns Promise<CarEngine>

    the engine object.

  • Using a plugin for global.

    Parameters

    Returns this

    this