extend("fiskheroes:hero_basic");
loadTextures({
    "layer1": "soulhp:moonknight_layer1",
    "layer2": "soulhp:moonknight_layer1",
    "cape": "soulhp:moonknight_cape",
});

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

var capes = implement("fiskheroes:external/capes");


var cape;


function initEffects(renderer) {

    var physics = renderer.createResource("CAPE_PHYSICS", null);
    physics.maxFlare = 0.4;
    physics.flareDegree = 1.5;
    physics.flareFactor = 1.2;
    physics.flareElasticity = 5;

    cape = capes.createGlider(renderer, 24, "soulhp:cape_moonknight.mesh.json", physics);
    cape.effect.texture.set("cape");





}

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