Home > @unseenco/backstage-threejs
backstage-threejs package
Runtime helpers for binding Three.js objects to Backstage.js sheets. For Studio devtools (buildExtension), import from @unseenco/backstage/threejs/extension.
Functions
| Function | Description |
|---|---|
| autoAddCamera(camera, sheet, options) | Registers a Three.js Camera on a Backstage sheet with transform and lens props. |
| autoAddMaterial(material, sheet, options) | Register a Three.js material on a Backstage sheet with auto-parsed material properties (colors, scalars, vectors, textures, shader uniforms). Use this instead of autoAddObject() when you only want material props and do not need transform binding or Object3D selection sync. |
| autoAddObject(object, sheet, options) | Registers a Three.js Object3D on a Backstage sheet with auto-parsed transform and material props. |
| configureBackstageThreejs(config) | Sets project-wide defaults for @unseenco/backstage/threejs auto-add helpers. |
| mergeExcludeInput(inputs) | Merges exclude/include inputs into per-category path lists for auto-add helpers. |
| parseUniformGui(uniform, component) | Reads GUI hints from a shader uniform for Backstage number or image props. |
| resetBackstageThreejsConfig() | Clears project-wide @unseenco/backstage/threejs configuration back to defaults. |
Variables
| Variable | Description |
|---|---|
| EXTENSION_ID | Stable extension id string passed to studio.extend(). |
Type Aliases
| Type Alias | Description |
|---|---|
| AutoAddCameraExcludeConfig | Per-category keys excluded when auto-adding a camera. |
| AutoAddCameraExcludeInput | Flat list or category map of props to skip when auto-adding a camera. |
| AutoAddCameraOptions | Options for autoAddCamera(). |
| AutoAddMaterialExcludeConfig | Material prop/uniform keys to exclude when auto-adding a material-only object. |
| AutoAddMaterialExcludeInput | A flat list applies to material props and uniforms. |
| AutoAddMaterialOptions | Options for autoAddMaterial(). |
| AutoAddObjectDefaults | Default options merged into each autoAddObject() call from configureBackstageThreejs(). |
| AutoAddObjectOptions | Options for autoAddObject(). |
| BackstageThreejsConfig | Project-wide defaults for autoAddObject() via configureBackstageThreejs(). |
| ExcludeConfig | Category map of transform, material, and uniform paths to exclude from auto-add helpers. |
| ExcludeInput | A flat list applies to transform, material props, and uniforms. |
| ParsedUniformGuiOptions | Parsed Studio number-editor options derived from UniformGuiOptions. |
| PropPathInput | Same shape as ExcludeInput; paths are expanded when passed to sheet.object(). |
| UniformGuiOptions | GUI metadata on a shader uniform (range, step, or texture type). |
| UniformWithGui | Shader uniform value plus optional GUI hints from the material source. |