StringTune-3D/Docs

Rendering

Materials

The CSS material contract for basic and standard materials, opacity, emissive color, and model overrides.

Type
Rendering feature
Status
Stable
Scope
Element-level
Activation
CSS custom properties on [string-3d]

Materials

The runtime builds materials from computed CSS on the source element.

Public Surface

Core variables

VariableDefaultEffect
--material-typebasicChooses the material pipeline
--material-color#ffffffBase color
--material-metalness0Standard material metalness
--material-roughness1Standard material roughness
--material-emissive#000000Emissive color
--opacity1Opacity and transparency toggle

Material selection rule

  • basic uses the unlit path
  • standard uses the PBR path
  • custom material names are resolved through String3DCustomMaterialRegistry

Detailed Behavior

If the runtime sees texture maps or standard-only properties, it upgrades the final material path to standard even if the raw type was not standard.