PixiDom - v1.0.0
    Preparing search index...

    Variable utilsConst

    utils: {
        centerPixiObject: (
            object: PixiRectLike,
            opts: { axis: "y"; parent?: { height: number } },
        ) => void;
        colorToInt: (input: Color) => number;
        normalizeColor: (input: Color) => NormalizedColor;
        normalizeColorOr: (
            input: Color | null | undefined,
            fallback: Color,
        ) => NormalizedColor;
        safeColorInt: (value: unknown) => number;
        string2hex: (input: string | number) => number;
    } = ...

    Type Declaration

    • centerPixiObject: (object: PixiRectLike, opts: { axis: "y"; parent?: { height: number } }) => void
    • colorToInt: (input: Color) => number
    • normalizeColor: (input: Color) => NormalizedColor
    • normalizeColorOr: (input: Color | null | undefined, fallback: Color) => NormalizedColor
    • safeColorInt: (value: unknown) => number

      Coerce any input into a valid 24-bit RGB integer (0x000000..0xffffff).

      Non-finite or non-numeric values fall back to 0. Negative or out-of-range numbers are masked into 24 bits — 0xfffffff (a 7-digit hex typo) becomes 0xffffff (white) instead of throwing in pixi 7+'s color validator.

      Pure: no side effects, no prototype patching. Use this at any boundary that passes a raw number to PIXI Graphics / tint APIs.

    • string2hex: (input: string | number) => number