提交 83d339a9 编写于 作者: M Mugen87

LOD: More tests.

上级 18d26d3d
......@@ -68,9 +68,22 @@ export default QUnit.module( 'Objects', () => {
assert.strictEqual( lod2.levels.length, 3, "LOD.levels has the correct length after the copy." );
} );
QUnit.todo( "addLevel", ( assert ) => {
QUnit.test( "addLevel", ( assert ) => {
assert.ok( false, "everything's gonna be alright" );
var lod = new LOD();
var high = new Object3D();
var mid = new Object3D();
var low = new Object3D();
lod.addLevel( high, 5 );
lod.addLevel( mid, 25 );
lod.addLevel( low, 50 );
assert.strictEqual( lod.levels.length, 3, "LOD.levels has the correct length." );
assert.deepEqual( lod.levels[ 0 ], { distance: 5, object: high }, "First entry correct." );
assert.deepEqual( lod.levels[ 1 ], { distance: 25, object: mid }, "Second entry correct." );
assert.deepEqual( lod.levels[ 2 ], { distance: 50, object: low }, "Third entry correct." );
} );
QUnit.test( "getObjectForDistance", ( assert ) => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册