Fixed #1. Added isomorphic lattice sampler
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
//Create useful variables
|
||||
const aspect = W / H;
|
||||
const scale = aspect >= 1 ? H / 2 : W / 2;
|
||||
|
||||
function setup() {
|
||||
const [W, H] = [400, 400];
|
||||
const aspect = W / H;
|
||||
const scale = aspect >= 1 ? H / 2 : W / 2;
|
||||
canvas.width = W;
|
||||
canvas.height = H;
|
||||
|
||||
@@ -39,9 +38,8 @@ setup();
|
||||
const { Bitfield_Image_Sampler } = await import('../lib/image-functions.js');
|
||||
//Load
|
||||
const sampler = Bitfield_Image_Sampler.from_string('16,16,AAAAAAAAAAAAAA4AEQDx/xGgDqAAAAAAAAAAAAAAAAA=');
|
||||
console.log(sampler);
|
||||
|
||||
const s = 0.2;
|
||||
const s = 0.08;
|
||||
for (let y = -10; y < 10; y++) {
|
||||
const xo = y & 1 ? s * .5 : 0;
|
||||
const sxo = 0;
|
||||
@@ -70,7 +68,6 @@ for (let y = -10; y < 10; y++) {
|
||||
|
||||
// Triangle lines
|
||||
C.strokeStyle = '#000';
|
||||
C.lineWidth = 1 / scale;
|
||||
|
||||
// Outline parallelogram
|
||||
C.beginPath();
|
||||
|
||||
Reference in New Issue
Block a user