============ ColorSampler ============ :superscript:`*Config object requires the 'library-image' addon to use` A color sampler is a config defined function that assigns a color for every XZ coordinate pair. Color samplers are typically used to distribute things across the entire world by utilizing color data, for example using a heightmap to shape terrain, or an image to draw where biomes should go. Color samplers differ from :doc:`Image` s in that they can provide colors for any XZ coordinate, whereas ``Image`` s only work with a set size. Types ===== Different types of ``ColorSampler`` provide different behaviours and may have additional parameters for configuring that behavior. The type is specified by setting the :bdg-primary:`type` parameter to the name of the type. If the same name is used by two different addons, you can prefix the name with ``ADDON_NAME:`` to specify which one to use. A list of available types for ``ColorSampler`` are listed below: --------- COLOR ----- Provides the same color for any input. .. _object-colorsampler-template-library-image-color-parameter-color: :bdg-ref-primary:`color ` :doc:`/config/documentation/objects/ColorString` - The color to output. --------- SINGLE_IMAGE ------------ Outputs the pixels of an ``Image``, colors for coordinates outside the bounds of the image are provided by a 'fallback' color sampler, which typically will be the `COLOR`_ type. .. _object-colorsampler-template-library-image-single_image-parameter-align: :bdg-ref-primary:`align ` Alignment .. _object-colorsampler-template-library-image-single_image-parameter-image: :bdg-ref-primary:`image ` :doc:`/config/documentation/objects/Image` - The image to be sampled .. _object-colorsampler-template-library-image-single_image-parameter-outside-sampler: :bdg-ref-primary:`outside-sampler ` :doc:`/config/documentation/objects/ColorSampler` - The sampler that provides colors for coordinates outside the bounds of the ``Image`` . --------- TILED_IMAGE ----------- Outputs a repeating grid of pixels sourced from the provided ``Image`` . .. _object-colorsampler-template-library-image-tiled_image-parameter-align: :bdg-ref-primary:`align ` Alignment .. _object-colorsampler-template-library-image-tiled_image-parameter-image: :bdg-ref-primary:`image ` :doc:`/config/documentation/objects/Image` - The image to be sampled --------- ROTATE ------ .. _object-colorsampler-template-library-image-rotate-parameter-angle: :bdg-ref-primary:`angle ` :doc:`/config/documentation/objects/Float` .. _object-colorsampler-template-library-image-rotate-parameter-color-sampler: :bdg-ref-primary:`color-sampler ` :doc:`/config/documentation/objects/ColorSampler` --------- TRANSLATE --------- .. _object-colorsampler-template-library-image-translate-parameter-color-sampler: :bdg-ref-primary:`color-sampler ` :doc:`/config/documentation/objects/ColorSampler` .. _object-colorsampler-template-library-image-translate-parameter-x: :bdg-ref-primary:`x ` :doc:`/config/documentation/objects/Integer` .. _object-colorsampler-template-library-image-translate-parameter-z: :bdg-ref-primary:`z ` :doc:`/config/documentation/objects/Integer` Uses ==== Used by 6 parameters: - :ref:`In TRANSLATE in ColorSampler `: :bdg-ref-primary:`color-sampler ` :doc:`/config/documentation/objects/ColorSampler` - :ref:`In IMAGE in BiomeProvider `: :bdg-ref-primary:`color-sampler ` :doc:`/config/documentation/objects/ColorSampler` - :ref:`In ROTATE in ColorSampler `: :bdg-ref-primary:`color-sampler ` :doc:`/config/documentation/objects/ColorSampler` - :ref:`In IMAGE in Source `: :bdg-ref-primary:`color-sampler ` :doc:`/config/documentation/objects/ColorSampler` - :ref:`In CHANNEL in NoiseSampler `: :bdg-ref-primary:`color-sampler ` :doc:`/config/documentation/objects/ColorSampler` - The color sampler to extract channel values from. - :ref:`In SINGLE_IMAGE in ColorSampler `: :bdg-ref-primary:`outside-sampler ` :doc:`/config/documentation/objects/ColorSampler` - The sampler that provides colors for coordinates outside the bounds of the ``Image`` .