function create(renderer, color, anchor, beam, mirror) {
    if (typeof beam === "string") {
        beam = renderer.createResource("BEAM_RENDERER", beam);
    }

    var triangle_shape = renderer.createResource("SHAPE", "pkg:bifrost");
    var currScale = 2.2;
    
    var triangle = renderer.createEffect("fiskheroes:lines").setShape(triangle_shape).setRenderer(beam);
    triangle.color.set(color);
    triangle.anchor.set(anchor);

    var obj = {
        triangle: triangle,
        setScale: scale => {
            currScale = scale;
            triangle.setScale(scale);
            return obj;
        },
        setOffset: (x, y, z) => {
            triangle.setOffset(x, y, z);
            return obj;
        },
        setRotation: (x, y, z) => {
            triangle.setRotation(x, y, z);
            return obj;
        },
        ignoreAnchor: ignore => {
            triangle.anchor.ignoreAnchor(ignore);
            return obj;
        },
        render: (f) => {
            var timer = Math.min(f * 1.5 - 0.5, 1);
            triangle.opacity = timer;
            timer = 1 - timer;
            timer *= timer;
            timer = 1 - timer;
            //triangle.progress = f;
            triangle.setScale(currScale * (0.2 + timer * 0.8));
            triangle.render();
        }
    };
    return obj;
}
