Skip to content

Commit

Permalink
updated site
Browse files Browse the repository at this point in the history
  • Loading branch information
davesmith00000 committed Apr 30, 2024
1 parent d459d38 commit 0c73e00
Show file tree
Hide file tree
Showing 1,110 changed files with 685,678 additions and 1,710,461 deletions.
72,483 changes: 10,565 additions & 61,918 deletions 01-quickstart/hello-indigo.md.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion 01-quickstart/hello-indigo/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ <h3 id="adding-interaction" class="section"><a class="anchor-link left" href="#a
<pre><code class="nohighlight"><span class="keyword">def</span><span> </span><span class="declaration-name">drawDots</span><span>(
</span><span class="identifier">center</span><span>: </span><span class="type-name">Point</span><span>,
</span><span class="identifier">dots</span><span>: </span><span class="type-name">Batch</span><span>[</span><span class="type-name">Dot</span><span>]
): </span><span class="type-name">Batch</span><span>[</span><span class="type-name">Graphic</span><span>[</span><span class="identifier">_</span><span>]] =
): </span><span class="type-name">Batch</span><span>[</span><span class="type-name">Graphic</span><span>[?]] =
</span><span class="identifier">dots</span><span>.</span><span class="identifier">map</span><span> { </span><span class="identifier">dot</span><span> =&gt;
</span><span class="keyword">val</span><span> </span><span class="identifier">position</span><span> = </span><span class="type-name">Point</span><span>(
</span><span class="identifier">x</span><span> = (</span><span class="type-name">Math</span><span>.</span><span class="identifier">sin</span><span>(</span><span class="identifier">dot</span><span>.</span><span class="identifier">angle</span><span>.</span><span class="identifier">toDouble</span><span>) * </span><span class="identifier">dot</span><span>.</span><span class="identifier">orbitDistance</span><span> + </span><span class="identifier">center</span><span>.</span><span class="identifier">x</span><span>).</span><span class="identifier">toInt</span><span>,
Expand Down
50 changes: 25 additions & 25 deletions 01-quickstart/quickstart/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion 02-guides/howto-custom-entity/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@ <h3 id="filling-the-space-with-color" class="section"><a class="anchor-link left
<p>To use this shiny new entity, we have to do two things:</p>
<p>First, tell indigo about the new shader:</p>
<p>In the sandbox this would be a game field just like assets and fonts, i.e. <code>val shaders: Set[Shader] = Set(MyColoredEntity.shader)</code>, and there is an equivalent for the <code>BootResult</code> type as follows:</p>
<pre class="keep-together pdf epub"><code class="nohighlight"><span class="keyword">def</span><span> </span><span class="declaration-name">boot</span><span>(</span><span class="identifier">flags</span><span>: </span><span class="type-name">Map</span><span>[</span><span class="type-name">String</span><span>, </span><span class="type-name">String</span><span>]): </span><span class="type-name">Outcome</span><span>[</span><span class="type-name">BootResult</span><span>[</span><span class="type-name">Unit</span><span>]] =
<pre class="keep-together pdf epub"><code class="nohighlight"><span class="keyword">def</span><span> </span><span class="declaration-name">boot</span><span>(</span><span class="identifier">flags</span><span>: </span><span class="type-name">Map</span><span>[</span><span class="type-name">String</span><span>, </span><span class="type-name">String</span><span>]): </span><span class="type-name">Outcome</span><span>[</span><span class="type-name">BootResult</span><span>[</span><span class="type-name">Unit</span><span>, </span><span class="type-name">Unit</span><span>]] =
</span><span class="type-name">Outcome</span><span>(
</span><span class="type-name">BootResult</span><span>
.</span><span class="identifier">noData</span><span>(</span><span class="type-name">GameConfig</span><span>.</span><span class="keyword">default</span><span>)
Expand Down
78,267 changes: 13,499 additions & 64,768 deletions 02-guides/howto-fire-shader.md.js

Large diffs are not rendered by default.

89,703 changes: 19,215 additions & 70,488 deletions 03-gameloop/outcome.md.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion 03-gameloop/outcome/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ <h3 id="basic-operations" class="section"><a class="anchor-link left" href="#bas
</span><span class="type-name">Outcome</span><span>(</span><span class="number-literal">10</span><span>).</span><span class="identifier">ap</span><span>(</span><span class="type-name">Outcome</span><span>((</span><span class="identifier">i</span><span>: </span><span class="type-name">Int</span><span>) =&gt; </span><span class="identifier">i</span><span> * </span><span class="number-literal">5</span><span>)) </span><span class="comment">// Outcome(50)
</span><span class="type-name">Outcome</span><span>(</span><span class="number-literal">10</span><span>).</span><span class="identifier">flatMap</span><span>(</span><span class="identifier">i</span><span> =&gt; </span><span class="type-name">Outcome</span><span>(</span><span class="identifier">i</span><span> * </span><span class="number-literal">20</span><span>)) </span><span class="comment">// Outcome(200)
</span><span class="type-name">Outcome</span><span>(</span><span class="number-literal">10</span><span>).</span><span class="identifier">merge</span><span>(</span><span class="type-name">Outcome</span><span>(</span><span class="number-literal">20</span><span>))(</span><span class="identifier">_</span><span> + </span><span class="identifier">_</span><span>) </span><span class="comment">// Outcome(30)
</span><span class="type-name">Outcome</span><span>(</span><span class="string-literal">&quot;a&quot;</span><span>) </span><span class="identifier">combine</span><span> </span><span class="type-name">Outcome</span><span>(</span><span class="string-literal">&quot;b&quot;</span><span>) </span><span class="comment">// Outcome((&quot;a&quot;, &quot;b&quot;))</span></code></pre>
</span><span class="type-name">Outcome</span><span>(</span><span class="string-literal">&quot;a&quot;</span><span>) </span><span class="identifier">`combine`</span><span> </span><span class="type-name">Outcome</span><span>(</span><span class="string-literal">&quot;b&quot;</span><span>) </span><span class="comment">// Outcome((&quot;a&quot;, &quot;b&quot;))</span></code></pre>
<div id="mdoc-html-run2" data-mdoc-js></div>
<p>As mentioned, <code>Outcome</code>&#39;s map function is bias towards the state, but you can also modify the events with <code>mapGlobalEvents</code>.</p>
<p>Sequencing can be done as follows:</p>
Expand Down
Loading

0 comments on commit 0c73e00

Please sign in to comment.