How to use the flying-squid.findPotentialLines 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("detect potential first lines from right bottom", async function() {
          let potentialLines=await findPotentialLines(world,right[0],direction.scaled(-1));
          assert.include(potentialLines,{
              "direction": new Vec3(0,1,0),
              "line": right
            });
        });
      });
github PrismarineJS / flying-squid / test / portal_detector.js View on Github external
it("detect potential first lines from left top", async function() {
          let potentialLines=await findPotentialLines(world,left[left.length-1],direction);
          assert.include(potentialLines,{
              "direction": new Vec3(0,1,0),
              "line": left
            });
        });
github PrismarineJS / flying-squid / test / portal_detector.js View on Github external
it("detect potential first lines from top left", async function() {
          let potentialLines=await findPotentialLines(world,top[0],new Vec3(0,-1,0));
          assert.include(potentialLines,{
              "direction": direction,
              "line": top
            });
        });