UNPKG

@needle-tools/engine

Version:

Needle Engine is a web-based runtime for 3D apps. It runs on your machine for development with great integrations into editors like Unity or Blender - and can be deployed onto any device! It is flexible, extensible and networking and XR are built-in

13 lines (12 loc) 726 B
export declare class Upload_Result { success: boolean; filename: string | null; hash: string | null; size: number | null; url?: string | null; constructor(success: boolean, filename: string | null, hash: string | null, size: number | null); } export declare function upload_file(file: File, url: string): Promise<Upload_Result | null>; export declare function hash(buffer: ArrayBuffer): string; export declare function download_file(filename: string, expectedHash: string, expectedSize: number, serverUrl: string, skipChecks?: boolean): Promise<ArrayBuffer | null>; export declare function download(url: string, progressCallback: (prog: ProgressEvent) => void): Promise<Uint8Array | null>;