mirror of
https://github.com/MapMakersAndProgrammers/Alternativa3D.git
synced 2025-10-26 09:59:10 -07:00
Merge pull request #36 from NordonOscillius/patch-1
OmniLightShadow.removeCaster() method fix
This commit is contained in:
@@ -901,8 +901,13 @@ package alternativa.engine3d.shadows {
|
|||||||
public function removeCaster(object:Object3D):void {
|
public function removeCaster(object:Object3D):void {
|
||||||
var index:int = _casters.indexOf(object);
|
var index:int = _casters.indexOf(object);
|
||||||
if (index < 0) throw new Error("Caster not found");
|
if (index < 0) throw new Error("Caster not found");
|
||||||
|
if (index == _casters.length - 1) {
|
||||||
|
_casters.pop();
|
||||||
|
}
|
||||||
|
else {
|
||||||
_casters[index] = _casters.pop();
|
_casters[index] = _casters.pop();
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Clears the list of objects, that cast shadow.
|
* Clears the list of objects, that cast shadow.
|
||||||
|
|||||||
Reference in New Issue
Block a user