extend("fiskheroes:hero_basic");
loadTextures({
	"layer1": "tgheroes:prowler/prowelr_ps4_1",
    "layer2": "tgheroes:prowler/prowelr_ps4_2",
	"web_wings": "tgheroes:prowler/prowler_wings",
    "claws": "tgheroes:white_tiger/whitetiger/white_tiger_claws"
});

var utils = implement("fiskheroes:external/utils");
var overlay;
var web_wings;

function initEffects(renderer) {
	web_wings = renderer.createEffect("fiskheroes:wingsuit");
    web_wings.texture.set("web_wings");
    web_wings.opacity = 1.0;
    
	overlay = renderer.createEffect("fiskheroes:overlay");
    overlay.texture.set("claws");
	
	utils.bindBeam(renderer, "fiskheroes:repulsor_blast", "fiskheroes:repulsor_blast", "body", 0x00e600, [
        { "firstPerson": [-4.5, 3.75, -7.0], "offset": [-0.5, 9.0, 0.0], "size": [1.0, 1.0],  "anchor": "rightArm" }
    ]);
}

function render(entity, renderLayer, isFirstPersonArm) {
    if (renderLayer == "CHESTPLATE" && entity.getData("fiskheroes:blade")) {
        overlay.render(); 
    };
	if (!isFirstPersonArm && renderLayer == "CHESTPLATE") {
        web_wings.unfold = entity.getInterpolatedData("fiskheroes:wing_animation_timer");
        web_wings.render();
    }
}

