archematics/etc/options.bash

99 lines
3.9 KiB
Bash
Raw Permalink Normal View History

# Using bash "here-documents" as quick-and-dirty template files
cat <<BREAK
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
</head>
<body>
<h2>archematics</h2>
<p>This plug-in currently has the following main capabilities that can
be activated:</p>
<h2>Embedded VRML/X3D display</h2>
<div style="float: right;margin: 1.5em;">
<label for="vrmlview">Enable</label>
<input type="checkbox" id="vrmlview"></div>
<div style="float: left;margin: 1em;">
<a href="http://www.wiley.com/legacy/compbooks/vrml2sbk/ch14/14fig04a.htm">
<img src="assets/vrmlExample.png" width="160px"></a></div>
<p>Scans web pages for links (in text or images) to VRML or X3D files
(and other file formats compatible with the
<a href="https://create3000.github.io/x_ite/tutorials/how-to-navigate-in-a-scene/">
X_ITE X3D Browser</a>, such as glTF, obj, and STL) and inserts
"eye-cons" (👁) next to each of them. When you click the eye, it embeds
a viewer and displays the model in 3D within the page. Right-click on an
active viewer for additional options. Click the eye again
to close the viewer. Supports multiple simultaneous viewers on the same
page.</p>
<p> Be sure to visit George Hart's
<a href="http://georgehart.com/virtual-polyhedra/vp.html">
Encyclopedia of Polyhedra</a> with this module enabled for a trove of
beautiful models to play with.</p>
BREAK
if [ "$WHAT" = full ]; then
cat <<BREAK
<h2>JavaScript reinterpretation of Geometry Applets</h2>
<div style="float: right;margin: 1.5em;">
<label for="joyce">Enable</label><input type="checkbox" id="joyce">
</div>
<div style="float: left;margin: 1em;">
<a href="https://mathcs.clarku.edu/~djoyce/java/Geometry/eulerline.html">
<img src="assets/joyceExample.png" width="150px"></a></div>
<p>In the late 1990s, <a href="https://mathcs.clarku.edu/~djoyce/">
David Joyce</a> wrote a web applet in Java that allowed for interactive
draggable 2D and 3D geometry diagrams within a page. Nearly 30 years on,
Java is no longer supported for embedded applets by any major browser. This
module scans web pages for invocations of that Java applet, and translates
them into calls to the
<a href="https://wiki.geogebra.org/en/Reference:GeoGebra_Apps_Embedding">
GeoGebra JavaScript module</a>, bringing the diagrams back to life.</p>
<p>What's more, Joyce posted an
<a href="https://mathcs.clarku.edu/~djoyce/java/elements/elements.html">
on-line version</a> of the <strong>entire</strong>
Euclid's <em>Elements</em> with all of the traditional diagrams, and many
new ones of his own creation, rendered in fully interactive versions.
Be sure to give archematics a try on
<a href="https://mathcs.clarku.edu/~djoyce/java/elements/bookI/propI47.html">
his site</a>.</p>
BREAK
fi
cat <<BREAK
<hr/>
<h3>Debugging-only options</h3>
<h4>Embedded VRML/X3D display</h4>
Write to the JavaScript console: <br/>
<label for="vrml97">Generated VRML97 specifications</label>
<input type="checkbox" id="vrml97">
BREAK
if [ "$WHAT" = full ]; then
cat <<BREAK
<br />
<h4>Java Geometry Applets</h4>
Trace the following to the JavaScript console: <br/>
<label for="commands">Commands executed</label>
<input type="checkbox" id="commands">
<label for="color">Colors assigned</label>
<input type="checkbox" id="color">
<br/>
<br/>
Alter execution of the translated applet: <br/>
<label for="showall">Show all applet entities, even hidden ones</label>
<input type="checkbox" id="showall"><br/>
<label for="showaux">Show GeoGebra auxiliaries (not in applet)</label>
<input type="checkbox" id="showaux">
<br/>
<br/>
<label for="algebra">Show the GeoGebra algebra pane</label>
<input type="checkbox" id="algebra">
BREAK
fi
cat <<END
<script src="browser-polyfill.js" type="module"></script>
<script src="options.js" type="module"></script>
</body>
</html>
END