Saxonberg Server API
    Preparing search index...
    Index

    Constructors

    Methods

    • Recursively expand material's composition. direct is one level; flat aggregates leaf-element weight fractions. Pure elements with a chemistry.symbol contribute their full mass to their own symbol (so iron returns { Fe: 1 }); mixtures recursively expand.

      Cycle-guarded: a composition reference back to an ancestor truncates the walk at that node (defensive — well-formed content shouldn't produce cycles).

      Parameters

      Returns MaterialComposition

    • Does material contain elementSymbol anywhere in its recursive composition? Walks the same expansion as compositionOf and consults the leaf elements' chemistry.symbol.

      Parameters

      • material: default
      • elementSymbol: string

      Returns boolean

    • Every registered Material whose recursive composition contains the element identified by symbol. Combines compositionOf + containsElement over the index.

      Parameters

      • symbol: string

      Returns default[]

    • Every registered Material that carries tag. Tag matching is exact-string. The result reflects the runtime singleton index; Materials that haven't been cloned yet aren't there.

      Parameters

      • tag: string

      Returns default[]

    • Resolve the Material at detailKey, falling through to the bulk default when no per-Detail override is set. Omit detailKey to read the bulk default directly. Returns null when stuff is not Tangible (or is Tangible but unset).

      Sync; threads through Tangible.getMaterial, which uses findByTemplatePath for HMR safety.

      Parameters

      • stuff: Stuff
      • OptionaldetailKey: string

      Returns default | null