Skip to content

Commit

Permalink
fix: Playfield generation test.
Browse files Browse the repository at this point in the history
  • Loading branch information
freezy committed May 18, 2019
1 parent 18314ba commit 593643e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/vpt/table.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ describe('The VPinball table generator', () => {
it('should generate the correct playfield mesh', async () => {
const playfieldMesh = three.first<Mesh>(gltf, 'playfield');
const playfieldVertices = three.vertices(playfieldMesh);
const expectedVertices = [ tableWidth, tableHeight, tableDepth, tableWidth, 0, tableDepth, tableWidth, tableHeight, 0, tableWidth, 0, tableDepth, tableWidth, 0, 0, tableWidth, tableHeight, 0, 0, tableHeight, 0, 0, 0, 0, 0, tableHeight, tableDepth, 0, 0, 0, 0, 0, tableDepth, 0, tableHeight, tableDepth, 0, tableHeight, 0, 0, tableHeight, tableDepth, tableWidth, tableHeight, 0, 0, tableHeight, tableDepth, tableWidth, tableHeight, tableDepth, tableWidth, tableHeight, 0, 0, 0, tableDepth, 0, 0, 0, tableWidth, 0, tableDepth, 0, 0, 0, tableWidth, 0, 0, tableWidth, 0, tableDepth, 0, tableHeight, tableDepth, 0, 0, tableDepth, tableWidth, tableHeight, tableDepth, 0, 0, tableDepth, tableWidth, 0, tableDepth, tableWidth, tableHeight, tableDepth, tableWidth, tableHeight, 0, tableWidth, 0, 0, 0, tableHeight, 0, tableWidth, 0, 0, 0, 0, 0, 0, tableHeight, 0 ];
expect(compareArray(playfieldVertices, expectedVertices)).to.be.true;
const expectedVertices = [tableWidth, 0, 0, 0, 0, 0, 0, tableHeight, 0, 0, tableHeight, 0, tableWidth, tableHeight, 0, tableWidth, 0, 0, 0, tableHeight, tableDepth, 0, 0, tableDepth, tableWidth, 0, tableDepth, tableWidth, 0, tableDepth, tableWidth, tableHeight, tableDepth, 0, tableHeight, tableDepth, tableWidth, 0, 0, tableWidth, tableHeight, 0, tableWidth, 0, tableDepth, tableWidth, tableHeight, 0, tableWidth, tableHeight, tableDepth, tableWidth, 0, tableDepth, tableWidth, tableHeight, 0, 0, tableHeight, 0, tableWidth, tableHeight, tableDepth, 0, tableHeight, 0, 0, tableHeight, tableDepth, tableWidth, tableHeight, tableDepth, 0, tableHeight, 0, 0, 0, 0, 0, tableHeight, tableDepth, 0, 0, 0, 0, 0, tableDepth, 0, tableHeight, tableDepth, 0, 0, 0, tableWidth, 0, 0, 0, 0, tableDepth, tableWidth, 0, 0, tableWidth, 0, tableDepth, 0, 0, tableDepth];
expect(compareArray(playfieldVertices, expectedVertices)).to.equal(true);
});

it('should read the table script correctly', async () => {
Expand Down

0 comments on commit 593643e

Please sign in to comment.