jax 0.0.0.2 → 0.0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -6614,7 +6614,7 @@ Jax.Texture = (function() {
6614
6614
  }
6615
6615
 
6616
6616
  function isPoT(s) {
6617
- return s && (s & -s == s);
6617
+ return s && (s & -s) == s;
6618
6618
  }
6619
6619
 
6620
6620
  function imageLoaded(self, isImageArray, img) {
data/lib/jax/version.rb CHANGED
@@ -3,7 +3,7 @@ module Jax
3
3
  MAJOR = 0
4
4
  MINOR = 0
5
5
  TINY = 0
6
- PATCH = 2
6
+ PATCH = 3
7
7
 
8
8
  STRING = PATCH == 0 ? "#{MAJOR}.#{MINOR}.#{TINY}" : "#{MAJOR}.#{MINOR}.#{TINY}.#{PATCH}"
9
9
  end
@@ -10,6 +10,27 @@ describe("Material segment 'texture'", function() {
10
10
 
11
11
  afterEach(function() { context.dispose(); });
12
12
 
13
+ it("should not replace options if image is POT", function() {
14
+ matr = new Jax.Material({"ambient":{"red":1.0,"green":1.0,"blue":1.0,"alpha":1.0},
15
+ "diffuse":{"red":1.0,"green":1.0,"blue":1.0,"alpha":1.0},
16
+ "specular":{"red":1.0,"green":1.0,"blue":1.0,"alpha":1.0},
17
+ "shininess":30,
18
+ "layers":[
19
+ {"type":"Lighting"},
20
+ {"type":"Texture","path":"/images/rock.png","flip_y":false,"scale_x":1.0,"scale_y":1.0,"generate_mipmap":true,"min_filter":"GL_NEAREST","mag_filter":"GL_NEAREST","mipmap_hint":"GL_DONT_CARE","format":"GL_RGBA","data_type":"GL_UNSIGNED_BYTE","wrap_s":"GL_REPEAT","wrap_t":"GL_REPEAT","premultiply_alpha":false,"colorspace_conversion":true},
21
+ {"type":"NormalMap","path":"/images/rockNormal.png","flip_y":false,"scale_x":1.0,"scale_y":1.0,"generate_mipmap":true,"min_filter":"GL_NEAREST","mag_filter":"GL_NEAREST","mipmap_hint":"GL_DONT_CARE","format":"GL_RGBA","data_type":"GL_UNSIGNED_BYTE","wrap_s":"GL_REPEAT","wrap_t":"GL_REPEAT","premultiply_alpha":false,"colorspace_conversion":true}
22
+ ]
23
+ });
24
+
25
+ waitsFor(function() {
26
+ if (matr.layers[1].texture.loaded) {
27
+ expect(Jax.Util.enumName(matr.layers[1].texture.options.wrap_s)).toEqual("GL_REPEAT");
28
+ return true;
29
+ }
30
+ return false;
31
+ });
32
+ });
33
+
13
34
  it("should compile successfully", function() {
14
35
  matr.addLayer(new Jax.Material.Texture(new Jax.Texture("/images/rss.png")));
15
36
 
@@ -11,7 +11,7 @@ Jax.Texture = (function() {
11
11
  }
12
12
 
13
13
  function isPoT(s) {
14
- return s && (s & -s == s);
14
+ return s && (s & -s) == s;
15
15
  }
16
16
 
17
17
  function imageLoaded(self, isImageArray, img) {
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: jax
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.0.2
5
+ version: 0.0.0.3
6
6
  platform: ruby
7
7
  authors:
8
8
  - Colin MacKenzie IV
@@ -636,7 +636,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
636
636
  requirements:
637
637
  - - ">="
638
638
  - !ruby/object:Gem::Version
639
- hash: -1597188045016768330
639
+ hash: 2432223765413461543
640
640
  segments:
641
641
  - 0
642
642
  version: "0"
@@ -645,7 +645,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
645
645
  requirements:
646
646
  - - ">="
647
647
  - !ruby/object:Gem::Version
648
- hash: -1597188045016768330
648
+ hash: 2432223765413461543
649
649
  segments:
650
650
  - 0
651
651
  version: "0"