LightShadow.tests.js 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /**
  2. * @author TristanVALCKE / https://github.com/Itee
  3. * @author moraxy / https://github.com/moraxy
  4. */
  5. /* global QUnit */
  6. import { LightShadow } from '../../../../src/lights/LightShadow';
  7. import { OrthographicCamera } from '../../../../src/cameras/OrthographicCamera';
  8. export default QUnit.module( 'Lights', () => {
  9. QUnit.module( 'LightShadow', () => {
  10. // INSTANCING
  11. QUnit.todo( "Instancing", ( assert ) => {
  12. assert.ok( false, "everything's gonna be alright" );
  13. } );
  14. // PUBLIC STUFF
  15. QUnit.test( "clone/copy", ( assert ) => {
  16. var a = new LightShadow( new OrthographicCamera( - 5, 5, 5, - 5, 0.5, 500 ) );
  17. var b = new LightShadow( new OrthographicCamera( - 3, 3, 3, - 3, 0.3, 300 ) );
  18. var c;
  19. assert.notDeepEqual( a, b, "Newly instanced shadows are not equal" );
  20. c = a.clone();
  21. assert.smartEqual( a, c, "Shadows are identical after clone()" );
  22. c.mapSize.set( 256, 256 );
  23. assert.notDeepEqual( a, c, "Shadows are different again after change" );
  24. b.copy( a );
  25. assert.smartEqual( a, b, "Shadows are identical after copy()" );
  26. b.mapSize.set( 512, 512 );
  27. assert.notDeepEqual( a, b, "Shadows are different again after change" );
  28. } );
  29. QUnit.todo( "toJSON", ( assert ) => {
  30. assert.ok( false, "everything's gonna be alright" );
  31. } );
  32. } );
  33. } );
粤ICP备19079148号