Material-level blending state for a given high-level blending mode.
The viewer exposes five named blending modes that map onto specific
THREE.js blending + depth + transparency combinations. Pulling the
mapping into a pure function makes the truth table explicit and
testable, and lets the caller decide how to apply it (e.g. set on a
material, or compose into a snapshot).
blendEquation is part of the total state — every mode reports it
(even non-max modes report THREE.AddEquation, the default). That way
switching from 'max' back to 'additive' resets the equation instead of
stranding MaxEquation on the material from a previous selection.
Material-level blending state for a given high-level blending mode.
The viewer exposes five named blending modes that map onto specific THREE.js blending + depth + transparency combinations. Pulling the mapping into a pure function makes the truth table explicit and testable, and lets the caller decide how to apply it (e.g. set on a material, or compose into a snapshot).
blendEquationis part of the total state — every mode reports it (even non-max modes reportTHREE.AddEquation, the default). That way switching from 'max' back to 'additive' resets the equation instead of strandingMaxEquationon the material from a previous selection.