Merge pull request #24 from ffelini/patch-1

DirectionalLightShadow.removeCaster() added
This commit is contained in:
Andrey Kopysov
2012-09-20 03:50:49 -07:00

View File

@@ -819,6 +819,15 @@ package alternativa.engine3d.shadows {
} }
} }
/**
* Removes given object from shadow casters list.
* @param object Object which should be removed from shadow casters list.
*/
public function removeCaster(object:Object3D):void {
var index:int = _casters.indexOf(object);
if (index < 0) throw new Error("Caster not found");
_casters[index] = _casters.pop();
}
/** /**
* Clears the list of objects, which cast shadow. * Clears the list of objects, which cast shadow.
*/ */