@shader-art/plugin-base
TypeScript icon, indicating that this package has built-in type declarations

0.3.0 • Public • Published

<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.

Package Sidebar

Install

npm i @shader-art/plugin-base

Weekly Downloads

5

Version

0.3.0

License

MIT

Unpacked Size

3.15 kB

Total Files

6

Last publish

Collaborators

  • lea.rosema