TinyShade
    Preparing search index...

    Class TinyShadeBake

    TinyShadeBake handles the serialization and distribution of a TinyShade application. It provides methods to export the live shader graph as a minified JSON file or as a self-contained, pixel-packed HTML application.

    Index

    Constructors

    Methods

    • Exports the current shader graph, including all passes, uniforms, and textures, as a minified JSON file. Useful for debugging or for use with a custom loader. *

      Parameters

      • app: TinyShade

        The active TinyShade instance.

      • filename: string = "graph.json"

        The name of the JSON file (e.g., "graph.json").

      Returns Promise<void>

    • Captures the current TinyShade state and triggers a download of a self-executing HTML file. The application logic is packed into a PNG image and decoded at runtime via an onload handler. *

      Parameters

      • app: TinyShade

        The active TinyShade instance.

      • filename: string = "demo.html"

        The name of the output HTML file (e.g., "scene.html").

      • OptionalrunnerSource: string

        The stringified source of the TinyShadeRunner class. If null, it attempts to fetch the source from 'assets/runnerCode.js'.

      • Optionalaudio: IBakePlugin
      • Optionalsequencer: IBakePlugin

      Returns Promise<void>