previous

page 4

next
JavaScript to the Rescue!

The answer is to write a JavaScript function that works out vmin for us.

function vmin() {
var w=innerWidth; var h=innerHeight;
var v=w;
if (h<w) v=h;
return v/100;
}

Still a couple of gotchas but we'll deal with them along the way. Now it's time to start work on the Spirolaterals project. So create all the usual files.

index.html
<html>
<head>
<title>Spirolaterals</title>
<link rel='stylesheet' href='styles.css'>
<script src='globals.js'></script>
<script src='my.js'></script>
</head>
<body>
<canvas id='c'></canvas>
<script>setup();</script>
</body>
</html>

My other files are on the next page.

previous
next