export type GameAssetDimension = '2d' | '3d'; export type GameAssetKind = 'sprite' | 'ui' | 'model'; /** Longest asset-search query, counted in UTF-16 code units like `String.prototype.length`. */ export const GAME_ASSET_SEARCH_MAX_QUERY_LENGTH = 200; /** * Longest stateless asset-search cursor (base64url JSON). Sized for the worst query: JSON writes a * control character or lone surrogate as `\uXXXX`, so each query code unit can take 6 bytes; 256 bytes * cover the remaining fields, and base64url turns every 3 bytes into 4 characters. */ export const GAME_ASSET_SEARCH_CURSOR_MAX_LENGTH = Math.ceil((GAME_ASSET_SEARCH_MAX_QUERY_LENGTH * 6 + 256) / 3) * 4; export const FREE_GAME_ASSET_3D_PROVIDERS = [ 'polyhaven', 'polyfork', 'threedassets', 'grab3d', 'blenderkit', 'gazebofuel', 'wikimediacommons', 'opengameart', ] as const; export const FREE_GAME_ASSET_2D_PROVIDERS = [ 'opengameart', 'kenney', 'itchio', ] as const; export const FREE_GAME_ASSET_ALL_PROVIDERS = [ 'polyhaven', 'polyfork', 'threedassets', 'grab3d', 'blenderkit', 'gazebofuel', 'wikimediacommons', 'opengameart', 'kenney', 'itchio', ] as const; export type FreeGameAssetProvider = typeof FREE_GAME_ASSET_ALL_PROVIDERS[number]; export interface CatalogModel { id: string; title: string; provider: string; kind?: GameAssetKind; dimension?: GameAssetDimension; thumbnailUrl?: string; sourceUrl?: string; downloadUrl?: string; license?: string; licenseUrl?: string; author?: string; formats?: string[]; downloadable: boolean; }