Permalink
Browse files

refactor & optimizations

  • Loading branch information...
1 parent 81bbeb3 commit 145f3b360de00f24bcaef04e5ad9fa83b9589cd3 @jlongster committed May 18, 2011
Showing with 10,139 additions and 518 deletions.
  1. +161 −0 404.js
  2. +2 −0 404.mtl
  3. +327 −0 404.obj
  4. +2 −2 app.js
  5. +76 −85 dom3d.js
  6. +2 −2 dump-vertices.scm
  7. +4 −1 example.css
  8. +1 −1 example.html
  9. +17 −31 example.js
  10. +1 −1 example2.html
  11. +23 −19 example2.js
  12. +4 −4 example3.js
  13. +25 −0 example4.html
  14. +58 −0 example4.js
  15. +4 −4 heap.js
  16. +1 −4 index.html
  17. +8,923 −3 jquery.js
  18. +108 −108 snake.js
  19. +0 −1 sylvester.js
  20. +1 −1 teapot.html
  21. +189 −189 teapot.js
  22. +62 −62 untitled2.js
  23. +148 −0 vector.js
View
Oops, something went wrong.
View
@@ -0,0 +1,2 @@
+# Blender MTL File: ''
+# Material Count: 0
View
@@ -0,0 +1,327 @@
+# Blender v2.57 (sub 0) OBJ File: ''
+# www.blender.org
+mtllib 404.mtl
+o Text_Mesh
+v 2.149468 -1.060058 0.874938
+v 1.680794 -1.060058 0.874938
+v 1.680794 -0.620374 0.874938
+v 1.121929 -0.620374 0.874938
+v 0.849744 -0.188744 0.874938
+v 1.634088 1.268815 0.874938
+v 1.827355 1.268815 0.874938
+v 2.149468 0.946703 0.874938
+v 2.149468 -0.191965 0.874938
+v 2.360451 -0.191965 0.874938
+v 2.360451 -0.597826 0.874938
+v 2.149468 -0.597826 0.874938
+v 1.680794 0.561778 0.874938
+v 1.310364 -0.214513 0.874938
+v 1.680794 -0.214513 0.874938
+v 0.664529 1.268815 0.874938
+v 0.664529 -0.739556 0.874938
+v 0.318258 -1.060058 0.874938
+v -0.715723 -1.060058 0.874938
+v -0.715723 0.948313 0.874938
+v -0.367842 1.268815 0.874938
+v 0.176528 0.825911 0.874938
+v -0.226112 0.825911 0.874938
+v -0.226112 -0.618764 0.874938
+v 0.176528 -0.618764 0.874938
+v -1.099037 -1.060058 0.874938
+v -1.567711 -1.060058 0.874938
+v -1.567711 -0.620374 0.874938
+v -2.126576 -0.620374 0.874938
+v -2.398761 -0.188744 0.874938
+v -1.614417 1.268815 0.874938
+v -1.421149 1.268815 0.874938
+v -1.099037 0.946703 0.874938
+v -1.099037 -0.191965 0.874938
+v -0.888053 -0.191965 0.874938
+v -0.888053 -0.597826 0.874938
+v -1.099037 -0.597826 0.874938
+v -1.567711 0.561778 0.874938
+v -1.938140 -0.214513 0.874938
+v -1.567711 -0.214513 0.874938
+v 2.149468 -1.060058 -0.874938
+v 1.680794 -1.060058 -0.874938
+v 1.680794 -0.620374 -0.874938
+v 1.121929 -0.620374 -0.874938
+v 0.849744 -0.188744 -0.874938
+v 1.634088 1.268815 -0.874938
+v 1.827355 1.268815 -0.874938
+v 2.149468 0.946703 -0.874938
+v 2.149468 -0.191965 -0.874938
+v 2.360451 -0.191965 -0.874938
+v 2.360451 -0.597826 -0.874938
+v 2.149468 -0.597826 -0.874938
+v 1.680794 0.561778 -0.874938
+v 1.310364 -0.214513 -0.874938
+v 1.680794 -0.214513 -0.874938
+v 0.664529 1.268815 -0.874938
+v 0.664529 -0.739556 -0.874938
+v 0.318258 -1.060058 -0.874938
+v -0.715723 -1.060058 -0.874938
+v -0.715723 0.948313 -0.874938
+v -0.367842 1.268815 -0.874938
+v 0.176528 0.825911 -0.874938
+v -0.226112 0.825911 -0.874938
+v -0.226112 -0.618764 -0.874938
+v 0.176528 -0.618764 -0.874938
+v -1.099037 -1.060058 -0.874938
+v -1.567711 -1.060058 -0.874938
+v -1.567711 -0.620374 -0.874938
+v -2.126576 -0.620374 -0.874938
+v -2.398761 -0.188744 -0.874938
+v -1.614417 1.268815 -0.874938
+v -1.421149 1.268815 -0.874938
+v -1.099037 0.946703 -0.874938
+v -1.099037 -0.191965 -0.874938
+v -0.888053 -0.191965 -0.874938
+v -0.888053 -0.597826 -0.874938
+v -1.099037 -0.597826 -0.874938
+v -1.567711 0.561778 -0.874938
+v -1.938140 -0.214513 -0.874938
+v -1.567711 -0.214513 -0.874938
+v -1.099037 -1.060058 -0.874938
+v -1.099037 -1.060058 0.874938
+v -1.567711 -1.060058 -0.874938
+v -1.567711 -1.060058 0.874938
+v -1.567711 -0.620374 -0.874938
+v -1.567711 -0.620374 0.874938
+v -2.126576 -0.620374 -0.874938
+v -2.126576 -0.620374 0.874938
+v -2.398761 -0.188744 -0.874938
+v -2.398761 -0.188744 0.874938
+v -1.614417 1.268815 -0.874938
+v -1.614417 1.268815 0.874938
+v -1.421149 1.268815 -0.874938
+v -1.421149 1.268815 0.874938
+v -1.099037 0.946703 -0.874938
+v -1.099037 0.946703 0.874938
+v -1.099037 -0.191965 -0.874938
+v -1.099037 -0.191965 0.874938
+v -0.888053 -0.191965 -0.874938
+v -0.888053 -0.191965 0.874938
+v -0.888053 -0.597826 -0.874938
+v -0.888053 -0.597826 0.874938
+v -1.099037 -0.597826 -0.874938
+v -1.099037 -0.597826 0.874938
+v -1.567711 0.561778 -0.874938
+v -1.567711 0.561778 0.874938
+v -1.938140 -0.214513 -0.874938
+v -1.938140 -0.214513 0.874938
+v -1.567711 -0.214513 -0.874938
+v -1.567711 -0.214513 0.874938
+v 0.664529 1.268815 -0.874938
+v 0.664529 1.268815 0.874938
+v 0.664529 -0.739556 -0.874938
+v 0.664529 -0.739556 0.874938
+v 0.318258 -1.060058 -0.874938
+v 0.318258 -1.060058 0.874938
+v -0.715723 -1.060058 -0.874938
+v -0.715723 -1.060058 0.874938
+v -0.715723 0.948313 -0.874938
+v -0.715723 0.948313 0.874938
+v -0.367842 1.268815 -0.874938
+v -0.367842 1.268815 0.874938
+v 0.176528 0.825911 -0.874938
+v 0.176528 0.825911 0.874938
+v -0.226112 0.825911 -0.874938
+v -0.226112 0.825911 0.874938
+v -0.226112 -0.618764 -0.874938
+v -0.226112 -0.618764 0.874938
+v 0.176528 -0.618764 -0.874938
+v 0.176528 -0.618764 0.874938
+v 2.149468 -1.060058 -0.874938
+v 2.149468 -1.060058 0.874938
+v 1.680794 -1.060058 -0.874938
+v 1.680794 -1.060058 0.874938
+v 1.680794 -0.620374 -0.874938
+v 1.680794 -0.620374 0.874938
+v 1.121929 -0.620374 -0.874938
+v 1.121929 -0.620374 0.874938
+v 0.849744 -0.188744 -0.874938
+v 0.849744 -0.188744 0.874938
+v 1.634088 1.268815 -0.874938
+v 1.634088 1.268815 0.874938
+v 1.827355 1.268815 -0.874938
+v 1.827355 1.268815 0.874938
+v 2.149468 0.946703 -0.874938
+v 2.149468 0.946703 0.874938
+v 2.149468 -0.191965 -0.874938
+v 2.149468 -0.191965 0.874938
+v 2.360451 -0.191965 -0.874938
+v 2.360451 -0.191965 0.874938
+v 2.360451 -0.597826 -0.874938
+v 2.360451 -0.597826 0.874938
+v 2.149468 -0.597826 -0.874938
+v 2.149468 -0.597826 0.874938
+v 1.680794 0.561778 -0.874938
+v 1.680794 0.561778 0.874938
+v 1.310364 -0.214513 -0.874938
+v 1.310364 -0.214513 0.874938
+v 1.680794 -0.214513 -0.874938
+v 1.680794 -0.214513 0.874938
+usemtl (null)
+s off
+f 5 7 6
+f 5 13 7
+f 13 8 7
+f 13 9 8
+f 5 14 13
+f 15 9 13
+f 4 14 5
+f 15 10 9
+f 15 11 10
+f 4 15 14
+f 4 12 15
+f 12 11 15
+f 4 3 12
+f 3 1 12
+f 2 1 3
+f 20 16 21
+f 20 23 16
+f 23 22 16
+f 22 17 16
+f 19 23 20
+f 19 24 23
+f 25 17 22
+f 19 25 24
+f 19 17 25
+f 19 18 17
+f 30 32 31
+f 30 38 32
+f 38 33 32
+f 38 34 33
+f 30 39 38
+f 40 34 38
+f 29 39 30
+f 40 35 34
+f 40 36 35
+f 29 40 39
+f 29 37 40
+f 37 36 40
+f 29 28 37
+f 28 26 37
+f 27 26 28
+f 47 45 46
+f 53 45 47
+f 48 53 47
+f 49 53 48
+f 54 45 53
+f 49 55 53
+f 54 44 45
+f 50 55 49
+f 51 55 50
+f 55 44 54
+f 52 44 55
+f 51 52 55
+f 43 44 52
+f 41 43 52
+f 41 42 43
+f 56 60 61
+f 63 60 56
+f 62 63 56
+f 57 62 56
+f 63 59 60
+f 64 59 63
+f 57 65 62
+f 65 59 64
+f 57 59 65
+f 58 59 57
+f 72 70 71
+f 78 70 72
+f 73 78 72
+f 74 78 73
+f 79 70 78
+f 74 80 78
+f 79 69 70
+f 75 80 74
+f 76 80 75
+f 80 69 79
+f 77 69 80
+f 76 77 80
+f 68 69 77
+f 66 68 77
+f 66 67 68
+s 1
+f 160 156 155
+f 160 155 159
+f 158 160 159
+f 158 159 157
+f 156 158 157
+f 156 157 155
+f 154 132 131
+f 154 131 153
+f 152 154 153
+f 152 153 151
+f 150 152 151
+f 150 151 149
+f 148 150 149
+f 148 149 147
+f 146 148 147
+f 146 147 145
+f 144 146 145
+f 144 145 143
+f 142 144 143
+f 142 143 141
+f 140 142 141
+f 140 141 139
+f 138 140 139
+f 138 139 137
+f 136 138 137
+f 136 137 135
+f 134 136 135
+f 134 135 133
+f 132 134 133
+f 132 133 131
+f 130 124 123
+f 130 123 129
+f 128 130 129
+f 128 129 127
+f 126 128 127
+f 126 127 125
+f 124 126 125
+f 124 125 123
+f 122 112 111
+f 122 111 121
+f 120 122 121
+f 120 121 119
+f 118 120 119
+f 118 119 117
+f 116 118 117
+f 116 117 115
+f 114 116 115
+f 114 115 113
+f 112 114 113
+f 112 113 111
+f 110 106 105
+f 110 105 109
+f 108 110 109
+f 108 109 107
+f 106 108 107
+f 106 107 105
+f 104 82 81
+f 104 81 103
+f 102 104 103
+f 102 103 101
+f 100 102 101
+f 100 101 99
+f 98 100 99
+f 98 99 97
+f 96 98 97
+f 96 97 95
+f 94 96 95
+f 94 95 93
+f 92 94 93
+f 92 93 91
+f 90 92 91
+f 90 91 89
+f 88 90 89
+f 88 89 87
+f 86 88 87
+f 86 87 85
+f 84 86 85
+f 84 85 83
+f 82 84 83
+f 82 83 81
View
@@ -31,8 +31,8 @@ $(function() {
}
dom3d.init('#boxes', 800, 400);
- dom3d.current_eye($V([7,0,-30]));
- dom3d.current_light($V([-1.0, 0.0, 0.0]).toUnitVector());
+ dom3d.current_eye($v(7,0,-30));
+ dom3d.current_light(vec_unit($v(-1.0, 0.0, 0.0)));
dom3d.current_color($c(200, 255, 200));
dom3d.current_frustum(
dom3d.make_frustum(90.0,
Oops, something went wrong.

0 comments on commit 145f3b3

Please sign in to comment.