spec/javascripts/jax/webgl/lighting_spec.js in jax-2.0.4 vs spec/javascripts/jax/webgl/lighting_spec.js in jax-2.0.5
- old
+ new
@@ -1,7 +1,24 @@
describe("LightManager", function() {
var mgr;
+ describe("when a light resource is defined with shadowcasting disabled", function() {
+ beforeEach(function() {
+ LightSource.addResources({"__test_shadowcast_disabled":{
+ shadowcaster:!1,enabled:!0,
+ position:{x:-20,y:0,z:0},
+ type:"POINT_LIGHT",
+ attenuation:{constant:0,linear:1,quadratic:0},
+ color:{ambient:{red:.15,green:.15,blue:.15,alpha:1},
+ diffuse:{red:.33,green:.1843137254901961,blue:.12679738562091503,alpha:1},
+ specular:{red:0,green:0,blue:0,alpha:0}}}});
+ });
+
+ it("should not be a shadow caster", function() {
+ expect(LightSource.find("__test_shadowcast_disabled").isShadowCaster()).toBeFalsy();
+ });
+ });
+
describe("when more than 1 light source is active", function() {
beforeEach(function() {
mgr = new Jax.Scene.LightManager();
mgr.add(new Jax.Scene.LightSource());
mgr.add(new Jax.Scene.LightSource());