mirror of
https://github.com/Terncode/pixel.horse.git
synced 2026-09-24 13:55:04 +02:00
Archive commit
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
import '../lib';
|
||||
import { expect } from 'chai';
|
||||
import { createMat4, ortho } from '../../common/mat4';
|
||||
|
||||
describe('mat4', () => {
|
||||
describe('createMat4()', () => {
|
||||
expect(createMat4()).eql(new Float32Array([
|
||||
1, 0, 0, 0,
|
||||
0, 1, 0, 0,
|
||||
0, 0, 1, 0,
|
||||
0, 0, 0, 1,
|
||||
]));
|
||||
});
|
||||
|
||||
describe('ortho()', () => {
|
||||
expect(ortho(createMat4(), 100, 200, 300, 400, 10, 20)).eql(new Float32Array([
|
||||
0.019999999552965164, 0, 0, 0,
|
||||
0, 0.019999999552965164, 0, 0,
|
||||
0, 0, -0.20000000298023224, 0,
|
||||
-3, -7, -3, 1
|
||||
]));
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user