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.

78 lines (77 loc) 2.1 kB
export function finishMakeLocalProgress(): void; /** * @param {string} src * @param {string} search * @param {string} replacement * @returns {string} */ export function replaceAll(src: string, search: string, replacement: string): string; /** * @param {string} path * @param {string} basePath * @returns {string} */ export function getRelativeToBasePath(path: string, basePath: string): string; /** * @param {string} path * @returns {string} */ export function normalizeWebPath(path: string): string; /** * @param {string} path * @returns {string} */ export function ensureTrailingSlash(path: string): string; /** * @param {string} src * @returns {string} */ export function fixRelativeNewURL(src: string): string; /** * @param {string} src * @returns {string} */ export function fixDracoRangeQueryProbe(src: string): string; /** * @param {string} path * @param {string|Buffer} content * @returns {string} */ export function getValidFilename(path: string, content: string | Buffer): string; /** * @param {string} url * @returns {Promise<string>} */ export function downloadText(url: string): Promise<string>; /** * @param {string} url * @returns {Promise<Buffer>} */ export function downloadBinary(url: string): Promise<Buffer>; /** * @param {LocalizationContext} context * @param {string} url * @param {unknown} err */ export function recordFailedDownload(context: LocalizationContext, url: string, err: unknown): void; /** * @param {string} url * @returns {string} */ export function getShortUrlName(url: string): string; export class Cache { /** @type {Map<string, Buffer|string>} */ __cache: Map<string, Buffer | string>; /** * @param {string} key * @param {Buffer|string} value */ addToCache(key: string, value: Buffer | string): void; /** * @param {string} key * @returns {Buffer|string|null} */ getFromCache(key: string): Buffer | string | null; get map(): Map<string, string | Buffer<ArrayBufferLike>>; } export type LocalizationContext = import("./local-files-types.js").LocalizationContext;