提交 efd9928e 编写于 作者: W WestLangley

Remove .applyToBufferAttribute() unit tests

上级 9ccff289
......@@ -163,18 +163,6 @@ export default QUnit.module( 'Maths', () => {
} );
QUnit.test( "applyToBufferAttribute", ( assert ) => {
var a = new Matrix3().set( 1, 2, 3, 4, 5, 6, 7, 8, 9 );
var attr = new Float32BufferAttribute( [ 1, 2, 1, 3, 0, 3 ], 3 );
var expected = new Float32Array( [ 8, 20, 32, 12, 30, 48 ] );
var applied = a.applyToBufferAttribute( attr );
assert.deepEqual( applied.array, expected, "Check resulting buffer" );
} );
QUnit.test( "multiply/premultiply", ( assert ) => {
// both simply just wrap multiplyMatrices
......
......@@ -418,29 +418,6 @@ export default QUnit.module( 'Maths', () => {
} );
QUnit.test( "applyToBufferAttribute", ( assert ) => {
var a = new Matrix4().set( 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 );
var attr = new Float32BufferAttribute( [ 1, 2, 1, 3, 0, 3 ], 3 );
var expected = new Float32BufferAttribute( [
0.1666666716337204, 0.4444444477558136, 0.7222222089767456,
0.1599999964237213, 0.4399999976158142, 0.7200000286102295
], 3 );
var applied = a.applyToBufferAttribute( attr );
assert.strictEqual( expected.count, applied.count, "Applied buffer and expected buffer have the same number of entries" );
for ( var i = 0, l = expected.count; i < l; i ++ ) {
assert.ok( Math.abs( applied.getX( i ) - expected.getX( i ) ) <= eps, "Check x" );
assert.ok( Math.abs( applied.getY( i ) - expected.getY( i ) ) <= eps, "Check y" );
assert.ok( Math.abs( applied.getZ( i ) - expected.getZ( i ) ) <= eps, "Check z" );
}
} );
QUnit.test( "determinant", ( assert ) => {
var a = new Matrix4();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册