Put each script block next to the associated board div
This commit is contained in:
parent
7a79ed1de0
commit
883e660e7c
6 changed files with 106 additions and 84 deletions
|
@ -10,19 +10,12 @@
|
|||
|
||||
<h1>3D intersection sampler</h1>
|
||||
|
||||
<!-- plane-plane -->
|
||||
|
||||
<h2>Plane–plane</h2>
|
||||
<p>This template is based on the <a href="https://github.com/jsxgraph/jsxgraph/blob/main/examples/intersection_plane_plane.html">plane–plane intersection example</a> in the <a href="https://github.com/jsxgraph/jsxgraph/tree/main/examples">examples folder</a> included with the source code.</p>
|
||||
<div id="plane-plane-board" class="jxgbox" style="width:600px; height:600px"></div>
|
||||
|
||||
<h2>Plane–sphere</h2>
|
||||
<p>This template is based on the <a href="https://github.com/jsxgraph/jsxgraph/blob/main/examples/intersection_plane_sphere.html">plane–sphere intersection example</a> in the <a href="https://github.com/jsxgraph/jsxgraph/tree/main/examples">examples folder</a> included with the source code.</p>
|
||||
<div id="plane-sphere-board" class="jxgbox" style="width:600px; height:600px"></div>
|
||||
|
||||
<h2>Sphere–sphere</h2>
|
||||
<p>This template is based on the <a href="https://github.com/jsxgraph/jsxgraph/blob/main/examples/intersection_sphere_sphere.html">sphere–sphere intersection example</a> in the <a href="https://github.com/jsxgraph/jsxgraph/tree/main/examples">examples folder</a> included with the source code.</p>
|
||||
<div id="sphere-sphere-board" class="jxgbox" style="width:600px; height:600px"></div>
|
||||
|
||||
<!-- plane-plane -->
|
||||
<script type="text/javascript">
|
||||
// to prevent variable name conflicts, we define variables locally using `let`
|
||||
// and put the code for each board in its own block
|
||||
|
@ -60,7 +53,7 @@
|
|||
fillColor: 'white',
|
||||
gradientSecondColor: '#5000a0',
|
||||
highlightStrokeColor: '#300060'
|
||||
}
|
||||
}
|
||||
);
|
||||
let planeHoriz = view.create(
|
||||
'plane3d',
|
||||
|
@ -101,6 +94,11 @@
|
|||
</script>
|
||||
|
||||
<!-- plane-sphere -->
|
||||
|
||||
<h2>Plane–sphere</h2>
|
||||
<p>This template is based on the <a href="https://github.com/jsxgraph/jsxgraph/blob/main/examples/intersection_plane_sphere.html">plane–sphere intersection example</a> in the <a href="https://github.com/jsxgraph/jsxgraph/tree/main/examples">examples folder</a> included with the source code.</p>
|
||||
<div id="plane-sphere-board" class="jxgbox" style="width:600px; height:600px"></div>
|
||||
|
||||
<script type="text/javascript">
|
||||
// to prevent variable name conflicts, we define variables locally using `let`
|
||||
// and put the code for each board in its own block
|
||||
|
@ -165,7 +163,7 @@
|
|||
fillColor: 'white',
|
||||
gradientSecondColor: '#a00050',
|
||||
highlightStrokeColor: '#600030'
|
||||
}
|
||||
}
|
||||
);
|
||||
let sphere = view.create(
|
||||
'sphere3d',
|
||||
|
@ -192,6 +190,11 @@
|
|||
</script>
|
||||
|
||||
<!-- sphere-sphere -->
|
||||
|
||||
<h2>Sphere–sphere</h2>
|
||||
<p>This template is based on the <a href="https://github.com/jsxgraph/jsxgraph/blob/main/examples/intersection_sphere_sphere.html">sphere–sphere intersection example</a> in the <a href="https://github.com/jsxgraph/jsxgraph/tree/main/examples">examples folder</a> included with the source code.</p>
|
||||
<div id="sphere-sphere-board" class="jxgbox" style="width:600px; height:600px"></div>
|
||||
|
||||
<script type="text/javascript">
|
||||
// to prevent variable name conflicts, we define variables locally using `let`
|
||||
// and put the code for each board in its own block
|
||||
|
@ -280,5 +283,6 @@
|
|||
);
|
||||
}
|
||||
</script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue