extend("fiskheroes:spider_man_ps4");
loadTextures({
    "layer1": "fiskheroes:spiderman/bagman_layer1",
    "layer2": "fiskheroes:spiderman/bagman_layer2",
    "cape": "fiskheroes:spiderman/bagman_cape"
});

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

var cape;

function initEffects(renderer) {
    var physics = renderer.createResource("CAPE_PHYSICS", null);
    physics.maxFlare = 0.2;
    cape = capes.createDefault(renderer, 24, "fiskheroes:cape_default.mesh.json", physics);
    cape.effect.texture.set("cape");
    renderer.bindProperty("fiskheroes:equipment_wheel").color.set(0x0048FF);
}

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