/*!
 * Copyright (c) 2026 Vertex Software LLC. All rights reserved.
 */
import { Mapper as M } from "@vertexvis/utils";
import { defaultColor } from "../scenes/colorMaterial";
import { fromPbRGBi } from "./material";
export const fromPbColorMaterial = M.defineMapper(M.read(M.requiredProp('d'), M.requiredProp('ns'), M.mapRequiredProp('ka', fromPbRGBi), M.mapRequiredProp('kd', fromPbRGBi), M.mapRequiredProp('ks', fromPbRGBi), M.mapRequiredProp('ke', fromPbRGBi)), ([opacity, glossiness, ambient, diffuse, specular, emissive]) => ({
    opacity,
    glossiness,
    ambient,
    diffuse,
    specular,
    emissive,
}));
export const fromPbMaterialOverride = M.defineMapper(M.read(M.mapRequiredProp('defaultMaterial', () => defaultColor), M.mapRequiredProp('colorMaterial', fromPbColorMaterial)), ([defaultMaterial, colorMaterial]) => ({
    defaultMaterial,
    colorMaterial,
}));
//# sourceMappingURL=colorMaterial.js.map
