@cccode/fxr - v22.0.0

    Function isPrimary

    • Because most of the color properties in most actions are multipliers, setting all of them to the same color does not make the effect that color. Instead, it will make the color much deeper/darker unless it's just white.

      This function can be used to filter properties to assign the target color to. It does this by defining "primary" and "secondary" color properties for all actions with colors. If primary color properties are set to the target color and secondary color properties (all non-primary ones) are set to white, the final color will match the target color exactly.

      For example, BillboardEx has four color properties:

      This function will return false for color1, color2, and bloomColor, but true for color3. Since the product of color1, color2, and color3 is the actual color of the particle, and the bloom color is the product of the particle color and bloomColor, setting only color3 to the target color and the RGB values for the rest of the properties to white will make the particle's final color match the target color.

      Type Parameters

      Parameters

      • action: T

        Any data action.

      • property: keyof T

        A property name from the action.

      Returns boolean

    MMNEPVFCICPMFPCPTTAAATR