webani - v1.0.0
    Preparing search index...
    Index

    Constructors

    Properties

    backgroundColor: Vector3

    The background color for the canvas.

    gl: WebGL2RenderingContext

    The WebGL2 rendering context for drawing on the canvas.

    htmlCanvas: HTMLCanvasElement

    The HTMLCanvasElement associated with the Webani canvas.

    The scene that contains all the objects, cameras, lights, etc.

    skybox?: WebaniSkybox

    The skybox for the scene, optional.

    defaultCanvas?: WebaniCanvas

    The default WebaniCanvas instance.

    Methods

    • Parameters

      • attribName: string
      • data: AllowSharedBufferSource
      • size: number

      Returns void

    • Waits for all animations in the queue to finish.

      Returns Promise<void>

      A promise that resolves when all animations finish.

    • Retrieves the location of a shader variable.

      Parameters

      • name: string

        The name of the shader variable.

      Returns any

      The location of the shader variable.

    • Registers a handler to be called when a single animation finishes.

      Parameters

      • handler: () => void

        The handler to call when an animation finishes.

      Returns void

    • Registers a handler to be called when the entire animation queue finishes.

      Parameters

      • handler: () => void

        The handler to call when the queue finishes.

      Returns void

    • Sets the skybox of the scene.

      Parameters

      • images: ImageBitmap[]

        The images for the skybox.

      Returns void

    • Stops the recording and saves the video as a file after the most recently added animation finishes playing.

      Returns Promise<void>

      A promise that resolves once the recording is finished.