brepjs API Reference
    Preparing search index...

    Function color

    CSG IR — Constructive Solid Geometry as an Intermediate Representation.

    Build a content-addressed DAG of primitives, booleans, and transforms; parameterize via named expression bindings; evaluate against the active kernel with subtree-level cache reuse for incremental parametric edits.

    • Attach a color (hex string or RGB/RGBA tuple, canonicalized to RGBA) to the evaluated result of target. Metadata rides beside the geometry: the evaluator re-tags the shared target materialization with an independent handle before coloring, so plain consumers of the same subtree stay metadata-free.

      Parameters

      Returns ColorNode