aboutsummaryrefslogtreecommitdiffstats
path: root/notes/tangle_demo.txt
diff options
context:
space:
mode:
Diffstat (limited to 'notes/tangle_demo.txt')
-rw-r--r--notes/tangle_demo.txt31
1 files changed, 31 insertions, 0 deletions
diff --git a/notes/tangle_demo.txt b/notes/tangle_demo.txt
new file mode 100644
index 0000000..463abe1
--- /dev/null
+++ b/notes/tangle_demo.txt
@@ -0,0 +1,31 @@
+
+
+/experiments/%model/tangle.html
+/experiments/%model/tangle-model.js
+
+<script type="text/javascript" src="Tangle.js"></script>
+
+this part in body's onLoad; after live script has downloaded.
+var table = new Tangle (document.getElementById("MODELNAME"), {
+ initialize: function () {
+ this.CONSTANT = INIT;
+ this.IN_VAR = INIT;
+ },
+ update: function () {
+ var vals = model();
+ this.OUT_VAR = vals[0];
+ this.OUT_VAR = vals[1];
+ [...]
+ },
+});
+
+<p id="MODELNAME">
+<!-- TODO: some built-in js that checks if in/out vars are the same, and
+ alerts if not? -->
+<!-- EDIT ME: this part is template -->
+When the parameters are <span data-var="VARSLUG"> for VARSLUG</span>, [...],
+ and the variables are <span data-var="cookies" class="TKAdjustableNumber">
+ for VAR</span>, then you get <span data-var=OUTVAR> for OUTVAR</span>
+<!-- END EDIT ME -->
+
+