BoxHelper.tests.js 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. /**
  2. * @author TristanVALCKE / https://github.com/Itee
  3. * @author Anonymous
  4. */
  5. /* global QUnit */
  6. import { BoxHelper } from '../../../../src/helpers/BoxHelper';
  7. import { BoxGeometry } from '../../../../src/geometries/BoxGeometry';
  8. import { SphereGeometry } from '../../../../src/geometries/SphereGeometry';
  9. import { Mesh } from '../../../../src/objects/Mesh';
  10. export default QUnit.module( 'Helpers', () => {
  11. QUnit.module.todo( 'BoxHelper', ( hooks ) => {
  12. var geometries = undefined;
  13. hooks.beforeEach( function () {
  14. const parameters = {
  15. radius: 10,
  16. widthSegments: 20,
  17. heightSegments: 30,
  18. phiStart: 0.5,
  19. phiLength: 1.0,
  20. thetaStart: 0.4,
  21. thetaLength: 2.0,
  22. };
  23. // Test with a normal cube and a box helper
  24. var boxGeometry = new BoxGeometry( parameters.diameter );
  25. var box = new Mesh( boxGeometry );
  26. var boxHelper = new BoxHelper( box );
  27. // The same should happen with a comparable sphere
  28. var sphereGeometry = new SphereGeometry( parameters.diameter / 2 );
  29. var sphere = new Mesh( sphereGeometry );
  30. var sphereBoxHelper = new BoxHelper( sphere );
  31. // Note that unlike what I'd like to, these doesn't check the equivalency of the two generated geometries
  32. geometries = [ boxHelper.geometry, sphereBoxHelper.geometry ];
  33. } );
  34. // INHERITANCE
  35. QUnit.test( "Extending", ( assert ) => {
  36. assert.ok( false, "everything's gonna be alright" );
  37. } );
  38. // INSTANCING
  39. QUnit.test( "Instancing", ( assert ) => {
  40. assert.ok( false, "everything's gonna be alright" );
  41. } );
  42. // PUBLIC STUFF
  43. QUnit.test( "update", ( assert ) => {
  44. assert.ok( false, "everything's gonna be alright" );
  45. } );
  46. QUnit.test( "setFromObject", ( assert ) => {
  47. assert.ok( false, "everything's gonna be alright" );
  48. } );
  49. // OTHERS
  50. QUnit.test( 'Standard geometry tests', ( assert ) => {
  51. runStdGeometryTests( assert, geometries );
  52. } );
  53. } );
  54. } );
粤ICP备19079148号