Isometric Drawing Toolkit
    Preparing search index...

    Variable UtilityConst

    Utility: {
        cubeLocationFromCuboidValues: (
            cuboidValues: CuboidValue[],
        ) => CubeLocation[];
        rotate: (
            coordinates: CoordinatesLike[],
            rotation: Quaternion,
        ) => CoordinatesLike[];
        updateMinMax: <Key extends string | number | symbol>(
            accMinMax: Record<Key, { max: number; min: number }>,
            values: Record<Key, number>,
        ) => void;
    } = ...

    Utility functions for working with cuboid values.

    Type Declaration

    • cubeLocationFromCuboidValues: (cuboidValues: CuboidValue[]) => CubeLocation[]

      Extracts an array of individual cube location by iterating over possible coordinates of cuboid values.

      Array of cuboid values to extract coordinates from.

      The cube locations.

    • rotate: (coordinates: CoordinatesLike[], rotation: Quaternion) => CoordinatesLike[]

      Rotates coordinates with the given quaternion rotation.

      Array of coordinates that may have auxiliary data attached to them, like a cube location.

      The rotated array of coordinates combined with the unchanged auxiliary data.

    • updateMinMax: <Key extends string | number | symbol>(
          accMinMax: Record<Key, { max: number; min: number }>,
          values: Record<Key, number>,
      ) => void

      Updates an accumulator of minimum and maximum values with a new value in place. For example, let the accumulator be { attr1: { min: Infinity, max: -Infinity }, attr2: { min: 1, max: 9 } } and let the values be { attr1: 5, attr2: 10 }. The accumulator will then be updated to { attr1: { min: 5, max: 5 }, attr2: { min: 1, max: 10 } }.

      The accumulator.

      The new values to be compared against.