Permalink
Browse files

First commit

  • Loading branch information...
pboyer pboyer
pboyer authored and pboyer committed May 20, 2013
0 parents commit 01d6ab1d5a0c3343152448f91bf6a0c5d311dd43
Showing with 16,017 additions and 0 deletions.
  1. +3 −0 .bowerrc
  2. +21 −0 .editorconfig
  3. +1 −0 .gitattributes
  4. +6 −0 .gitignore
  5. +22 −0 .jshintrc
  6. +322 −0 Gruntfile.js
  7. +553 −0 app/.htaccess
  8. +157 −0 app/404.html
  9. BIN app/favicon.ico
  10. BIN app/images/arrow_left.png
  11. BIN app/images/arrow_right.png
  12. BIN app/images/glyphicons-halflings-white.png
  13. BIN app/images/glyphicons-halflings.png
  14. BIN app/images/toggle_vis.png
  15. BIN app/images/vis_off.png
  16. +149 −0 app/index.html
  17. +3 −0 app/robots.txt
  18. BIN app/scripts/collections/.DS_Store
  19. +10 −0 app/scripts/collections/Connections.js
  20. +21 −0 app/scripts/collections/LibraryElements.js
  21. +41 −0 app/scripts/collections/Nodes.js
  22. +9 −0 app/scripts/collections/Workspaces.js
  23. +185 −0 app/scripts/lib/3d.js
  24. +109 −0 app/scripts/lib/ThreeCSG.js
  25. +516 −0 app/scripts/lib/TrackballControls.js
  26. +595 −0 app/scripts/lib/csg.js
  27. +432 −0 app/scripts/lib/flood/flood.js
  28. +156 −0 app/scripts/lib/flood/flood_csg.js
  29. +92 −0 app/scripts/lib/flood/flood_test.js
  30. +165 −0 app/scripts/lib/flood/scheme.js
  31. +6 −0 app/scripts/lib/stats.js
  32. +1 −0 app/scripts/lib/zoomooz.js
  33. +167 −0 app/scripts/main.js
  34. +82 −0 app/scripts/models/App.js
  35. +84 −0 app/scripts/models/Connection.js
  36. +19 −0 app/scripts/models/Help.js
  37. +17 −0 app/scripts/models/LibraryElement.js
  38. +17 −0 app/scripts/models/Login.js
  39. +214 −0 app/scripts/models/Node.js
  40. +19 −0 app/scripts/models/Search.js
  41. +17 −0 app/scripts/models/Settings.js
  42. +195 −0 app/scripts/models/Workspace.js
  43. +15 −0 app/scripts/routers/WorkspaceRouter.js
  44. BIN app/scripts/views/.DS_Store
  45. +251 −0 app/scripts/views/AppView.js
  46. +105 −0 app/scripts/views/ConnectionView.js
  47. +28 −0 app/scripts/views/LibraryElementView.js
  48. +245 −0 app/scripts/views/NodeViews/Base.js
  49. +18 −0 app/scripts/views/NodeViews/NodeViews.js
  50. +39 −0 app/scripts/views/NodeViews/Num.js
  51. +122 −0 app/scripts/views/NodeViews/ThreeCSG.js
  52. +15 −0 app/scripts/views/NodeViews/Watch.js
  53. +63 −0 app/scripts/views/SearchView.js
  54. +49 −0 app/scripts/views/WorkspaceTabView.js
  55. +176 −0 app/scripts/views/WorkspaceView.js
  56. +18 −0 app/session.json
  57. +997 −0 app/styles/main.css
  58. +13 −0 bower.json
  59. +31 −0 package.json
  60. +23 −0 test/index.html
  61. +3,809 −0 test/lib/chai.js
  62. +12 −0 test/lib/expect.js
  63. +231 −0 test/lib/mocha/mocha.css
  64. +5,340 −0 test/lib/mocha/mocha.js
  65. +11 −0 test/spec/test.js
@@ -0,0 +1,3 @@
+{
+ "directory": "app/bower_components"
+}
@@ -0,0 +1,21 @@
+# EditorConfig helps developers define and maintain consistent
+# coding styles between different editors and IDEs
+# editorconfig.org
+
+root = true
+
+
+[*]
+
+# Change these settings to your own preference
+indent_style = space
+indent_size = 4
+
+# We recommend you to keep these unchanged
+end_of_line = lf
+charset = utf-8
+trim_trailing_whitespace = true
+insert_final_newline = true
+
+[*.md]
+trim_trailing_whitespace = false
@@ -0,0 +1 @@
+* text=auto
@@ -0,0 +1,6 @@
+node_modules
+temp
+dist
+.sass-cache
+app/bower_components
+.tmp/
@@ -0,0 +1,22 @@
+{
+ "node": true,
+ "browser": true,
+ "es5": true,
+ "esnext": true,
+ "bitwise": true,
+ "camelcase": true,
+ "curly": true,
+ "eqeqeq": true,
+ "immed": true,
+ "indent": 4,
+ "latedef": true,
+ "newcap": true,
+ "noarg": true,
+ "quotmark": "single",
+ "regexp": true,
+ "undef": true,
+ "unused": true,
+ "strict": true,
+ "trailing": true,
+ "smarttabs": true
+}
@@ -0,0 +1,322 @@
+'use strict';
+var lrSnippet = require('grunt-contrib-livereload/lib/utils').livereloadSnippet;
+var mountFolder = function (connect, dir) {
+ return connect.static(require('path').resolve(dir));
+};
+
+// # Globbing
+// for performance reasons we're only matching one level down:
+// 'test/spec/{,*/}*.js'
+// use this if you want to match all subfolders:
+// 'test/spec/**/*.js'
+// templateFramework: 'lodash'
+
+module.exports = function (grunt) {
+ // load all grunt tasks
+ require('matchdep').filterDev('grunt-*').forEach(grunt.loadNpmTasks);
+
+ // configurable paths
+ var yeomanConfig = {
+ app: 'app',
+ dist: 'dist'
+ };
+
+ grunt.initConfig({
+ yeoman: yeomanConfig,
+ watch: {
+ coffee: {
+ files: ['<%= yeoman.app %>/scripts/{,*/}*.coffee'],
+ tasks: ['coffee:dist']
+ },
+ coffeeTest: {
+ files: ['test/spec/{,*/}*.coffee'],
+ tasks: ['coffee:test']
+ },
+ compass: {
+ files: ['<%= yeoman.app %>/styles/{,*/}*.{scss,sass}'],
+ tasks: ['compass']
+ },
+ livereload: {
+ files: [
+ '<%= yeoman.app %>/*.html',
+ '{.tmp,<%= yeoman.app %>}/styles/{,*/}*.css',
+ '{.tmp,<%= yeoman.app %>}/scripts/{,*/}*.js',
+ '<%= yeoman.app %>/images/{,*/}*.{png,jpg,jpeg,gif,webp}'
+ ],
+ tasks: ['livereload']
+ },
+ jst: {
+ files: [
+ '<%= yeoman.app %>/scripts/templates/*.ejs'
+ ],
+ tasks: ['jst']
+ }
+ },
+ connect: {
+ options: {
+ port: 9000,
+ // change this to '0.0.0.0' to access the server from outside
+ hostname: 'localhost'
+ },
+ livereload: {
+ options: {
+ middleware: function (connect) {
+ return [
+ lrSnippet,
+ mountFolder(connect, '.tmp'),
+ mountFolder(connect, 'app')
+ ];
+ }
+ }
+ },
+ test: {
+ options: {
+ middleware: function (connect) {
+ return [
+ mountFolder(connect, '.tmp'),
+ mountFolder(connect, 'test')
+ ];
+ }
+ }
+ },
+ dist: {
+ options: {
+ middleware: function (connect) {
+ return [
+ mountFolder(connect, 'dist')
+ ];
+ }
+ }
+ }
+ },
+ open: {
+ server: {
+ path: 'http://localhost:<%= connect.options.port %>'
+ }
+ },
+ clean: {
+ dist: ['.tmp', '<%= yeoman.dist %>/*'],
+ server: '.tmp'
+ },
+ jshint: {
+ options: {
+ jshintrc: '.jshintrc'
+ },
+ all: [
+ 'Gruntfile.js',
+ '<%= yeoman.app %>/scripts/{,*/}*.js',
+ '!<%= yeoman.app %>/scripts/vendor/*',
+ 'test/spec/{,*/}*.js'
+ ]
+ },
+ mocha: {
+ all: {
+ options: {
+ run: true,
+ urls: ['http://localhost:<%= connect.options.port %>/index.html']
+ }
+ }
+ },
+ coffee: {
+ dist: {
+ files: [{
+ // rather than compiling multiple files here you should
+ // require them into your main .coffee file
+ expand: true,
+ cwd: '<%= yeoman.app %>/scripts',
+ src: '*.coffee',
+ dest: '.tmp/scripts',
+ ext: '.js'
+ }]
+ },
+ test: {
+ files: [{
+ expand: true,
+ cwd: '.tmp/spec',
+ src: '*.coffee',
+ dest: 'test/spec'
+ }]
+ }
+ },
+ compass: {
+ options: {
+ sassDir: '<%= yeoman.app %>/styles',
+ cssDir: '.tmp/styles',
+ imagesDir: '<%= yeoman.app %>/images',
+ javascriptsDir: '<%= yeoman.app %>/scripts',
+ fontsDir: '<%= yeoman.app %>/styles/fonts',
+ importPath: 'app/bower_components',
+ relativeAssets: true
+ },
+ dist: {},
+ server: {
+ options: {
+ debugInfo: true
+ }
+ }
+ },
+ requirejs: {
+ dist: {
+ // Options: https://github.com/jrburke/r.js/blob/master/build/example.build.js
+ options: {
+ // `name` and `out` is set by grunt-usemin
+ baseUrl: 'app/scripts',
+ optimize: 'none',
+ paths: {
+ 'templates': '../../.tmp/scripts/templates'
+ },
+ // TODO: Figure out how to make sourcemaps work with grunt-usemin
+ // https://github.com/yeoman/grunt-usemin/issues/30
+ //generateSourceMaps: true,
+ // required to support SourceMaps
+ // http://requirejs.org/docs/errors.html#sourcemapcomments
+ preserveLicenseComments: false,
+ useStrict: true,
+ wrap: true,
+ //uglify2: {} // https://github.com/mishoo/UglifyJS2
+ }
+ }
+ },
+ useminPrepare: {
+ html: '<%= yeoman.app %>/index.html',
+ options: {
+ dest: '<%= yeoman.dist %>'
+ }
+ },
+ usemin: {
+ html: ['<%= yeoman.dist %>/{,*/}*.html'],
+ css: ['<%= yeoman.dist %>/styles/{,*/}*.css'],
+ options: {
+ dirs: ['<%= yeoman.dist %>']
+ }
+ },
+ imagemin: {
+ dist: {
+ files: [{
+ expand: true,
+ cwd: '<%= yeoman.app %>/images',
+ src: '{,*/}*.{png,jpg,jpeg}',
+ dest: '<%= yeoman.dist %>/images'
+ }]
+ }
+ },
+ cssmin: {
+ dist: {
+ files: {
+ '<%= yeoman.dist %>/styles/main.css': [
+ '.tmp/styles/{,*/}*.css',
+ '<%= yeoman.app %>/styles/{,*/}*.css'
+ ]
+ }
+ }
+ },
+ htmlmin: {
+ dist: {
+ options: {
+ /*removeCommentsFromCDATA: true,
+ // https://github.com/yeoman/grunt-usemin/issues/44
+ //collapseWhitespace: true,
+ collapseBooleanAttributes: true,
+ removeAttributeQuotes: true,
+ removeRedundantAttributes: true,
+ useShortDoctype: true,
+ removeEmptyAttributes: true,
+ removeOptionalTags: true*/
+ },
+ files: [{
+ expand: true,
+ cwd: '<%= yeoman.app %>',
+ src: '*.html',
+ dest: '<%= yeoman.dist %>'
+ }]
+ }
+ },
+ copy: {
+ dist: {
+ files: [{
+ expand: true,
+ dot: true,
+ cwd: '<%= yeoman.app %>',
+ dest: '<%= yeoman.dist %>',
+ src: [
+ '*.{ico,txt}',
+ '.htaccess',
+ 'images/{,*/}*.{webp,gif}'
+ ]
+ }]
+ }
+ },
+ bower: {
+ all: {
+ rjsConfig: '<%= yeoman.app %>/scripts/main.js'
+ }
+ },
+ jst: {
+ options: {
+ amd: true
+ },
+ compile: {
+ files: {
+ '.tmp/scripts/templates.js': ['<%= yeoman.app %>/scripts/templates/*.ejs']
+ }
+ }
+ }
+ });
+
+ grunt.renameTask('regarde', 'watch');
+
+ grunt.registerTask('createDefaultTemplate', function () {
+ grunt.file.write('.tmp/scripts/templates.js', 'this.JST = this.JST || {};');
+ });
+
+ grunt.registerTask('server', function (target) {
+ if (target === 'dist') {
+ return grunt.task.run(['build', 'open', 'connect:dist:keepalive']);
+ }
+
+ grunt.task.run([
+ 'clean:server',
+ 'coffee:dist',
+ 'createDefaultTemplate',
+ 'jst',
+ 'compass:server',
+ 'livereload-start',
+ 'connect:livereload',
+ 'open',
+ 'watch'
+ ]);
+ });
+
+ grunt.registerTask('test', [
+ 'clean:server',
+ 'coffee',
+ 'createDefaultTemplate',
+ 'jst',
+ 'compass',
+ 'connect:test',
+ 'mocha'
+ ]);
+
+ grunt.registerTask('build', [
+ 'clean:dist',
+ 'coffee',
+ 'createDefaultTemplate',
+ 'jst',
+ 'compass:dist',
+ 'useminPrepare',
+ 'requirejs',
+ 'imagemin',
+ 'htmlmin',
+ 'concat',
+ 'cssmin',
+ 'uglify',
+ 'copy',
+ 'usemin'
+ ]);
+
+ grunt.registerTask('default', [
+ 'jshint',
+ 'test',
+ 'build'
+ ]);
+};
Oops, something went wrong.

0 comments on commit 01d6ab1

Please sign in to comment.