extend("fiskheroes:hero_basic");
loadTextures({
    "layer1": "knights:zeus_layer1",
    "layer2": "knights:zeus_layer2",
    "cape": "knights:zeus_cape"
});
var utils = implement("fiskheroes:external/utils");
var capes = implement("fiskheroes:external/capes");

var cape;

function initEffects(renderer) {
 var color = 0xFFFFFF;
var beam = renderer.createResource("BEAM_RENDERER", "fiskheroes:mysterio_beam");
utils.bindTrail(renderer, "knights:blur");
utils.bindBeam(renderer, "fiskheroes:energy_projection", beam, "body", 0xFFFFFF, [
    { "firstPerson": [0.2, 4, -4.0], "offset": [0.2, 1.7, -4.0], "size": [20, 1.5] },
]).setParticles(renderer.createResource("PARTICLE_EMITTER", "fiskheroes:impact_energy_projection"));

var physics = renderer.createResource("CAPE_PHYSICS", null);
    physics.maxFlare = 0.4;
    cape = capes.createDefault(renderer, 24, "fiskheroes:cape_default.mesh.json", physics);
    cape.effect.texture.set("cape");
    cape.effect.width = 12;
}
function initAnimations(renderer) {
    parent.initAnimations(renderer);
    utils.addFlightAnimation(renderer, "mmcw.FLIGHT", "fiskheroes:flight/default_arms_forward.anim.json");
    utils.addHoverAnimation(renderer, "mmcw.HOVER", "fiskheroes:flight/idle/neutral");
   }

function render(entity, renderLayer, isFirstPersonArm) {
    if (!isFirstPersonArm && renderLayer == "CHESTPLATE") {
        cape.render(entity);
    }
}