rules: {
    lifelike: (<T>(p: PixelManipulator<T>, pattern: string, loop?: boolean) => ElementDataUnknown<T>);
    wolfram: (<T>(p: PixelManipulator<T>, pattern: string, loop?: boolean) => ElementDataUnknown<T>);
} = ...

Template generators for your elements.

Type declaration

  • lifelike: (<T>(p: PixelManipulator<T>, pattern: string, loop?: boolean) => ElementDataUnknown<T>)
      • <T>(p: PixelManipulator<T>, pattern: string, loop?: boolean): ElementDataUnknown<T>
      • Generates elements like conway's game of life.

        Type Parameters

        • T

        Parameters

        • p: PixelManipulator<T>

          lifelike needs to be able to call mooreNearbyCounter

        • pattern: string

          The B/S syntax indicator of on how many cells of the same type in the moore radius around each pixel should survive, and on how many should be born.

        • Optional loop: boolean

          Should this loop around screen edges? (Passed to loop)

        Returns ElementDataUnknown<T>

  • wolfram: (<T>(p: PixelManipulator<T>, pattern: string, loop?: boolean) => ElementDataUnknown<T>)
      • <T>(p: PixelManipulator<T>, pattern: string, loop?: boolean): ElementDataUnknown<T>
      • Generates fundamental cellular automata

        Type Parameters

        • T

        Parameters

        • p: PixelManipulator<T>

          wolfram needs to be able to call wolframNearbyCounter

        • pattern: string

          The Rule num syntax, where the 8-bit number is translated into a binary list, each where the inverted 3-binary-digit index represents the state of cells in the row above. On a match, the cell becomes the state specified in the initial 8-bit number.

        • Optional loop: boolean

          Should this loop around screen edges? (Passed to wolframNearby)

        Returns ElementDataUnknown<T>

Generated using TypeDoc