diff options
author | bnewbold <bnewbold@robocracy.org> | 2016-12-25 22:04:07 -0800 |
---|---|---|
committer | bnewbold <bnewbold@robocracy.org> | 2016-12-25 22:13:22 -0800 |
commit | 68aa8cb130ff68395c416b36a1e5661e6fa18e5d (patch) | |
tree | 6f08b9c25e1aabe39d90c5e3a5c4b44953af5338 /notes/tangle_demo.txt | |
parent | c902f8215546d73e1584380d7bb841cf965dc86f (diff) | |
download | modelthing-68aa8cb130ff68395c416b36a1e5661e6fa18e5d.tar.gz modelthing-68aa8cb130ff68395c416b36a1e5661e6fa18e5d.zip |
update/de-cruft notes directory
Diffstat (limited to 'notes/tangle_demo.txt')
-rw-r--r-- | notes/tangle_demo.txt | 31 |
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 --> + + |