BoxGeometry.tests.js 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. /**
  2. * @author TristanVALCKE / https://github.com/Itee
  3. * @author Anonymous
  4. */
  5. /* global QUnit */
  6. import { runStdGeometryTests } from '../../qunit-utils';
  7. import {
  8. BoxGeometry,
  9. BoxBufferGeometry
  10. } from '../../../../src/geometries/BoxGeometry';
  11. export default QUnit.module( 'Geometries', () => {
  12. QUnit.module( 'BoxGeometry', ( hooks ) => {
  13. var geometries = undefined;
  14. hooks.beforeEach( function () {
  15. const parameters = {
  16. width: 10,
  17. height: 20,
  18. depth: 30,
  19. widthSegments: 2,
  20. heightSegments: 3,
  21. depthSegments: 4
  22. };
  23. geometries = [
  24. new BoxGeometry(),
  25. new BoxGeometry( parameters.width, parameters.height, parameters.depth ),
  26. new BoxGeometry( parameters.width, parameters.height, parameters.depth, parameters.widthSegments, parameters.heightSegments, parameters.depthSegments )
  27. ];
  28. } );
  29. // INHERITANCE
  30. QUnit.todo( "Extending", ( assert ) => {
  31. assert.ok( false, "everything's gonna be alright" );
  32. } );
  33. // INSTANCING
  34. QUnit.todo( "Instancing", ( assert ) => {
  35. assert.ok( false, "everything's gonna be alright" );
  36. } );
  37. // OTHERS
  38. QUnit.test( 'Standard geometry tests', ( assert ) => {
  39. runStdGeometryTests( assert, geometries );
  40. } );
  41. } );
  42. QUnit.module( 'BoxBufferGeometry', ( hooks ) => {
  43. var geometries = undefined;
  44. hooks.beforeEach( function () {
  45. const parameters = {
  46. width: 10,
  47. height: 20,
  48. depth: 30,
  49. widthSegments: 2,
  50. heightSegments: 3,
  51. depthSegments: 4
  52. };
  53. geometries = [
  54. new BoxBufferGeometry(),
  55. new BoxBufferGeometry( parameters.width, parameters.height, parameters.depth ),
  56. new BoxBufferGeometry( parameters.width, parameters.height, parameters.depth, parameters.widthSegments, parameters.heightSegments, parameters.depthSegments )
  57. ];
  58. } );
  59. // INHERITANCE
  60. QUnit.todo( "Extending", ( assert ) => {
  61. assert.ok( false, "everything's gonna be alright" );
  62. } );
  63. // INSTANCING
  64. QUnit.todo( "Instancing", ( assert ) => {
  65. assert.ok( false, "everything's gonna be alright" );
  66. } );
  67. // OTHERS
  68. QUnit.test( 'Standard geometry tests', ( assert ) => {
  69. runStdGeometryTests( assert, geometries );
  70. } );
  71. } );
  72. } );
粤ICP备19079148号