InstancedInterleavedBuffer.js 644 B

1234567891011121314151617181920
  1. /**
  2. * @author simonThiele / https://github.com/simonThiele
  3. */
  4. QUnit.module( "InstancedInterleavedBuffer" );
  5. QUnit.test( "can be created", function( assert ) {
  6. var array = new Float32Array( [1, 2, 3, 7, 8, 9] );
  7. var instance = new THREE.InstancedInterleavedBuffer( array, 3 );
  8. assert.ok( instance.meshPerAttribute === 1, "ok" );
  9. });
  10. QUnit.test( "copy" , function( assert ) {
  11. var array = new Float32Array( [1, 2, 3, 7, 8, 9] );
  12. var instance = new THREE.InstancedInterleavedBuffer( array, 3 );
  13. var copiedInstance = instance.copy( instance );
  14. assert.ok( copiedInstance.meshPerAttribute === 1, "additional attribute was copied" );
  15. });
粤ICP备19079148号