Interface StudioConfig

Configuration options for the Studio.

interface StudioConfig {
    debug?: boolean;
    loaders?: LoaderRegistry;
    locator?: ModelLocator;
    logging?: boolean;
    makeComponents?: boolean;
    maxViews?: number;
    modelsDir?: string;
}

Properties

debug?: boolean

When true, exposes engineer-only entries in the context menus (currently a Debug ▶ submenu with the WebGL context-loss simulator). Default false — production demos keep the surface area free of debug affordances.

loaders?: LoaderRegistry

Optional registry of model-format loaders. When omitted, Studio uses createDefaultLoaderRegistry which registers every built-in format. Pass a custom registry to load only a subset (smaller bundle), to add proprietary formats, or to substitute loader implementations in tests.

locator?: ModelLocator

Optional resolver for the default URL of a model when callers pass {modelId, format} without an explicit src. When omitted, Studio uses DefaultModelLocator with the convention {modelsDir}/{modelId}/{format}/model.{ext}. Inject a custom locator for deployments that arrange files differently.

logging?: boolean

Whether to set up event loggers for the Scene, Data, Viewer, and WebGLRenderer. Defaults to false. These loggers will log their output to the console, and do slow down the demo, so they should only be enabled when needed for debugging.

makeComponents?: boolean
maxViews?: number

The maximum number of views to create. This is used to configure the WebGLRenderer's memory management, and also limits the number of views that can be created via createView(). Defaults to 4.

modelsDir?: string

Base directory for loading models, relative to the HTML page. Defaults to "../../models".