How to use the flying-squid.generateLine function in flying-squid

To help you get started, we’ve selected a few flying-squid examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github PrismarineJS / flying-squid / test / portal_detector.js View on Github external
it("generate a portal", () => {
    assert.deepEqual(generatePortal(new Vec3(2,1,1),new Vec3(1,0,0),4,5),{
      bottom:generateLine(new Vec3(3,1,1),new Vec3(1,0,0),2),
      left:generateLine(new Vec3(2,2,1),new Vec3(0,1,0),3),
      right:generateLine(new Vec3(5,2,1),new Vec3(0,1,0),3),
      top:generateLine(new Vec3(3,5,1),new Vec3(1,0,0),2),
      air:generateLine(new Vec3(3,2,1),new Vec3(0,1,0),3).concat(generateLine(new Vec3(4,2,1),new Vec3(0,1,0),3))
    })
  });
});
github PrismarineJS / flying-squid / test / portal_detector.js View on Github external
it("generate a portal", () => {
    assert.deepEqual(generatePortal(new Vec3(2,1,1),new Vec3(1,0,0),4,5),{
      bottom:generateLine(new Vec3(3,1,1),new Vec3(1,0,0),2),
      left:generateLine(new Vec3(2,2,1),new Vec3(0,1,0),3),
      right:generateLine(new Vec3(5,2,1),new Vec3(0,1,0),3),
      top:generateLine(new Vec3(3,5,1),new Vec3(1,0,0),2),
      air:generateLine(new Vec3(3,2,1),new Vec3(0,1,0),3).concat(generateLine(new Vec3(4,2,1),new Vec3(0,1,0),3))
    })
  });
});
github PrismarineJS / flying-squid / test / portal_detector.js View on Github external
it("generate a line",() => {
    assert.deepEqual(generateLine(new Vec3(3,1,1),new Vec3(1,0,0),2),[new Vec3(3, 1, 1), new Vec3(4, 1, 1)])
  });
  it("generate a portal", () => {
github PrismarineJS / flying-squid / test / portal_detector.js View on Github external
it("generate a portal", () => {
    assert.deepEqual(generatePortal(new Vec3(2,1,1),new Vec3(1,0,0),4,5),{
      bottom:generateLine(new Vec3(3,1,1),new Vec3(1,0,0),2),
      left:generateLine(new Vec3(2,2,1),new Vec3(0,1,0),3),
      right:generateLine(new Vec3(5,2,1),new Vec3(0,1,0),3),
      top:generateLine(new Vec3(3,5,1),new Vec3(1,0,0),2),
      air:generateLine(new Vec3(3,2,1),new Vec3(0,1,0),3).concat(generateLine(new Vec3(4,2,1),new Vec3(0,1,0),3))
    })
  });
});
github PrismarineJS / flying-squid / test / portal_detector.js View on Github external
it("generate a portal", () => {
    assert.deepEqual(generatePortal(new Vec3(2,1,1),new Vec3(1,0,0),4,5),{
      bottom:generateLine(new Vec3(3,1,1),new Vec3(1,0,0),2),
      left:generateLine(new Vec3(2,2,1),new Vec3(0,1,0),3),
      right:generateLine(new Vec3(5,2,1),new Vec3(0,1,0),3),
      top:generateLine(new Vec3(3,5,1),new Vec3(1,0,0),2),
      air:generateLine(new Vec3(3,2,1),new Vec3(0,1,0),3).concat(generateLine(new Vec3(4,2,1),new Vec3(0,1,0),3))
    })
  });
});
github PrismarineJS / flying-squid / test / portal_detector.js View on Github external
it("generate a portal", () => {
    assert.deepEqual(generatePortal(new Vec3(2,1,1),new Vec3(1,0,0),4,5),{
      bottom:generateLine(new Vec3(3,1,1),new Vec3(1,0,0),2),
      left:generateLine(new Vec3(2,2,1),new Vec3(0,1,0),3),
      right:generateLine(new Vec3(5,2,1),new Vec3(0,1,0),3),
      top:generateLine(new Vec3(3,5,1),new Vec3(1,0,0),2),
      air:generateLine(new Vec3(3,2,1),new Vec3(0,1,0),3).concat(generateLine(new Vec3(4,2,1),new Vec3(0,1,0),3))
    })
  });
});