Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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))
})
});
});
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))
})
});
});
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", () => {
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))
})
});
});
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))
})
});
});
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))
})
});
});