1
0
forked from Onek8/LNXSDK
Files
LNXSDK/leenkx/Sources/leenkx/logicnode/SetSpotLightBlendNode.hx

30 lines
533 B
Haxe

package leenkx.logicnode;
import iron.object.LightObject;
class SetSpotLightBlendNode extends LogicNode {
public function new(tree: LogicTree) {
super(tree);
}
override function run(from: Int) {
var light: LightObject = inputs[1].get();
var blend: Float = inputs[2].get();
if (light == null){ runOutput(0); return; }
#if lnx_spot
if (light.data.raw.type == "spot"){
#if lnx_single_point
light.data.raw.spot_blend = blend / 10;
#else
light.blend = blend / 10;
#end
}
#end
runOutput(0);
}
}