test.js 734 B

1234567891011121314151617181920212223242526272829303132333435
  1. /**
  2. * For testing whether the node modules for three and three-math work properly.
  3. *
  4. * To test the node modules:
  5. * 1. First build them, but don't submit them to npm, see README.md for instructions
  6. * 2. Run "node test.js"
  7. * 3. You should see a list of all of the types exposed by the two THREE modules.
  8. *
  9. * @author bhouston / http://exocortex.com
  10. */
  11. var threemath = function () {
  12. var THREE = require( "three-math" );
  13. var a = new THREE.Vector3( 1, 1, 1 );
  14. console.log( a );
  15. for( var i in THREE ) {
  16. console.log( i );
  17. }
  18. };
  19. var three = function () {
  20. var THREE = require( "three" );
  21. var a = new THREE.Vector3( 1, 1, 1 );
  22. console.log( a );
  23. for( var i in THREE ) {
  24. console.log( i );
  25. }
  26. };
  27. threemath();
  28. three();