Skip to content

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

FunctionDescription
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

VariableDescription
EXTENSION_IDStable extension id string passed to studio.extend().

Type Aliases

Type AliasDescription
AutoAddCameraExcludeConfigPer-category keys excluded when auto-adding a camera.
AutoAddCameraExcludeInputFlat list or category map of props to skip when auto-adding a camera.
AutoAddCameraOptionsOptions for autoAddCamera().
AutoAddMaterialExcludeConfigMaterial prop/uniform keys to exclude when auto-adding a material-only object.
AutoAddMaterialExcludeInputA flat list applies to material props and uniforms.
AutoAddMaterialOptionsOptions for autoAddMaterial().
AutoAddObjectDefaultsDefault options merged into each autoAddObject() call from configureBackstageThreejs().
AutoAddObjectOptionsOptions for autoAddObject().
BackstageThreejsConfigProject-wide defaults for autoAddObject() via configureBackstageThreejs().
ExcludeConfigCategory map of transform, material, and uniform paths to exclude from auto-add helpers.
ExcludeInputA flat list applies to transform, material props, and uniforms.
ParsedUniformGuiOptionsParsed Studio number-editor options derived from UniformGuiOptions.
PropPathInputSame shape as ExcludeInput; paths are expanded when passed to sheet.object().
UniformGuiOptionsGUI metadata on a shader uniform (range, step, or texture type).
UniformWithGuiShader uniform value plus optional GUI hints from the material source.