okay fixed weird bug

This commit is contained in:
Chris Nutter committed 2020-09-10 22:10:08 -07:00
1 parent f998c153f0
commit 09327b855f
29 files changed
+101142 -557

No files matched your search

@@ -0,0 +1,35 @@
// Draw stuff, with P5 // CF p5js.org/reference
// Time-stamp: <2020-02-02 14:46:00 Chuck Siska>
// ------------------------------------------------------------
// ===================================================== draw_grid ====
// Draw a fancy grid with major & minor lines
// & major row/col numbers.
function draw_grid( rminor, rmajor, rstroke, rfill )
{
stroke( rstroke );
fill( rfill );;
let sz = g_canvas.cell_size;
let width = g_canvas.wid*sz;
let height = g_canvas.hgt*sz
for ( var ix = 0; ix < width; ix += rminor )
{
let big_linep = (ix % rmajor == 0);
let line_wgt = 1;
if (big_linep) line_wgt = 2;
strokeWeight( line_wgt );
line( ix, 0, ix, height );
strokeWeight( 1 );
if ( ix % rmajor == 0 ) { text( ix, ix, 10 ); }
}
for ( var iy = 0; iy < height; iy += rminor )
{
let big_linep = (iy % rmajor == 0);
let line_wgt = 1;
if (big_linep) line_wgt = 2;
strokeWeight( line_wgt );
line( 0, iy, width, iy );
strokeWeight( 1 );
if ( iy % rmajor == 0 ) { text( iy, 0, iy + 10 ); }
}
}
@@ -0,0 +1,7 @@
body {
text-align: center;
font-family: sans-serif;
}
canvas {
background-color: black;
}