How to use the flying-squid.findBorder 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("find borders from left", async function () {
          const border = await findBorder(world, {
            "direction": new Vec3(0, 1, 0),
            "line": left
          },direction);
          assert.deepEqual(border, expectedBorder)
        });
        it("find borders from right", async function () {
github PrismarineJS / flying-squid / test / portal_detector.js View on Github external
it("find borders from bottom", async function () {
          const border = await findBorder(world, {
            "direction": direction,
            "line": bottom
          }, new Vec3(0, 1, 0));
          assert.deepEqual(border, expectedBorder)
        });
github PrismarineJS / flying-squid / test / portal_detector.js View on Github external
it("find borders from right", async function () {
          const border = await findBorder(world, {
            "direction": new Vec3(0, 1, 0),
            "line": right
          }, direction.scaled(-1));
          assert.deepEqual(border, expectedBorder)
        });
      });