0.3.0 • Published 3 years ago

@shader-art/plugin-base v0.3.0

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

<shader-art> plugin interface

You can build your own plugins by implementing this interface:

export interface ShaderArtPlugin {
  name: string;
  setup(
    hostElement: HTMLElement,
    gl: WebGLRenderingContext | WebGL2RenderingContext,
    program: WebGLProgram,
    canvas: HTMLCanvasElement
  ): void | Promise<void>;
  dispose(): void;
}

If the setup method returns a promise, the shader-art component will wait until the promise resolves.