wip: panorama tiling

This commit is contained in:
Mees Frensel
2025-11-28 10:59:39 +01:00
parent 13104d49cd
commit 4348d10ea2
19 changed files with 435 additions and 88 deletions

View File

@@ -2652,6 +2652,27 @@ export function viewAsset({ id, key, size, slug }: {
...opts
}));
}
/**
* Get an image tile
*/
export function getAssetTile({ col, id, key, level, row, slug }: {
col: number;
id: string;
key?: string;
level: number;
row: number;
slug?: string;
}, opts?: Oazapfts.RequestOpts) {
return oazapfts.ok(oazapfts.fetchBlob<{
status: 200;
data: Blob;
}>(`/assets/${encodeURIComponent(id)}/tiles/${encodeURIComponent(level)}/${encodeURIComponent(col)}/${encodeURIComponent(row)}${QS.query(QS.explode({
key,
slug
}))}`, {
...opts
}));
}
/**
* Play asset video
*/

View File

@@ -55,6 +55,13 @@ export const getAssetThumbnailPath = (id: string) => `/assets/${id}/thumbnail`;
export const getAssetPlaybackPath = (id: string) =>
`/assets/${id}/video/playback`;
export const getAssetTilePath = (
id: string,
level: number,
col: number,
row: number
) => `/assets/${id}/tiles/${level}/${col}/${row}`;
export const getUserProfileImagePath = (userId: string) =>
`/users/${userId}/profile-image`;