Skip to content

Commit

Permalink
Docs: Add link to conversion guide video
Browse files Browse the repository at this point in the history
  • Loading branch information
TheBizzle committed Apr 26, 2024
1 parent ca5a55b commit 2e84aab
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
10 changes: 10 additions & 0 deletions assets/stylesheets/docs.css
Original file line number Diff line number Diff line change
Expand Up @@ -89,3 +89,13 @@ body.not_full_height {
display: block;
margin: 0 auto;
}

.video-box {
display: flex;
justify-content: center;
}

.vid {
object-fit: contain;
width: 100%;
}
8 changes: 7 additions & 1 deletion html/docs/converting.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,13 @@ <h2>Getting Started</h2>

<p>This is a guide on how to convert a traditional HubNet model to work in HubNet Web. Please familiarize yourself with the <a href="/docs/authoring">authoring documentation</a> before attempting to convert a model, as the instructions on this page will assume that you have familiarity with the authoring tool in general. We very strongly recommend reading this entire guide once through, before attempting to do the conversion of a model, since there are many steps involved and you will likely need to make some changes to your model outside of HubNet Web before it is ready for conversion. And, while we have designed HubNet Web to make "from scratch" authoring much more approachable, the process of converting old models can still be challenging.</p>

<p>Better yet, first-time model converters would likely benefit from starting off by converting one of the very simple HubNet example models, such <a href="https://netlogoweb.org/assets/modelslib/HubNet%20Activities/Code%20Examples/Template%20HubNet.nlogo">Template</a> or <a href="https://netlogoweb.org/assets/modelslib/IABM%20Textbook/chapter%208/Example%20HubNet.nlogo">Example</a>. Doing this will help you to become more comfortable with the authoring tool and conversion process, and will help to make things feel more tractable when working through the challenges of converting a larger model.</p>
<p>Better yet, first-time model converters would likely benefit from starting off by converting one of the very simple HubNet example models, such <a href="https://netlogoweb.org/assets/modelslib/HubNet%20Activities/Code%20Examples/Template%20HubNet.nlogo">Template</a> or <a href="https://netlogoweb.org/assets/modelslib/IABM%20Textbook/chapter%208/Example%20HubNet.nlogo">Example</a>. Doing this will help you to become more comfortable with the authoring tool and conversion process, and will help to make things feel more tractable when working through the challenges of converting a larger model. You may also find it helpful to use the video guide below as a reference.</p>

<p class="video-box">
<video class="vid" controls>
<source src="https://hubnetweb.org/assets/ConversionGuide.mp4" type="video/mp4">
</video>
</p>

<p>To get started with converting a model, you should open it in desktop NetLogo and look inside each of the Buttons, Monitors, and Plots in its host interface. If each widget is simply calling a single, zero-argument procedure defined in your "Code" tab, that's a great start. But, often times, widgets will contain multiple primitive or procedure calls, which is not compatible with HubNet Web's way of doing things, where all widget fields can only run a single procedure. As such, if, for example, your model has a button that says "Add More Agents", we recommend that you create a procedure called <code>add-more-agents</code> in your Code tab, and have the body of that procedure be all of the code that was contained in the "Add More Agents" button. Then, set the "Add More Agents" button to merely run <code>add-more-agents</code>.</p>

Expand Down

0 comments on commit 2e84aab

Please sign in to comment.