<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>docs/config/lua/config/background.md - fork/wezterm @ termwiz-0.23.2</title>
<meta name="description" content="docs/config/lua/config/background.md in fork/wezterm at termwiz-0.23.2.">
<meta property="og:title" content="docs/config/lua/config/background.md - fork/wezterm @ termwiz-0.23.2">
<meta property="og:description" content="docs/config/lua/config/background.md in fork/wezterm at termwiz-0.23.2.">
<meta property="og:type" content="website">
<meta property="og:site_name" content="git.julia.blue">
<link rel="stylesheet" href="/css/style.css?v=62">
<script type="module" src="/js/main.js?v=62"></script>
</head>
<body>
<main data-ref="termwiz-0.23.2" data-tip="8b7ca454b5e0a65b69b1b736db54eae3c195384b">
<noscript>
  <div class="callout">
    <p>
      hey! this is a static git repo viewer. commit diffs, file history,
      older commits and other revisions won't load without javascript.
    </p>
    <p>
      you are still able to view source files on branch/tag tips,
      but the experience is degraded.
    </p>
  </div>
</noscript>
<header class="repo"><div>
<h1>fork/wezterm</h1>
</div>
<pre class="clone">git clone https://git.julia.blue/fork/wezterm</pre>
</header>
<p class="snapshot-commit"><span class="commit-author">mozumasu</span><span class="commit-message" data-commit="f1f87df0448830ed66589eb5540bec2d77546576">fix: docs typos</span><span class="snapshot-sha sha" data-commit="f1f87df0448830ed66589eb5540bec2d77546576">f1f87df04</span><time datetime="2024-09-01T21:30:12+09:00" title="2024-09-01 21:30:12 +0900">2024-09-01</time></p>
<header class="topbar"><details class="switcher"><summary>termwiz-0.23.2</summary><div class="menu"><strong>branches</strong><a href="/fork/wezterm/ref/main/">main</a><strong>tags</strong><a href="/fork/wezterm/ref/termiz-0.23.1/">termiz-0.23.1</a><a href="/fork/wezterm/ref/termiz-0.23.2/">termiz-0.23.2</a><a href="/fork/wezterm/ref/termiz-0.23.3/">termiz-0.23.3</a><a href="/fork/wezterm/ref/termwiz-0.23.0/">termwiz-0.23.0</a><a href="/fork/wezterm/ref/termwiz-0.23.1/">termwiz-0.23.1</a><a class="current" href="/fork/wezterm/ref/termwiz-0.23.2/">termwiz-0.23.2</a><a href="/fork/wezterm/ref/termwiz-0.23.3/">termwiz-0.23.3</a><a href="/fork/wezterm/ref/vtparse-0.7.0/">vtparse-0.7.0</a><a class="all" href="/fork/wezterm/refs">all refs →</a></div></details><nav class="crumbs"><a href="/fork/wezterm/">wezterm</a> / <a href="/fork/wezterm/ref/termwiz-0.23.2/tree/docs/">docs</a> / <a href="/fork/wezterm/ref/termwiz-0.23.2/tree/docs/config/">config</a> / <a href="/fork/wezterm/ref/termwiz-0.23.2/tree/docs/config/lua/">lua</a> / <a href="/fork/wezterm/ref/termwiz-0.23.2/tree/docs/config/lua/config/">config</a> / <span class="cur">background.md</span></nav>
<span class="view-stats"><span>8.3 KiB</span><span>190 lines</span></span><span class="actions"><a class="raw" href="/fork/wezterm/raw/16ae9eeff3c52a1dc97e8b6986358e8813e40b9c/docs/config/lua/config/background.md">raw</a></span></header>
<div class="markdown-view"><input type="radio" name="markdown-view" id="markdown-rendered" checked><label for="markdown-rendered">rendered</label><input type="radio" name="markdown-view" id="markdown-code"><label for="markdown-code">code</label><section class="readme rendered"><hr />
<p>tags:</p>
<ul>
<li>appearance</li>
<li>background</li>
</ul>
<hr />
<h1><code>background</code></h1>
<p>{{since('20220624-141144-bd1b7c5d')}}</p>
<p>The <code>background</code> config option allows you to compose a number of layers to
produce the background content in the terminal.</p>
<p>Layers can be image files, gradients or solid blocks of color. Layers composite
over each other based on their alpha channel. Images in layers can be made to
fill the viewport or to tile, and also to scroll with optional parallax as the
viewport is scrolled.</p>
<p>This video demonstrates the use of multiple layers to produce a rich video game
style parallax background; the configuration used for this is shown as an
example at the bottom of this page:</p>
<p>&lt;video width="80%" controls src="../../../screenshots/wezterm-parallax-2.mp4" loop&gt;&lt;/video&gt;</p>
<p>The <code>background</code> option is a table that lists the desired layers starting with
the deepest/back-most layer.  Subsequent layers are composited over the top of
preceding layers.</p>
<h2>Layer Definition</h2>
<p>A layer is a lua table with the following fields:</p>
<ul>
<li><code>source</code> - defines the source of the layer texture data. See below for source definitions</li>
<li><code>attachment</code> - controls whether the layer is fixed to the viewport or moves as it scrolls. Can be:
<ul>
<li><code>"Fixed"</code> (the default) to not move as the window scrolls,</li>
<li><code>"Scroll"</code> to scroll 1:1 with the number of pixels scrolled in the viewport,</li>
<li><code>{Parallax=0.1}</code> to scroll 1:10 with the number of pixels scrolled in the viewport.</li>
</ul>
</li>
<li><code>repeat_x</code> - controls whether the image is repeated in the x-direction. Can be one of:
<ul>
<li><code>"Repeat"</code> - Repeat as much as possible to cover the area. The last image will be clipped if it doesn't fit.  This is the default.</li>
<li><code>"Mirror"</code> - Like <code>"Repeat"</code> except that the image is alternately mirrored which can make images that don't tile seamlessly look a bit better when repeated</li>
<li><code>"NoRepeat"</code> - the image is not repeated.</li>
</ul>
</li>
<li><code>repeat_x_size</code> - Normally, when repeating, the image is tiled based on its width such that each copy of the image is immediately adjacent to the preceding instance.  You may set <code>repeat_x_size</code> to a different value to increase or decrease the space between the repeated instances.  Accepts:
<ul>
<li>number values in pixels,</li>
<li>string values like <code>"100%"</code> to specify a size relative to the viewport,</li>
<li><code>"10cell"</code> to specify a size based on the terminal cell metrics.</li>
</ul>
</li>
<li><code>repeat_y</code> - like <code>repeat_x</code> but affects the y-direction.</li>
<li><code>repeat_y_size</code> - like <code>repeat_x_size</code> but affects the y-direction.</li>
<li><code>vertical_align</code> - controls the initial vertical position of the layer, relative to the viewport:
<ul>
<li><code>"Top"</code> (the default),</li>
<li><code>"Middle"</code>,</li>
<li><code>"Bottom"</code></li>
</ul>
</li>
<li><code>vertical_offset</code> - specify an offset from the initial vertical position.  Accepts:
<ul>
<li>number values in pixels,</li>
<li>string values like <code>"100%"</code> to specify a size relative to the viewport,</li>
<li><code>"10cell"</code> to specify a size based on terminal cell metrics.</li>
</ul>
</li>
<li><code>horizontal_align</code> - controls the initial horizontal position of the layer, relative to the viewport:
<ul>
<li><code>"Left"</code> (the default),</li>
<li><code>"Center"</code></li>
<li><code>"Right"</code></li>
</ul>
</li>
<li><code>horizontal_offset</code> - like <code>vertical_offset</code> but applies to the x-direction.</li>
<li><code>opacity</code> - a number in the range <code>0</code> through <code>1.0</code> inclusive that is multiplied with the alpha channel of the source to adjust the opacity of the layer. The default is <code>1.0</code> to use the source alpha channel as-is. Using a smaller value makes the layer less opaque/more transparent.</li>
<li><code>hsb</code> - a hue, saturation, brightness transformation that can be used to adjust those attributes of the layer. See <a href="/fork/wezterm/ref/termwiz-0.23.2/blob/docs/config/lua/config/foreground_text_hsb.md">foreground_text_hsb</a> for more information about this kind of transform.</li>
<li><code>height</code> - controls the height of the image. The following values are accepted:
<ul>
<li><code>"Cover"</code> (this is the default) - Scales the image, preserving aspect ratio, to the smallest possible size to fill the viewport, leaving no empty space.  If the aspect ratio of the viewport differs from the image, the image is cropped.</li>
<li><code>"Contain"</code> - Scales the image as large as possible without cropping or stretching. If the viewport is larger than the image, tiles the image unless <code>repeat_y</code> is set to <code>"NoRepeat"</code>.</li>
<li><code>123</code> - specifies a height of <code>123</code> pixels</li>
<li><code>"50%"</code> - specifies a size of <code>50%</code> of the viewport height</li>
<li><code>"2cell"</code> - specifies a size equivalent to <code>2</code> rows</li>
</ul>
</li>
<li><code>width</code> - controls the width of the image. Same details as <code>height</code> but applies to the x-direction.</li>
</ul>
<h2>Source Definition</h2>
<p>A source can be one of the following:</p>
<ul>
<li><code>{File="/path/to/file.png"}</code> - load the specified image file.  PNG, JPEG,
GIF, BMP, ICO, TIFF, PNM, DDS, TGA and farbfeld files can be loaded.
Animated GIF and PNG files will animate while the window has focus.</li>
<li><code>{File={path="/path/to/anim.gif", speed=0.2}}</code> - load the specified image file, which is an animated gif, and adjust the animation speed to 0.2 times its normal speed.</li>
<li><code>{Gradient={preset="Warm"}}</code> - generate a gradient. The gradient definitions
are the same as those allowed for <a href="/fork/wezterm/ref/termwiz-0.23.2/blob/docs/config/lua/config/window_background_gradient.md">window_background_gradient</a>.</li>
<li><code>{Color="black"}</code> - generate an image with the specified color.</li>
</ul>
<h2>Relationship with other config options</h2>
<p>Specifying the following options:</p>
<ul>
<li><code>window_background_gradient</code></li>
<li><code>window_background_image</code></li>
<li><code>window_background_opacity</code></li>
<li><code>window_background_image_hsb</code></li>
</ul>
<p>will implicitly prepend a layer to the <code>background</code> configuration with width
and height set to 100%.</p>
<p>It is recommended that you migrate to the newer <code>background</code> rather than mixing
both the older and the newer configuration options.</p>
<h2>Parallax Example</h2>
<p>This example uses these <a href="https://www.gameartguppy.com/shop/space-ship-background-repeatable-vertical/">Alien Space Ship Background - Parallax -
Repeatable
(Vertical)</a>
assets to demonstrate most of the available features of <code>background</code>. That asset pack includes a background layer and a number of overlays. The overlays are positioned at varying offsets with differing parallax to provide a greater sense of depth.</p>
<p>The video at the top of this page demonstrate this configuration in action.</p>
<pre class="language-lua"><a-c>-- The art is a bit too bright and colorful to be useful as a backdrop</a-c>
<a-c>-- for text, so we&#39;re going to dim it down to 10% of its normal brightness</a-c>
<a-k>local</a-k> <a-v>dimmer</a-v> = <a-cr>{</a-cr> <a-v>brightness</a-v> = <a-n>0.1</a-n> <a-cr>}</a-cr>

<a-v>config</a-v><a-p>.</a-p><a-v>enable_scroll_bar</a-v> = <a-co>true</a-co>
<a-v>config</a-v><a-p>.</a-p><a-v>min_scroll_bar_height</a-v> = <a-s>&#39;2cell&#39;</a-s>
<a-v>config</a-v><a-p>.</a-p><a-v>colors</a-v> = <a-cr>{</a-cr>
  <a-v>scrollbar_thumb</a-v> = <a-s>&#39;white&#39;</a-s><a-p>,</a-p>
<a-cr>}</a-cr>
<a-v>config</a-v><a-p>.</a-p><a-v>background</a-v> = <a-cr>{</a-cr>
  <a-c>-- This is the deepest/back-most layer. It will be rendered first</a-c>
  <a-cr>{</a-cr>
    <a-v>source</a-v> = <a-cr>{</a-cr>
      <a-v>File</a-v> = <a-s>&#39;/Alien_Ship_bg_vert_images/Backgrounds/spaceship_bg_1.png&#39;</a-s><a-p>,</a-p>
    <a-cr>}</a-cr><a-p>,</a-p>
    <a-c>-- The texture tiles vertically but not horizontally.</a-c>
    <a-c>-- When we repeat it, mirror it so that it appears &quot;more seamless&quot;.</a-c>
    <a-c>-- An alternative to this is to set `width = &quot;100%&quot;` and have</a-c>
    <a-c>-- it stretch across the display</a-c>
    <a-v>repeat_x</a-v> = <a-s>&#39;Mirror&#39;</a-s><a-p>,</a-p>
    <a-v>hsb</a-v> = <a-v>dimmer</a-v><a-p>,</a-p>
    <a-c>-- When the viewport scrolls, move this layer 10% of the number of</a-c>
    <a-c>-- pixels moved by the main viewport. This makes it appear to be</a-c>
    <a-c>-- further behind the text.</a-c>
    <a-v>attachment</a-v> = <a-cr>{</a-cr> <a-v>Parallax</a-v> = <a-n>0.1</a-n> <a-cr>}</a-cr><a-p>,</a-p>
  <a-cr>}</a-cr><a-p>,</a-p>
  <a-c>-- Subsequent layers are rendered over the top of each other</a-c>
  <a-cr>{</a-cr>
    <a-v>source</a-v> = <a-cr>{</a-cr>
      <a-v>File</a-v> = <a-s>&#39;/Alien_Ship_bg_vert_images/Overlays/overlay_1_spines.png&#39;</a-s><a-p>,</a-p>
    <a-cr>}</a-cr><a-p>,</a-p>
    <a-v>width</a-v> = <a-s>&#39;100%&#39;</a-s><a-p>,</a-p>
    <a-v>repeat_x</a-v> = <a-s>&#39;NoRepeat&#39;</a-s><a-p>,</a-p>

    <a-c>-- position the spins starting at the bottom, and repeating every</a-c>
    <a-c>-- two screens.</a-c>
    <a-v>vertical_align</a-v> = <a-s>&#39;Bottom&#39;</a-s><a-p>,</a-p>
    <a-v>repeat_y_size</a-v> = <a-s>&#39;200%&#39;</a-s><a-p>,</a-p>
    <a-v>hsb</a-v> = <a-v>dimmer</a-v><a-p>,</a-p>

    <a-c>-- The parallax factor is higher than the background layer, so this</a-c>
    <a-c>-- one will appear to be closer when we scroll</a-c>
    <a-v>attachment</a-v> = <a-cr>{</a-cr> <a-v>Parallax</a-v> = <a-n>0.2</a-n> <a-cr>}</a-cr><a-p>,</a-p>
  <a-cr>}</a-cr><a-p>,</a-p>
  <a-cr>{</a-cr>
    <a-v>source</a-v> = <a-cr>{</a-cr>
      <a-v>File</a-v> = <a-s>&#39;/Alien_Ship_bg_vert_images/Overlays/overlay_2_alienball.png&#39;</a-s><a-p>,</a-p>
    <a-cr>}</a-cr><a-p>,</a-p>
    <a-v>width</a-v> = <a-s>&#39;100%&#39;</a-s><a-p>,</a-p>
    <a-v>repeat_x</a-v> = <a-s>&#39;NoRepeat&#39;</a-s><a-p>,</a-p>

    <a-c>-- start at 10% of the screen and repeat every 2 screens</a-c>
    <a-v>vertical_offset</a-v> = <a-s>&#39;10%&#39;</a-s><a-p>,</a-p>
    <a-v>repeat_y_size</a-v> = <a-s>&#39;200%&#39;</a-s><a-p>,</a-p>
    <a-v>hsb</a-v> = <a-v>dimmer</a-v><a-p>,</a-p>
    <a-v>attachment</a-v> = <a-cr>{</a-cr> <a-v>Parallax</a-v> = <a-n>0.3</a-n> <a-cr>}</a-cr><a-p>,</a-p>
  <a-cr>}</a-cr><a-p>,</a-p>
  <a-cr>{</a-cr>
    <a-v>source</a-v> = <a-cr>{</a-cr>
      <a-v>File</a-v> = <a-s>&#39;/Alien_Ship_bg_vert_images/Overlays/overlay_3_lobster.png&#39;</a-s><a-p>,</a-p>
    <a-cr>}</a-cr><a-p>,</a-p>
    <a-v>width</a-v> = <a-s>&#39;100%&#39;</a-s><a-p>,</a-p>
    <a-v>repeat_x</a-v> = <a-s>&#39;NoRepeat&#39;</a-s><a-p>,</a-p>

    <a-v>vertical_offset</a-v> = <a-s>&#39;30%&#39;</a-s><a-p>,</a-p>
    <a-v>repeat_y_size</a-v> = <a-s>&#39;200%&#39;</a-s><a-p>,</a-p>
    <a-v>hsb</a-v> = <a-v>dimmer</a-v><a-p>,</a-p>
    <a-v>attachment</a-v> = <a-cr>{</a-cr> <a-v>Parallax</a-v> = <a-n>0.4</a-n> <a-cr>}</a-cr><a-p>,</a-p>
  <a-cr>}</a-cr><a-p>,</a-p>
  <a-cr>{</a-cr>
    <a-v>source</a-v> = <a-cr>{</a-cr>
      <a-v>File</a-v> = <a-s>&#39;/Alien_Ship_bg_vert_images/Overlays/overlay_4_spiderlegs.png&#39;</a-s><a-p>,</a-p>
    <a-cr>}</a-cr><a-p>,</a-p>
    <a-v>width</a-v> = <a-s>&#39;100%&#39;</a-s><a-p>,</a-p>
    <a-v>repeat_x</a-v> = <a-s>&#39;NoRepeat&#39;</a-s><a-p>,</a-p>

    <a-v>vertical_offset</a-v> = <a-s>&#39;50%&#39;</a-s><a-p>,</a-p>
    <a-v>repeat_y_size</a-v> = <a-s>&#39;150%&#39;</a-s><a-p>,</a-p>
    <a-v>hsb</a-v> = <a-v>dimmer</a-v><a-p>,</a-p>
    <a-v>attachment</a-v> = <a-cr>{</a-cr> <a-v>Parallax</a-v> = <a-n>0.5</a-n> <a-cr>}</a-cr><a-p>,</a-p>
  <a-cr>}</a-cr><a-p>,</a-p>
<a-cr>}</a-cr></pre>
</section><div class="code-panel"><pre class="code src language-markdown"><span class="code-line"><a class="ln" id="L1" href="#L1">1</a><span class="code-text"><a-p>---</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L2" href="#L2">2</a><span class="code-text"><a-pr>tags</a-pr><a-p>:</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L3" href="#L3">3</a><span class="code-text">  <a-p>-</a-p> <a-s>appearance</a-s></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L4" href="#L4">4</a><span class="code-text">  <a-p>-</a-p> <a-s>background</a-s></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L5" href="#L5">5</a><span class="code-text"><a-p>---</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L6" href="#L6">6</a><span class="code-text"><a-p>#</a-p> <a-tt>`background`</a-tt></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L7" href="#L7">7</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L8" href="#L8">8</a><span class="code-text">{{since(&#39;20220624-141144-bd1b7c5d&#39;)}}</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L9" href="#L9">9</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L10" href="#L10">10</a><span class="code-text">The `background` config option allows you to compose a number of layers to</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L11" href="#L11">11</a><span class="code-text">produce the background content in the terminal.</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L12" href="#L12">12</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L13" href="#L13">13</a><span class="code-text">Layers can be image files, gradients or solid blocks of color. Layers composite</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L14" href="#L14">14</a><span class="code-text">over each other based on their alpha channel. Images in layers can be made to</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L15" href="#L15">15</a><span class="code-text">fill the viewport or to tile, and also to scroll with optional parallax as the</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L16" href="#L16">16</a><span class="code-text">viewport is scrolled.</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L17" href="#L17">17</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L18" href="#L18">18</a><span class="code-text">This video demonstrates the use of multiple layers to produce a rich video game</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L19" href="#L19">19</a><span class="code-text">style parallax background; the configuration used for this is shown as an</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L20" href="#L20">20</a><span class="code-text">example at the bottom of this page:</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L21" href="#L21">21</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L22" href="#L22">22</a><span class="code-text">&lt;video width=&quot;80%&quot; controls src=&quot;../../../screenshots/wezterm-parallax-2.mp4&quot; loop&gt;&lt;/video&gt;</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L23" href="#L23">23</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L24" href="#L24">24</a><span class="code-text">The `background` option is a table that lists the desired layers starting with</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L25" href="#L25">25</a><span class="code-text">the deepest/back-most layer.  Subsequent layers are composited over the top of</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L26" href="#L26">26</a><span class="code-text">preceding layers.</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L27" href="#L27">27</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L28" href="#L28">28</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L29" href="#L29">29</a><span class="code-text"><a-p>##</a-p> <a-tt>Layer Definition</a-tt></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L30" href="#L30">30</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L31" href="#L31">31</a><span class="code-text">A layer is a lua table with the following fields:</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L32" href="#L32">32</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L33" href="#L33">33</a><span class="code-text"><a-p>* </a-p>`source` - defines the source of the layer texture data. See below for source definitions</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L34" href="#L34">34</a><span class="code-text"><a-p>* </a-p>`attachment` - controls whether the layer is fixed to the viewport or moves as it scrolls. Can be:</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L35" href="#L35">35</a><span class="code-text"><a-p>    * </a-p>`&quot;Fixed&quot;` (the default) to not move as the window scrolls,</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L36" href="#L36">36</a><span class="code-text"><a-p>    * </a-p>`&quot;Scroll&quot;` to scroll 1:1 with the number of pixels scrolled in the viewport,</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L37" href="#L37">37</a><span class="code-text"><a-p>    * </a-p>`{Parallax=0.1}` to scroll 1:10 with the number of pixels scrolled in the viewport.</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L38" href="#L38">38</a><span class="code-text"><a-p>* </a-p>`repeat_x` - controls whether the image is repeated in the x-direction. Can be one of:</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L39" href="#L39">39</a><span class="code-text"><a-p>    * </a-p>`&quot;Repeat&quot;` - Repeat as much as possible to cover the area. The last image will be clipped if it doesn&#39;t fit.  This is the default.</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L40" href="#L40">40</a><span class="code-text"><a-p>    * </a-p>`&quot;Mirror&quot;` - Like `&quot;Repeat&quot;` except that the image is alternately mirrored which can make images that don&#39;t tile seamlessly look a bit better when repeated</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L41" href="#L41">41</a><span class="code-text"><a-p>    * </a-p>`&quot;NoRepeat&quot;` - the image is not repeated.</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L42" href="#L42">42</a><span class="code-text"><a-p>* </a-p>`repeat_x_size` - Normally, when repeating, the image is tiled based on its width such that each copy of the image is immediately adjacent to the preceding instance.  You may set `repeat_x_size` to a different value to increase or decrease the space between the repeated instances.  Accepts:</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L43" href="#L43">43</a><span class="code-text"><a-p>    * </a-p>number values in pixels,</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L44" href="#L44">44</a><span class="code-text"><a-p>    * </a-p>string values like `&quot;100%&quot;` to specify a size relative to the viewport,</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L45" href="#L45">45</a><span class="code-text"><a-p>    * </a-p>`&quot;10cell&quot;` to specify a size based on the terminal cell metrics.</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L46" href="#L46">46</a><span class="code-text"><a-p>* </a-p>`repeat_y` - like `repeat_x` but affects the y-direction.</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L47" href="#L47">47</a><span class="code-text"><a-p>* </a-p>`repeat_y_size` - like `repeat_x_size` but affects the y-direction.</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L48" href="#L48">48</a><span class="code-text"><a-p>* </a-p>`vertical_align` - controls the initial vertical position of the layer, relative to the viewport:</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L49" href="#L49">49</a><span class="code-text"><a-p>    * </a-p>`&quot;Top&quot;` (the default),</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L50" href="#L50">50</a><span class="code-text"><a-p>    * </a-p>`&quot;Middle&quot;`,</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L51" href="#L51">51</a><span class="code-text"><a-p>    * </a-p>`&quot;Bottom&quot;`</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L52" href="#L52">52</a><span class="code-text"><a-p>* </a-p>`vertical_offset` - specify an offset from the initial vertical position.  Accepts:</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L53" href="#L53">53</a><span class="code-text"><a-p>    * </a-p>number values in pixels,</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L54" href="#L54">54</a><span class="code-text"><a-p>    * </a-p>string values like `&quot;100%&quot;` to specify a size relative to the viewport,</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L55" href="#L55">55</a><span class="code-text"><a-p>    * </a-p>`&quot;10cell&quot;` to specify a size based on terminal cell metrics.</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L56" href="#L56">56</a><span class="code-text"><a-p>* </a-p>`horizontal_align` - controls the initial horizontal position of the layer, relative to the viewport:</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L57" href="#L57">57</a><span class="code-text"><a-p>    * </a-p>`&quot;Left&quot;` (the default),</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L58" href="#L58">58</a><span class="code-text"><a-p>    * </a-p>`&quot;Center&quot;`</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L59" href="#L59">59</a><span class="code-text"><a-p>    * </a-p>`&quot;Right&quot;`</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L60" href="#L60">60</a><span class="code-text"><a-p>* </a-p>`horizontal_offset` - like `vertical_offset` but applies to the x-direction.</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L61" href="#L61">61</a><span class="code-text"><a-p>* </a-p>`opacity` - a number in the range `0` through `1.0` inclusive that is multiplied with the alpha channel of the source to adjust the opacity of the layer. The default is `1.0` to use the source alpha channel as-is. Using a smaller value makes the layer less opaque/more transparent.</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L62" href="#L62">62</a><span class="code-text"><a-p>* </a-p>`hsb` - a hue, saturation, brightness transformation that can be used to adjust those attributes of the layer. See [foreground_text_hsb](foreground_text_hsb.md) for more information about this kind of transform.</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L63" href="#L63">63</a><span class="code-text"><a-p>* </a-p>`height` - controls the height of the image. The following values are accepted:</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L64" href="#L64">64</a><span class="code-text"><a-p>    * </a-p>`&quot;Cover&quot;` (this is the default) - Scales the image, preserving aspect ratio, to the smallest possible size to fill the viewport, leaving no empty space.  If the aspect ratio of the viewport differs from the image, the image is cropped.</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L65" href="#L65">65</a><span class="code-text"><a-p>    * </a-p>`&quot;Contain&quot;` - Scales the image as large as possible without cropping or stretching. If the viewport is larger than the image, tiles the image unless `repeat_y` is set to `&quot;NoRepeat&quot;`.</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L66" href="#L66">66</a><span class="code-text"><a-p>    * </a-p>`123` - specifies a height of `123` pixels</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L67" href="#L67">67</a><span class="code-text"><a-p>    * </a-p>`&quot;50%&quot;` - specifies a size of `50%` of the viewport height</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L68" href="#L68">68</a><span class="code-text"><a-p>    * </a-p>`&quot;2cell&quot;` - specifies a size equivalent to `2` rows</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L69" href="#L69">69</a><span class="code-text"><a-p>* </a-p>`width` - controls the width of the image. Same details as `height` but applies to the x-direction.</span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L70" href="#L70">70</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L71" href="#L71">71</a><span class="code-text"><a-p>## </a-p><a-tt>Source Definition</a-tt></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L72" href="#L72">72</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L73" href="#L73">73</a><span class="code-text"><a-p>A source can be one of the following:</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L74" href="#L74">74</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L75" href="#L75">75</a><span class="code-text"><a-p>* `{File=&quot;/path/to/file.png&quot;}` - load the specified image file.  PNG, JPEG,</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L76" href="#L76">76</a><span class="code-text"><a-p>  GIF, BMP, ICO, TIFF, PNM, DDS, TGA and farbfeld files can be loaded.</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L77" href="#L77">77</a><span class="code-text"><a-p>  Animated GIF and PNG files will animate while the window has focus.</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L78" href="#L78">78</a><span class="code-text"><a-p>* `{File={path=&quot;/path/to/anim.gif&quot;, speed=0.2}}` - load the specified image file, which is an animated gif, and adjust the animation speed to 0.2 times its normal speed.</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L79" href="#L79">79</a><span class="code-text"><a-p>* `{Gradient={preset=&quot;Warm&quot;}}` - generate a gradient. The gradient definitions</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L80" href="#L80">80</a><span class="code-text"><a-p>  are the same as those allowed for [window_background_gradient](window_background_gradient.md).</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L81" href="#L81">81</a><span class="code-text"><a-p>* `{Color=&quot;black&quot;}` - generate an image with the specified color.</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L82" href="#L82">82</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L83" href="#L83">83</a><span class="code-text"><a-p>## </a-p><a-tt>Relationship with other config options</a-tt></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L84" href="#L84">84</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L85" href="#L85">85</a><span class="code-text"><a-p>Specifying the following options:</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L86" href="#L86">86</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L87" href="#L87">87</a><span class="code-text"><a-p>* `window_background_gradient`</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L88" href="#L88">88</a><span class="code-text"><a-p>* `window_background_image`</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L89" href="#L89">89</a><span class="code-text"><a-p>* `window_background_opacity`</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L90" href="#L90">90</a><span class="code-text"><a-p>* `window_background_image_hsb`</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L91" href="#L91">91</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L92" href="#L92">92</a><span class="code-text"><a-p>will implicitly prepend a layer to the `background` configuration with width</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L93" href="#L93">93</a><span class="code-text"><a-p>and height set to 100%.</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L94" href="#L94">94</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L95" href="#L95">95</a><span class="code-text"><a-p>It is recommended that you migrate to the newer `background` rather than mixing</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L96" href="#L96">96</a><span class="code-text"><a-p>both the older and the newer configuration options.</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L97" href="#L97">97</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L98" href="#L98">98</a><span class="code-text"><a-p>## </a-p><a-tt>Parallax Example</a-tt></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L99" href="#L99">99</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L100" href="#L100">100</a><span class="code-text"><a-p>This example uses these [Alien Space Ship Background - Parallax -</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L101" href="#L101">101</a><span class="code-text"><a-p>Repeatable</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L102" href="#L102">102</a><span class="code-text"><a-p>(Vertical)](https://www.gameartguppy.com/shop/space-ship-background-repeatable-vertical/)</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L103" href="#L103">103</a><span class="code-text"><a-p>assets to demonstrate most of the available features of `background`. That asset pack includes a background layer and a number of overlays. The overlays are positioned at varying offsets with differing parallax to provide a greater sense of depth.</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L104" href="#L104">104</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L105" href="#L105">105</a><span class="code-text"><a-p>The video at the top of this page demonstrate this configuration in action.</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L106" href="#L106">106</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L107" href="#L107">107</a><span class="code-text"><a-p>```</a-p><a-tl>lua</a-tl></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L108" href="#L108">108</a><span class="code-text"><a-p>-- The art is a bit too bright and colorful to be useful as a backdrop</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L109" href="#L109">109</a><span class="code-text"><a-p>-- for text, so we&#39;re going to dim it down to 10% of its normal brightness</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L110" href="#L110">110</a><span class="code-text"><a-p>local </a-p><a-v>dimmer</a-v><a-p> = </a-p><a-cr>{</a-cr><a-p> </a-p><a-v>brightness</a-v><a-p> = </a-p><a-n>0.1</a-n><a-p> </a-p><a-cr>}</a-cr></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L111" href="#L111">111</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L112" href="#L112">112</a><span class="code-text"><a-p>config.</a-p><a-v>enable_scroll_bar</a-v><a-p> = </a-p><a-co>true</a-co></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L113" href="#L113">113</a><span class="code-text"><a-p>config.</a-p><a-v>min_scroll_bar_height</a-v><a-p> = </a-p><a-s>&#39;2cell&#39;</a-s></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L114" href="#L114">114</a><span class="code-text"><a-p>config.</a-p><a-v>colors</a-v><a-p> = </a-p><a-cr>{</a-cr></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L115" href="#L115">115</a><span class="code-text"><a-p>  </a-p><a-v>scrollbar_thumb</a-v><a-p> = </a-p><a-s>&#39;white&#39;</a-s><a-p>,</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L116" href="#L116">116</a><span class="code-text"><a-p>}</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L117" href="#L117">117</a><span class="code-text"><a-p>config.</a-p><a-v>background</a-v><a-p> = </a-p><a-cr>{</a-cr></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L118" href="#L118">118</a><span class="code-text"><a-p>  </a-p><a-c>-- This is the deepest/back-most layer. It will be rendered first</a-c></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L119" href="#L119">119</a><span class="code-text"><a-p>  </a-p><a-cr>{</a-cr></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L120" href="#L120">120</a><span class="code-text"><a-p>    </a-p><a-v>source</a-v><a-p> = </a-p><a-cr>{</a-cr></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L121" href="#L121">121</a><span class="code-text"><a-p>      </a-p><a-v>File</a-v><a-p> = </a-p><a-s>&#39;/Alien_Ship_bg_vert_images/Backgrounds/spaceship_bg_1.png&#39;</a-s><a-p>,</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L122" href="#L122">122</a><span class="code-text"><a-p>    </a-p><a-cr>}</a-cr><a-p>,</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L123" href="#L123">123</a><span class="code-text"><a-p>    </a-p><a-c>-- The texture tiles vertically but not horizontally.</a-c></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L124" href="#L124">124</a><span class="code-text"><a-p>    </a-p><a-c>-- When we repeat it, mirror it so that it appears &quot;more seamless&quot;.</a-c></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L125" href="#L125">125</a><span class="code-text"><a-p>    </a-p><a-c>-- An alternative to this is to set `width = &quot;100%&quot;` and have</a-c></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L126" href="#L126">126</a><span class="code-text"><a-p>    </a-p><a-c>-- it stretch across the display</a-c></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L127" href="#L127">127</a><span class="code-text"><a-p>    </a-p><a-v>repeat_x</a-v><a-p> = </a-p><a-s>&#39;Mirror&#39;</a-s><a-p>,</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L128" href="#L128">128</a><span class="code-text"><a-p>    </a-p><a-v>hsb</a-v><a-p> = </a-p><a-v>dimmer</a-v><a-p>,</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L129" href="#L129">129</a><span class="code-text"><a-p>    </a-p><a-c>-- When the viewport scrolls, move this layer 10% of the number of</a-c></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L130" href="#L130">130</a><span class="code-text"><a-p>    </a-p><a-c>-- pixels moved by the main viewport. This makes it appear to be</a-c></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L131" href="#L131">131</a><span class="code-text"><a-p>    </a-p><a-c>-- further behind the text.</a-c></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L132" href="#L132">132</a><span class="code-text"><a-p>    </a-p><a-v>attachment</a-v><a-p> = </a-p><a-cr>{</a-cr><a-p> </a-p><a-v>Parallax</a-v><a-p> = </a-p><a-n>0.1</a-n><a-p> </a-p><a-cr>}</a-cr><a-p>,</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L133" href="#L133">133</a><span class="code-text"><a-p>  </a-p><a-cr>}</a-cr><a-p>,</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L134" href="#L134">134</a><span class="code-text"><a-p>  </a-p><a-c>-- Subsequent layers are rendered over the top of each other</a-c></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L135" href="#L135">135</a><span class="code-text"><a-p>  </a-p><a-cr>{</a-cr></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L136" href="#L136">136</a><span class="code-text"><a-p>    </a-p><a-v>source</a-v><a-p> = </a-p><a-cr>{</a-cr></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L137" href="#L137">137</a><span class="code-text"><a-p>      </a-p><a-v>File</a-v><a-p> = </a-p><a-s>&#39;/Alien_Ship_bg_vert_images/Overlays/overlay_1_spines.png&#39;</a-s><a-p>,</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L138" href="#L138">138</a><span class="code-text"><a-p>    </a-p><a-cr>}</a-cr><a-p>,</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L139" href="#L139">139</a><span class="code-text"><a-p>    </a-p><a-v>width</a-v><a-p> = </a-p><a-s>&#39;100%&#39;</a-s><a-p>,</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L140" href="#L140">140</a><span class="code-text"><a-p>    </a-p><a-v>repeat_x</a-v><a-p> = </a-p><a-s>&#39;NoRepeat&#39;</a-s><a-p>,</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L141" href="#L141">141</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L142" href="#L142">142</a><span class="code-text"><a-p>    </a-p><a-c>-- position the spins starting at the bottom, and repeating every</a-c></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L143" href="#L143">143</a><span class="code-text"><a-p>    </a-p><a-c>-- two screens.</a-c></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L144" href="#L144">144</a><span class="code-text"><a-p>    </a-p><a-v>vertical_align</a-v><a-p> = </a-p><a-s>&#39;Bottom&#39;</a-s><a-p>,</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L145" href="#L145">145</a><span class="code-text"><a-p>    </a-p><a-v>repeat_y_size</a-v><a-p> = </a-p><a-s>&#39;200%&#39;</a-s><a-p>,</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L146" href="#L146">146</a><span class="code-text"><a-p>    </a-p><a-v>hsb</a-v><a-p> = </a-p><a-v>dimmer</a-v><a-p>,</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L147" href="#L147">147</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L148" href="#L148">148</a><span class="code-text"><a-p>    </a-p><a-c>-- The parallax factor is higher than the background layer, so this</a-c></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L149" href="#L149">149</a><span class="code-text"><a-p>    </a-p><a-c>-- one will appear to be closer when we scroll</a-c></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L150" href="#L150">150</a><span class="code-text"><a-p>    </a-p><a-v>attachment</a-v><a-p> = </a-p><a-cr>{</a-cr><a-p> </a-p><a-v>Parallax</a-v><a-p> = </a-p><a-n>0.2</a-n><a-p> </a-p><a-cr>}</a-cr><a-p>,</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L151" href="#L151">151</a><span class="code-text"><a-p>  </a-p><a-cr>}</a-cr><a-p>,</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L152" href="#L152">152</a><span class="code-text"><a-p>  </a-p><a-cr>{</a-cr></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L153" href="#L153">153</a><span class="code-text"><a-p>    </a-p><a-v>source</a-v><a-p> = </a-p><a-cr>{</a-cr></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L154" href="#L154">154</a><span class="code-text"><a-p>      </a-p><a-v>File</a-v><a-p> = </a-p><a-s>&#39;/Alien_Ship_bg_vert_images/Overlays/overlay_2_alienball.png&#39;</a-s><a-p>,</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L155" href="#L155">155</a><span class="code-text"><a-p>    </a-p><a-cr>}</a-cr><a-p>,</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L156" href="#L156">156</a><span class="code-text"><a-p>    </a-p><a-v>width</a-v><a-p> = </a-p><a-s>&#39;100%&#39;</a-s><a-p>,</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L157" href="#L157">157</a><span class="code-text"><a-p>    </a-p><a-v>repeat_x</a-v><a-p> = </a-p><a-s>&#39;NoRepeat&#39;</a-s><a-p>,</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L158" href="#L158">158</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L159" href="#L159">159</a><span class="code-text"><a-p>    </a-p><a-c>-- start at 10% of the screen and repeat every 2 screens</a-c></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L160" href="#L160">160</a><span class="code-text"><a-p>    </a-p><a-v>vertical_offset</a-v><a-p> = </a-p><a-s>&#39;10%&#39;</a-s><a-p>,</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L161" href="#L161">161</a><span class="code-text"><a-p>    </a-p><a-v>repeat_y_size</a-v><a-p> = </a-p><a-s>&#39;200%&#39;</a-s><a-p>,</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L162" href="#L162">162</a><span class="code-text"><a-p>    </a-p><a-v>hsb</a-v><a-p> = </a-p><a-v>dimmer</a-v><a-p>,</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L163" href="#L163">163</a><span class="code-text"><a-p>    </a-p><a-v>attachment</a-v><a-p> = </a-p><a-cr>{</a-cr><a-p> </a-p><a-v>Parallax</a-v><a-p> = </a-p><a-n>0.3</a-n><a-p> </a-p><a-cr>}</a-cr><a-p>,</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L164" href="#L164">164</a><span class="code-text"><a-p>  </a-p><a-cr>}</a-cr><a-p>,</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L165" href="#L165">165</a><span class="code-text"><a-p>  </a-p><a-cr>{</a-cr></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L166" href="#L166">166</a><span class="code-text"><a-p>    </a-p><a-v>source</a-v><a-p> = </a-p><a-cr>{</a-cr></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L167" href="#L167">167</a><span class="code-text"><a-p>      </a-p><a-v>File</a-v><a-p> = </a-p><a-s>&#39;/Alien_Ship_bg_vert_images/Overlays/overlay_3_lobster.png&#39;</a-s><a-p>,</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L168" href="#L168">168</a><span class="code-text"><a-p>    </a-p><a-cr>}</a-cr><a-p>,</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L169" href="#L169">169</a><span class="code-text"><a-p>    </a-p><a-v>width</a-v><a-p> = </a-p><a-s>&#39;100%&#39;</a-s><a-p>,</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L170" href="#L170">170</a><span class="code-text"><a-p>    </a-p><a-v>repeat_x</a-v><a-p> = </a-p><a-s>&#39;NoRepeat&#39;</a-s><a-p>,</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L171" href="#L171">171</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L172" href="#L172">172</a><span class="code-text"><a-p>    </a-p><a-v>vertical_offset</a-v><a-p> = </a-p><a-s>&#39;30%&#39;</a-s><a-p>,</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L173" href="#L173">173</a><span class="code-text"><a-p>    </a-p><a-v>repeat_y_size</a-v><a-p> = </a-p><a-s>&#39;200%&#39;</a-s><a-p>,</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L174" href="#L174">174</a><span class="code-text"><a-p>    </a-p><a-v>hsb</a-v><a-p> = </a-p><a-v>dimmer</a-v><a-p>,</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L175" href="#L175">175</a><span class="code-text"><a-p>    </a-p><a-v>attachment</a-v><a-p> = </a-p><a-cr>{</a-cr><a-p> </a-p><a-v>Parallax</a-v><a-p> = </a-p><a-n>0.4</a-n><a-p> </a-p><a-cr>}</a-cr><a-p>,</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L176" href="#L176">176</a><span class="code-text"><a-p>  </a-p><a-cr>}</a-cr><a-p>,</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L177" href="#L177">177</a><span class="code-text"><a-p>  </a-p><a-cr>{</a-cr></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L178" href="#L178">178</a><span class="code-text"><a-p>    </a-p><a-v>source</a-v><a-p> = </a-p><a-cr>{</a-cr></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L179" href="#L179">179</a><span class="code-text"><a-p>      </a-p><a-v>File</a-v><a-p> = </a-p><a-s>&#39;/Alien_Ship_bg_vert_images/Overlays/overlay_4_spiderlegs.png&#39;</a-s><a-p>,</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L180" href="#L180">180</a><span class="code-text"><a-p>    </a-p><a-cr>}</a-cr><a-p>,</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L181" href="#L181">181</a><span class="code-text"><a-p>    </a-p><a-v>width</a-v><a-p> = </a-p><a-s>&#39;100%&#39;</a-s><a-p>,</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L182" href="#L182">182</a><span class="code-text"><a-p>    </a-p><a-v>repeat_x</a-v><a-p> = </a-p><a-s>&#39;NoRepeat&#39;</a-s><a-p>,</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L183" href="#L183">183</a><span class="code-text"></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L184" href="#L184">184</a><span class="code-text"><a-p>    </a-p><a-v>vertical_offset</a-v><a-p> = </a-p><a-s>&#39;50%&#39;</a-s><a-p>,</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L185" href="#L185">185</a><span class="code-text"><a-p>    </a-p><a-v>repeat_y_size</a-v><a-p> = </a-p><a-s>&#39;150%&#39;</a-s><a-p>,</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L186" href="#L186">186</a><span class="code-text"><a-p>    </a-p><a-v>hsb</a-v><a-p> = </a-p><a-v>dimmer</a-v><a-p>,</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L187" href="#L187">187</a><span class="code-text"><a-p>    </a-p><a-v>attachment</a-v><a-p> = </a-p><a-cr>{</a-cr><a-p> </a-p><a-v>Parallax</a-v><a-p> = </a-p><a-n>0.5</a-n><a-p> </a-p><a-cr>}</a-cr><a-p>,</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L188" href="#L188">188</a><span class="code-text"><a-p>  </a-p><a-cr>}</a-cr><a-p>,</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L189" href="#L189">189</a><span class="code-text"><a-p>}</a-p></span><span class="code-break">
</span></span><span class="code-line"><a class="ln" id="L190" href="#L190">190</a><span class="code-text"><a-p>```</a-p></span></span></pre></div></div>
</main>
</body>
</html>
