import { Vector2 } from "@vived/core";
export function mockTouchInputEvent(touchPositions) {
    const mockEvt = new TouchEvent("");
    const touchCount = touchPositions.length;
    let sumPos = Vector2.Zero();
    const touches = touchPositions.map((pos, i) => {
        sumPos = Vector2.Add(sumPos, pos);
        return {
            id: i,
            position: pos,
        };
    });
    const avgPos = touchCount === 0
        ? Vector2.Zero()
        : new Vector2(sumPos.x / touchCount, sumPos.y / touchCount);
    return {
        event: mockEvt,
        touchCenter: avgPos,
        touchCount,
        touches,
    };
}
//# sourceMappingURL=mockTouchInputEvent.js.map