threedna: Simple DNA molecules using three.js.
Usage:
In order to add the content canvas to an element on your page with
id="canvas", containing 50 objects, with specified object and background
colors, and with falling objects, use:
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r83/three.min.js"></script>
<script src="threedna.js"></script>
<script>
const threeDNAConfig = {
element: "canvas",
noOfObjects: 50,
objectColor: 0x6D6D6D,
bgColor: 0xDBDBDB,
cameraDistance: 500,
rainSpeed: 0.005,
maxRotationSpeed: 0.01,
deleteOnError: false
};
var tdna = new ThreeDNA(threeDNAConfig);
</script>
Calling ThreeDNA() with a subset of the settings, or without argument, results in default settings.