jax 2.0.9 → 2.0.10

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,10 @@
1
+ * 2.0.10 *
2
+
3
+ * Resolved an issue with picking where depth testing has failed. Picking would
4
+ previously return the wrong object.
5
+
6
+
7
+
1
8
  * 2.0.9 *
2
9
 
3
10
  * Resolved issue #59: Jax.Mesh.Cube should update its data when any of its faces change
@@ -13,6 +13,7 @@ Jax.World = (function() {
13
13
  function getPickBuffer(self) {
14
14
  if (self.pickBuffer) return self.pickBuffer;
15
15
  return self.pickBuffer = new Jax.Framebuffer({
16
+ depth: true,
16
17
  width:self.context.canvas.width,
17
18
  height:self.context.canvas.height
18
19
  });
@@ -109,6 +110,7 @@ Jax.World = (function() {
109
110
  context.glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
110
111
  context.glDisable(GL_BLEND);
111
112
  world.render({material:"picking"});
113
+
112
114
  // read it back in
113
115
  context.glReadPixels(x1, y1, w, h, GL_RGBA, GL_UNSIGNED_BYTE, data);
114
116
  if (data.data) data = data.data;
@@ -2,7 +2,7 @@ module Jax
2
2
  module Version
3
3
  MAJOR = 2
4
4
  MINOR = 0
5
- PATCH = 9
5
+ PATCH = 10
6
6
  BUILD = nil
7
7
  STRING = BUILD ? [MAJOR, MINOR, PATCH, BUILD].join(".") : [MAJOR, MINOR, PATCH].join(".")
8
8
  end
@@ -50,6 +50,16 @@ describe("Jax.World", function() {
50
50
  it("bottom left", function() { expect(world.pick(at.left, at.bottom) === obottomleft).toBeTruthy(); });
51
51
  it("bottom right", function() { expect(world.pick(at.right,at.bottom) === obottomright).toBeTruthy(); });
52
52
 
53
+ it("object blocked by another larger object", function() {
54
+ var front = world.addObject(new Jax.Model({position: [0.0, 0.0, -0.01], mesh: new Jax.Mesh.Quad({size: 10})}));
55
+ expect(world.pick(at.center_x, at.center_y)).toBe(front);
56
+ });
57
+
58
+ it("object blocking another larger object", function() {
59
+ var rear = world.addObject(new Jax.Model({position: [0.0, 0.0, -7], mesh: new Jax.Mesh.Quad({size: 10})}));
60
+ expect(world.pick(at.center_x, at.center_y)).toBe(ofront);
61
+ });
62
+
53
63
  it("region: everything", function() {
54
64
  var objects = world.pickRegion(at.left, at.top, at.right, at.bottom);
55
65
  expect(objects.indexOf(ofront)).not.toEqual(-1);
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jax
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.9
4
+ version: 2.0.10
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-05-02 00:00:00.000000000Z
12
+ date: 2012-05-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
- requirement: &2157372880 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,15 @@ dependencies:
21
21
  version: '3'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *2157372880
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: '3'
25
30
  - !ruby/object:Gem::Dependency
26
31
  name: jquery-rails
27
- requirement: &2157372260 !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
28
33
  none: false
29
34
  requirements:
30
35
  - - ! '>='
@@ -32,10 +37,15 @@ dependencies:
32
37
  version: '1'
33
38
  type: :runtime
34
39
  prerelease: false
35
- version_requirements: *2157372260
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '1'
36
46
  - !ruby/object:Gem::Dependency
37
47
  name: jasmine
38
- requirement: &2157371460 !ruby/object:Gem::Requirement
48
+ requirement: !ruby/object:Gem::Requirement
39
49
  none: false
40
50
  requirements:
41
51
  - - ~>
@@ -43,10 +53,15 @@ dependencies:
43
53
  version: '1'
44
54
  type: :runtime
45
55
  prerelease: false
46
- version_requirements: *2157371460
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: '1'
47
62
  - !ruby/object:Gem::Dependency
48
63
  name: rest-client
49
- requirement: &2157370820 !ruby/object:Gem::Requirement
64
+ requirement: !ruby/object:Gem::Requirement
50
65
  none: false
51
66
  requirements:
52
67
  - - ~>
@@ -54,10 +69,15 @@ dependencies:
54
69
  version: '1'
55
70
  type: :runtime
56
71
  prerelease: false
57
- version_requirements: *2157370820
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ~>
76
+ - !ruby/object:Gem::Version
77
+ version: '1'
58
78
  - !ruby/object:Gem::Dependency
59
79
  name: rspec
60
- requirement: &2157370220 !ruby/object:Gem::Requirement
80
+ requirement: !ruby/object:Gem::Requirement
61
81
  none: false
62
82
  requirements:
63
83
  - - ~>
@@ -65,10 +85,15 @@ dependencies:
65
85
  version: '2'
66
86
  type: :development
67
87
  prerelease: false
68
- version_requirements: *2157370220
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ~>
92
+ - !ruby/object:Gem::Version
93
+ version: '2'
69
94
  - !ruby/object:Gem::Dependency
70
95
  name: coffee-rails
71
- requirement: &2157369640 !ruby/object:Gem::Requirement
96
+ requirement: !ruby/object:Gem::Requirement
72
97
  none: false
73
98
  requirements:
74
99
  - - ~>
@@ -76,10 +101,15 @@ dependencies:
76
101
  version: '3'
77
102
  type: :development
78
103
  prerelease: false
79
- version_requirements: *2157369640
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ~>
108
+ - !ruby/object:Gem::Version
109
+ version: '3'
80
110
  - !ruby/object:Gem::Dependency
81
111
  name: coderay
82
- requirement: &2157369060 !ruby/object:Gem::Requirement
112
+ requirement: !ruby/object:Gem::Requirement
83
113
  none: false
84
114
  requirements:
85
115
  - - ~>
@@ -87,10 +117,15 @@ dependencies:
87
117
  version: '1'
88
118
  type: :development
89
119
  prerelease: false
90
- version_requirements: *2157369060
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
122
+ requirements:
123
+ - - ~>
124
+ - !ruby/object:Gem::Version
125
+ version: '1'
91
126
  - !ruby/object:Gem::Dependency
92
127
  name: sqlite3
93
- requirement: &2157368500 !ruby/object:Gem::Requirement
128
+ requirement: !ruby/object:Gem::Requirement
94
129
  none: false
95
130
  requirements:
96
131
  - - ~>
@@ -98,10 +133,15 @@ dependencies:
98
133
  version: '1'
99
134
  type: :development
100
135
  prerelease: false
101
- version_requirements: *2157368500
136
+ version_requirements: !ruby/object:Gem::Requirement
137
+ none: false
138
+ requirements:
139
+ - - ~>
140
+ - !ruby/object:Gem::Version
141
+ version: '1'
102
142
  - !ruby/object:Gem::Dependency
103
143
  name: sass-rails
104
- requirement: &2157367880 !ruby/object:Gem::Requirement
144
+ requirement: !ruby/object:Gem::Requirement
105
145
  none: false
106
146
  requirements:
107
147
  - - ~>
@@ -109,10 +149,15 @@ dependencies:
109
149
  version: '3'
110
150
  type: :development
111
151
  prerelease: false
112
- version_requirements: *2157367880
152
+ version_requirements: !ruby/object:Gem::Requirement
153
+ none: false
154
+ requirements:
155
+ - - ~>
156
+ - !ruby/object:Gem::Version
157
+ version: '3'
113
158
  - !ruby/object:Gem::Dependency
114
159
  name: uglifier
115
- requirement: &2157361040 !ruby/object:Gem::Requirement
160
+ requirement: !ruby/object:Gem::Requirement
116
161
  none: false
117
162
  requirements:
118
163
  - - ~>
@@ -120,10 +165,15 @@ dependencies:
120
165
  version: '1'
121
166
  type: :development
122
167
  prerelease: false
123
- version_requirements: *2157361040
168
+ version_requirements: !ruby/object:Gem::Requirement
169
+ none: false
170
+ requirements:
171
+ - - ~>
172
+ - !ruby/object:Gem::Version
173
+ version: '1'
124
174
  - !ruby/object:Gem::Dependency
125
175
  name: genspec
126
- requirement: &2157360200 !ruby/object:Gem::Requirement
176
+ requirement: !ruby/object:Gem::Requirement
127
177
  none: false
128
178
  requirements:
129
179
  - - ! '>='
@@ -131,10 +181,15 @@ dependencies:
131
181
  version: '0'
132
182
  type: :development
133
183
  prerelease: false
134
- version_requirements: *2157360200
184
+ version_requirements: !ruby/object:Gem::Requirement
185
+ none: false
186
+ requirements:
187
+ - - ! '>='
188
+ - !ruby/object:Gem::Version
189
+ version: '0'
135
190
  - !ruby/object:Gem::Dependency
136
191
  name: selenium-webdriver
137
- requirement: &2157358480 !ruby/object:Gem::Requirement
192
+ requirement: !ruby/object:Gem::Requirement
138
193
  none: false
139
194
  requirements:
140
195
  - - ~>
@@ -142,10 +197,15 @@ dependencies:
142
197
  version: '2'
143
198
  type: :development
144
199
  prerelease: false
145
- version_requirements: *2157358480
200
+ version_requirements: !ruby/object:Gem::Requirement
201
+ none: false
202
+ requirements:
203
+ - - ~>
204
+ - !ruby/object:Gem::Version
205
+ version: '2'
146
206
  - !ruby/object:Gem::Dependency
147
207
  name: fakeweb
148
- requirement: &2157357660 !ruby/object:Gem::Requirement
208
+ requirement: !ruby/object:Gem::Requirement
149
209
  none: false
150
210
  requirements:
151
211
  - - ~>
@@ -153,10 +213,15 @@ dependencies:
153
213
  version: '1.3'
154
214
  type: :development
155
215
  prerelease: false
156
- version_requirements: *2157357660
216
+ version_requirements: !ruby/object:Gem::Requirement
217
+ none: false
218
+ requirements:
219
+ - - ~>
220
+ - !ruby/object:Gem::Version
221
+ version: '1.3'
157
222
  - !ruby/object:Gem::Dependency
158
223
  name: ansi
159
- requirement: &2157357120 !ruby/object:Gem::Requirement
224
+ requirement: !ruby/object:Gem::Requirement
160
225
  none: false
161
226
  requirements:
162
227
  - - ! '>='
@@ -164,10 +229,15 @@ dependencies:
164
229
  version: '0'
165
230
  type: :development
166
231
  prerelease: false
167
- version_requirements: *2157357120
232
+ version_requirements: !ruby/object:Gem::Requirement
233
+ none: false
234
+ requirements:
235
+ - - ! '>='
236
+ - !ruby/object:Gem::Version
237
+ version: '0'
168
238
  - !ruby/object:Gem::Dependency
169
239
  name: cucumber-rails
170
- requirement: &2157356060 !ruby/object:Gem::Requirement
240
+ requirement: !ruby/object:Gem::Requirement
171
241
  none: false
172
242
  requirements:
173
243
  - - ~>
@@ -175,10 +245,15 @@ dependencies:
175
245
  version: '1'
176
246
  type: :development
177
247
  prerelease: false
178
- version_requirements: *2157356060
248
+ version_requirements: !ruby/object:Gem::Requirement
249
+ none: false
250
+ requirements:
251
+ - - ~>
252
+ - !ruby/object:Gem::Version
253
+ version: '1'
179
254
  - !ruby/object:Gem::Dependency
180
255
  name: RedCloth
181
- requirement: &2157355120 !ruby/object:Gem::Requirement
256
+ requirement: !ruby/object:Gem::Requirement
182
257
  none: false
183
258
  requirements:
184
259
  - - ~>
@@ -186,10 +261,15 @@ dependencies:
186
261
  version: '4.2'
187
262
  type: :development
188
263
  prerelease: false
189
- version_requirements: *2157355120
264
+ version_requirements: !ruby/object:Gem::Requirement
265
+ none: false
266
+ requirements:
267
+ - - ~>
268
+ - !ruby/object:Gem::Version
269
+ version: '4.2'
190
270
  - !ruby/object:Gem::Dependency
191
271
  name: w3c_validators
192
- requirement: &2157354260 !ruby/object:Gem::Requirement
272
+ requirement: !ruby/object:Gem::Requirement
193
273
  none: false
194
274
  requirements:
195
275
  - - ~>
@@ -197,10 +277,15 @@ dependencies:
197
277
  version: '1.2'
198
278
  type: :development
199
279
  prerelease: false
200
- version_requirements: *2157354260
280
+ version_requirements: !ruby/object:Gem::Requirement
281
+ none: false
282
+ requirements:
283
+ - - ~>
284
+ - !ruby/object:Gem::Version
285
+ version: '1.2'
201
286
  - !ruby/object:Gem::Dependency
202
287
  name: treetop
203
- requirement: &2157353660 !ruby/object:Gem::Requirement
288
+ requirement: !ruby/object:Gem::Requirement
204
289
  none: false
205
290
  requirements:
206
291
  - - ~>
@@ -208,10 +293,15 @@ dependencies:
208
293
  version: 1.4.9
209
294
  type: :development
210
295
  prerelease: false
211
- version_requirements: *2157353660
296
+ version_requirements: !ruby/object:Gem::Requirement
297
+ none: false
298
+ requirements:
299
+ - - ~>
300
+ - !ruby/object:Gem::Version
301
+ version: 1.4.9
212
302
  - !ruby/object:Gem::Dependency
213
303
  name: bluecloth
214
- requirement: &2157353000 !ruby/object:Gem::Requirement
304
+ requirement: !ruby/object:Gem::Requirement
215
305
  none: false
216
306
  requirements:
217
307
  - - ~>
@@ -219,7 +309,12 @@ dependencies:
219
309
  version: 2.0.11
220
310
  type: :development
221
311
  prerelease: false
222
- version_requirements: *2157353000
312
+ version_requirements: !ruby/object:Gem::Requirement
313
+ none: false
314
+ requirements:
315
+ - - ~>
316
+ - !ruby/object:Gem::Version
317
+ version: 2.0.11
223
318
  description: ! "\n Framework for creating rich WebGL-enabled applications using
224
319
  JavaScript and Ruby.\n Can be used stand-alone to create static JavaScript documents,
225
320
  or integrated\n seamlessly with Ruby on Rails to build dynamic WebGL applications.\n
@@ -648,7 +743,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
648
743
  version: '0'
649
744
  segments:
650
745
  - 0
651
- hash: 2869810087449141519
746
+ hash: 1624324542421189653
652
747
  required_rubygems_version: !ruby/object:Gem::Requirement
653
748
  none: false
654
749
  requirements:
@@ -657,10 +752,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
657
752
  version: '0'
658
753
  segments:
659
754
  - 0
660
- hash: 2869810087449141519
755
+ hash: 1624324542421189653
661
756
  requirements: []
662
757
  rubyforge_project: jax
663
- rubygems_version: 1.8.10
758
+ rubygems_version: 1.8.24
664
759
  signing_key:
665
760
  specification_version: 3
666
761
  summary: Framework for creating rich WebGL-enabled applications using JavaScript and