InstancedInterleavedBuffer.js 595 B

1234567891011121314151617181920
  1. /**
  2. * @author simonThiele / https://github.com/simonThiele
  3. */
  4. module( "InstancedInterleavedBuffer" );
  5. test( "can be created", function() {
  6. var array = new Float32Array( [1, 2, 3, 7, 8, 9] );
  7. var instance = new THREE.InstancedInterleavedBuffer( array, 3 );
  8. ok( instance.meshPerAttribute === 1, "ok" );
  9. });
  10. test( "copy", function() {
  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. ok( copiedInstance.meshPerAttribute === 1, "additional attribute was copied" );
  15. });