Skip to content

Add docs in to master #89

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49,823 changes: 49,823 additions & 0 deletions docs/all-deps.js

Large diffs are not rendered by default.

229 changes: 229 additions & 0 deletions docs/api/Reprocessing.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,229 @@


<!doctype html>
<meta charset=utf8>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel=stylesheet href='../styles.css'>
<script defer src='../script.js'></script>
<title>Reprocessing</title>
<body>
<script>window.relativeToRoot=".."</script>
<script defer src="../block-script.js"></script>
<div id='error-message'>
⚠️ Oops! This page doesn't appear to define a <span>type</span> called <code>_</code>.
</div>

<script>window.shouldCheckHashes=true</script>
<div class='container'>

<div class='sidebar-wrapper'>
<div class='sidebar-expander'>Show navigation</div>
<div class='sidebar'>
<a href="../search.html" style="display: block; padding: 0 8px;">Search</a>
<div class='docs-listing'><a href="../index.html">Home</a>
<a href="../fonts/LICENSE.html">LICENSE</a></div>
<div class='toc-header'>Page Contents</div>
<div class='table-of-contents'>
<a href="#Reprocessing" class='level-1 header'>Reprocessing</a>
<a href="#The-Run-Function" class='level-2 header'>The Run Function</a>
<a href="#value-run" class='level-3 value'>run</a>
<a href="#Hot-reloading" class='level-2 header'>Hot reloading</a>
<a href="#value-hotreload" class='level-3 value'>hotreload</a>
<a href="#Misc-helpers" class='level-2 header'>Misc helpers</a>
<a href="#module-Utils" class='level-3 module'>Utils</a>
<a href="#module-Constants" class='level-3 module'>Constants</a>
<a href="#module-Draw" class='level-3 module'>Draw</a>
<a href="#module-Env" class='level-3 module'>Env</a>
<a href="#module-Events" class='level-3 module'>Events</a>
<a href="#Handling-Multiple-Canvases" class='level-2 header'>Handling Multiple Canvases</a>
<a href="#value-setScreenId" class='level-3 value'>setScreenId</a>
<a href="#value-clearScreenId" class='level-3 value'>clearScreenId</a>
<a href="#value-playPause" class='level-3 value'>playPause</a>
<a href="#type-glEnvT" class='level-3 type'>glEnvT</a>
<a href="#type-colorT" class='level-3 type'>colorT</a>
<a href="#type-imageT" class='level-3 type'>imageT</a>
<a href="#type-fontT" class='level-3 type'>fontT</a>
<a href="#type-strokeCapT" class='level-3 type'>strokeCapT</a>
<a href="#type-rectModeT" class='level-3 type'>rectModeT</a>
<a href="#type-soundT" class='level-3 type'>soundT</a>
</div>
<div class='project-title'>Package modules</div><div class='project-listing'><a href="Reprocessing.html">Reprocessing</a>
<a href="Reprocessing_Common.html">Reprocessing_Common</a>
<a href="Reprocessing_Constants.html">Reprocessing_Constants</a>
<a href="Reprocessing_DefaultFont.html">Reprocessing_DefaultFont</a>
<a href="Reprocessing_Draw.html">Reprocessing_Draw</a>
<a href="Reprocessing_Env.html">Reprocessing_Env</a>
<a href="Reprocessing_Events.html">Reprocessing_Events</a>
<a href="Reprocessing_Font.html">Reprocessing_Font</a>
<a href="Reprocessing_Hotreload.html">Reprocessing_Hotreload</a>
<a href="Reprocessing_Internal.html">Reprocessing_Internal</a>
<a href="Reprocessing_Matrix.html">Reprocessing_Matrix</a>
<a href="Reprocessing_Shaders.html">Reprocessing_Shaders</a>
<a href="Reprocessing_Types.html">Reprocessing_Types</a>
<a href="Reprocessing_Utils.html">Reprocessing_Utils</a></div>
</div>
</div>

<div class='main'>
<a href="https://github.com/schmavery/reprocessing/blob/master/src/Reprocessing.rei" class="edit-link">Edit</a>
<a href="#Reprocessing" id="Reprocessing"><h1>Reprocessing</h1></a>

<a href="#The-Run-Function" id="The-Run-Function"><h2>The Run Function</h2></a>

<p>This is how all of your programs start. At minimum you need a setup function, but it also doesn&#39;t make much sense to not have a draw function.</p>
<div class='doc-item'><h4 class='item'>let <a href="#value-run" id="value-run">run</a> = (
~setup: <a href="#type-glEnvT">glEnvT</a> => 'a,
~?screen: option(string),
~?draw: option(('a, <a href="#type-glEnvT">glEnvT</a>) => 'a),
~?mouseMove: option(('a, <a href="#type-glEnvT">glEnvT</a>) => 'a),
~?mouseDragged: option(('a, <a href="#type-glEnvT">glEnvT</a>) => 'a),
~?mouseDown: option(('a, <a href="#type-glEnvT">glEnvT</a>) => 'a),
~?mouseUp: option(('a, <a href="#type-glEnvT">glEnvT</a>) => 'a),
~?keyPressed: option(('a, <a href="#type-glEnvT">glEnvT</a>) => 'a),
~?keyReleased: option(('a, <a href="#type-glEnvT">glEnvT</a>) => 'a),
~?keyTyped: option(('a, <a href="#type-glEnvT">glEnvT</a>) => 'a),
unit
) => unit</h4>

<div class='body body-empty'></div></div><a href="#Hot-reloading" id="Hot-reloading"><h2>Hot reloading</h2></a>

<p>Put the following in an <code>indexhot.re</code></p>
<div class='code-block' data-block-syntax="re">

<pre class='code' data-block-id='10' id='block-10'><code><span class='ident' data-type="(~?screen: option(string), string) => bool">Reprocessing.hotreload</span>(<span class='string' data-type="string">&quot;./index.re&quot;</span>)</code></pre>

<script type='docre-source' data-block-id="10">#open Reprocessing;
Reprocessing.hotreload("./index.re")</script>

</div><div class='code-block' data-block-syntax="ml">

<pre class='code' data-block-id='10-alt' id='block-10-alt'><code>[@@@ocaml.ppx.context { cookies = [] }]
open Reprocessing
let _ = <span class='ident' data-type="(~?screen: option(string), string) => bool">Reprocessing.hotreload</span> <span class='string' data-type="string">&quot;./index.re&quot;</span></code></pre>

<script type='docre-source' data-block-id="10-alt">[@@@ocaml.ppx.context { cookies = [] }]
open Reprocessing
let _ = Reprocessing.hotreload "./index.re"</script>

</div>

<div class='doc-item'><h4 class='item'>let <a href="#value-hotreload" id="value-hotreload">hotreload</a> = (~?screen: option(string), string) => bool</h4>

<div class='body body-empty'></div></div><a href="#Misc-helpers" id="Misc-helpers"><h2>Misc helpers</h2></a>

<p>The following modules are included here as a psuedo namespacing function. It is common to <code>open Reprocessing</code> and then access them as <code>Draw.rect</code>, etc.</p>
<div class='doc-item'><h4 class='item module'>module <a href="#module-Utils" id="module-Utils">Utils</a> : <a href="Reprocessing_Utils.html">Reprocessing_Utils</a></h4></div>

<div class='doc-item'><h4 class='item module'>module <a href="#module-Constants" id="module-Constants">Constants</a> : <a href="Reprocessing_Constants.html">Reprocessing_Constants</a></h4></div>

<div class='doc-item'><h4 class='item module'>module <a href="#module-Draw" id="module-Draw">Draw</a> : <a href="Reprocessing_Draw.html">Reprocessing_Draw</a></h4></div>

<div class='doc-item'><h4 class='item module'>module <a href="#module-Env" id="module-Env">Env</a> : <a href="Reprocessing_Env.html">Reprocessing_Env</a></h4></div>

<div class='doc-item'><h4 class='item module'>module <a href="#module-Events" id="module-Events">Events</a> : <a href="Reprocessing_Events.html">Reprocessing_Events</a></h4></div><a href="#Handling-Multiple-Canvases" id="Handling-Multiple-Canvases"><h2>Handling Multiple Canvases</h2></a>

<p>(only supported on web target)</p>
<div class='doc-item'><h4 class='item'>let <a href="#value-setScreenId" id="value-setScreenId">setScreenId</a> = string => unit</h4>

<div class='body '><p>Set the ID that will be used by subsequent calls to <code>run()</code> that don&#39;t have an explicitly-passed <code>~screen</code>.</p>
<p>If a canvas exists on the document with the given ID, then that canvas will be used. Otherwise a canvas will be created &amp; appended to the body.</p>
<div class='code-block' data-block-syntax="re">

<pre class='code' data-block-id='9' id='block-9'><code><span class='ident' data-type="string => unit">Reprocessing.setScreenId</span>(<span class='string' data-type="string">&quot;my-fancy-id&quot;</span>);
/* This will render to the canvas with id &quot;my-fancy-id&quot; */
<span class='ident' data-type="(
~setup: Reprocessing.glEnvT => 'a,
~?screen: option(string),
~?draw: option(('a, Reprocessing.glEnvT) => 'a),
~?mouseMove: option(('a, Reprocessing.glEnvT) => 'a),
~?mouseDragged: option(('a, Reprocessing.glEnvT) => 'a),
~?mouseDown: option(('a, Reprocessing.glEnvT) => 'a),
~?mouseUp: option(('a, Reprocessing.glEnvT) => 'a),
~?keyPressed: option(('a, Reprocessing.glEnvT) => 'a),
~?keyReleased: option(('a, Reprocessing.glEnvT) => 'a),
~?keyTyped: option(('a, Reprocessing.glEnvT) => 'a),
unit
) => unit">Reprocessing.run</span>(~<span class='ident' data-type="Reprocessing.glEnvT => 'a">setup</span>, ~<span class='ident' data-type="('a, Reprocessing.glEnvT) => 'a">draw</span>, <span class='constructor' data-type="unit">()</span>);</code></pre>

<script type='docre-source' data-block-id="9">#open Reprocessing;
# let _ = (setup, draw) => {
Reprocessing.setScreenId("my-fancy-id");
/* This will render to the canvas with id "my-fancy-id" */
Reprocessing.run(~setup, ~draw, ());
# }</script>

</div><div class='code-block' data-block-syntax="ml">

<pre class='code' data-block-id='9-alt' id='block-9-alt'><code>[@@@ocaml.ppx.context { cookies = [] }]
open Reprocessing
let _ =
fun <span class='pattern-ident' data-type="Reprocessing.glEnvT => 'a">setup</span> -&gt;
fun <span class='pattern-ident' data-type="('a, Reprocessing.glEnvT) => 'a">draw</span> -&gt;
<span class='ident' data-type="string => unit">Reprocessing.setScreenId</span> <span class='string' data-type="string">&quot;my-fancy-id&quot;</span>;
<span class='ident' data-type="(
~setup: Reprocessing.glEnvT => 'a,
~?screen: option(string),
~?draw: option(('a, Reprocessing.glEnvT) => 'a),
~?mouseMove: option(('a, Reprocessing.glEnvT) => 'a),
~?mouseDragged: option(('a, Reprocessing.glEnvT) => 'a),
~?mouseDown: option(('a, Reprocessing.glEnvT) => 'a),
~?mouseUp: option(('a, Reprocessing.glEnvT) => 'a),
~?keyPressed: option(('a, Reprocessing.glEnvT) => 'a),
~?keyReleased: option(('a, Reprocessing.glEnvT) => 'a),
~?keyTyped: option(('a, Reprocessing.glEnvT) => 'a),
unit
) => unit">Reprocessing.run</span> ~<span class='ident' data-type="Reprocessing.glEnvT => 'a">setup</span> ~<span class='ident' data-type="('a, Reprocessing.glEnvT) => 'a">draw</span> <span class='constructor' data-type="unit">()</span></code></pre>

<script type='docre-source' data-block-id="9-alt">[@@@ocaml.ppx.context { cookies = [] }]
open Reprocessing
let _ =
fun setup ->
fun draw ->
Reprocessing.setScreenId "my-fancy-id";
Reprocessing.run ~setup ~draw ()</script>

</div></div></div>

<div class='doc-item'><h4 class='item'>let <a href="#value-clearScreenId" id="value-clearScreenId">clearScreenId</a> = unit => unit</h4>

<div class='body body-empty'></div></div>

<div class='doc-item'><h4 class='item'>let <a href="#value-playPause" id="value-playPause">playPause</a> = (string, bool) => option(bool)</h4>

<div class='body '><p>Play/pause the screen specified by the given ID. If you pass true, it will try to play it, otherwise pause.</p>
<p>The return value indicates the status:</p>
<ul><li>None: no screen found</li><li>Some(true): the screen is (now/still) playing</li><li>Some(false): the screen is (now/still) paused</li></ul>

<p>Calling this function will not necessarily change the state. Inspect the result to determine success.</p>
</div></div><div class='doc-item'><h4 class='item module'>include Reprocessing_Types.TypesT</h4><div class='body module-body include-body'><div class='doc-item'><h4 class='item'>type <a href="#type-glEnvT" id="type-glEnvT">glEnvT</a> = <a href="Reprocessing_Common.html#type-glEnv" title="Reprocessing_Common.glEnv">glEnv</a></h4>

<div class='body body-empty'></div></div>

<div class='doc-item'><h4 class='item'>type <a href="#type-colorT" id="type-colorT">colorT</a> = <a href="Reprocessing_Common.html#type-colorT" title="Reprocessing_Common.colorT">colorT</a></h4>

<div class='body body-empty'></div></div>

<div class='doc-item'><h4 class='item'>type <a href="#type-imageT" id="type-imageT">imageT</a> = <a href="Reprocessing_Common.html#type-imageT" title="Reprocessing_Common.imageT">imageT</a></h4>

<div class='body body-empty'></div></div>

<div class='doc-item'><h4 class='item'>type <a href="#type-fontT" id="type-fontT">fontT</a> = <a href="Reprocessing_Font.html#type-fontT" title="Reprocessing_Font.fontT">fontT</a></h4>

<div class='body body-empty'></div></div>

<div class='doc-item'><h4 class='item'>type <a href="#type-strokeCapT" id="type-strokeCapT">strokeCapT</a> = <a href="Reprocessing_Common.html#type-strokeCapT" title="Reprocessing_Common.strokeCapT">strokeCapT</a></h4>

<div class='body body-empty'></div></div>

<div class='doc-item'><h4 class='item'>type <a href="#type-rectModeT" id="type-rectModeT">rectModeT</a> = <a href="Reprocessing_Common.html#type-rectModeT" title="Reprocessing_Common.rectModeT">rectModeT</a></h4>

<div class='body body-empty'></div></div>

<div class='doc-item'><h4 class='item'>type <a href="#type-soundT" id="type-soundT">soundT</a> = <a href="Reprocessing_Common.html#type-soundT" title="Reprocessing_Common.soundT">soundT</a></h4>

<div class='body body-empty'></div></div>
</div></div>
</div>
<div class='right-blank'></div>
</div>

63 changes: 63 additions & 0 deletions docs/api/Reprocessing_ClientWrapper.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@


<!doctype html>
<meta charset=utf8>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel=stylesheet href='../styles.css'>
<script defer src='../script.js'></script>
<title>Reprocessing_ClientWrapper</title>
<body>
<script>window.relativeToRoot=".."</script>
<script defer src="../block-script.js"></script>
<div id='error-message'>
⚠️ Oops! This page doesn't appear to define a <span>type</span> called <code>_</code>.
</div>

<script>window.shouldCheckHashes=true</script>
<div class='container'>

<div class='sidebar-wrapper'>
<div class='sidebar-expander'>Show navigation</div>
<div class='sidebar'>
<a href="../search.html" style="display: block; padding: 0 8px;">Search</a>
<div class='docs-listing'><a href="../index.html">Home</a>
<a href="../fonts/LICENSE.html">LICENSE</a></div>
<div class='toc-header'>Page Contents</div>
<div class='table-of-contents'>
<a href="#Reprocessing_ClientWrapper" class='level-1 header'>Reprocessing_ClientWrapper</a>
<a href="#value-init" class='level-2 value'>init</a>
</div>
<div class='project-title'>Package modules</div><div class='project-listing'><a href="Reprocessing.html">Reprocessing</a>
<a href="Reprocessing_ClientWrapper.html">Reprocessing_ClientWrapper</a>
<a href="Reprocessing_Common.html">Reprocessing_Common</a>
<a href="Reprocessing_Constants.html">Reprocessing_Constants</a>
<a href="Reprocessing_DefaultFont.html">Reprocessing_DefaultFont</a>
<a href="Reprocessing_Draw.html">Reprocessing_Draw</a>
<a href="Reprocessing_Env.html">Reprocessing_Env</a>
<a href="Reprocessing_Events.html">Reprocessing_Events</a>
<a href="Reprocessing_Font.html">Reprocessing_Font</a>
<a href="Reprocessing_Hotreload.html">Reprocessing_Hotreload</a>
<a href="Reprocessing_Internal.html">Reprocessing_Internal</a>
<a href="Reprocessing_Matrix.html">Reprocessing_Matrix</a>
<a href="Reprocessing_Shaders.html">Reprocessing_Shaders</a>
<a href="Reprocessing_Types.html">Reprocessing_Types</a>
<a href="Reprocessing_Utils.html">Reprocessing_Utils</a></div>
</div>
</div>

<div class='main'>
<a href="https://github.com/schmavery/reprocessing/blob/master/src/Reprocessing_ClientWrapper.re" class="edit-link">Edit</a>
<a href="#Reprocessing_ClientWrapper" id="Reprocessing_ClientWrapper"><h1>Reprocessing_ClientWrapper</h1></a>

<p><span class='missing'>This module does not have a toplevel documentation block.</span></p>
<div class='doc-item'><h4 class='item'>let <a href="#value-init" id="value-init">init</a> = (
~?screen: option(string),
~argv: array(string)
) => Reasongl.Gl.Window.t</h4>

<div class='body body-empty'></div></div>

</div>
<div class='right-blank'></div>
</div>

Loading