InstancedInterleavedBuffer.tests.js 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /**
  2. * @author simonThiele / https://github.com/simonThiele
  3. */
  4. /* global QUnit */
  5. import { InstancedInterleavedBuffer } from '../../../../src/core/InstancedInterleavedBuffer';
  6. export default QUnit.module( 'Core', () => {
  7. QUnit.module( 'InstancedInterleavedBuffer', () => {
  8. // INHERITANCE
  9. QUnit.todo( "Extending", ( assert ) => {
  10. assert.ok( false, "everything's gonna be alright" );
  11. } );
  12. // INSTANCING
  13. QUnit.test( "Instancing", ( assert ) => {
  14. var array = new Float32Array( [ 1, 2, 3, 7, 8, 9 ] );
  15. var instance = new InstancedInterleavedBuffer( array, 3 );
  16. assert.ok( instance.meshPerAttribute === 1, "ok" );
  17. } );
  18. // PUBLIC STUFF
  19. QUnit.todo( "isInstancedInterleavedBuffer", ( assert ) => {
  20. assert.ok( false, "everything's gonna be alright" );
  21. } );
  22. QUnit.test( "copy", ( assert ) => {
  23. var array = new Float32Array( [ 1, 2, 3, 7, 8, 9 ] );
  24. var instance = new InstancedInterleavedBuffer( array, 3 );
  25. var copiedInstance = instance.copy( instance );
  26. assert.ok( copiedInstance.meshPerAttribute === 1, "additional attribute was copied" );
  27. } );
  28. } );
  29. } );
粤ICP备19079148号