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) 1.06 kB
import { SerializationContext } from "./engine_serialization_core.js"; import { Context } from "./engine_setup.js"; import type { ConstructorConcrete, GLTF, Model, SourceIdentifier, UIDProvider } from "./engine_types.js"; import { NEEDLE_components } from "./extensions/NEEDLE_components.js"; export interface INeedleGltfLoader { createBuiltinComponents(context: Context, gltfId: SourceIdentifier, gltf: GLTF, seed: number | null | UIDProvider, extension?: NEEDLE_components): Promise<void>; writeBuiltinComponentData(comp: object, context: SerializationContext): any; parseSync(context: Context, data: string | ArrayBuffer, path: string, seed: number | UIDProvider | null): Promise<Model | undefined>; loadSync(context: Context, url: string, sourceId: string, seed: number | UIDProvider | null, prog?: (prog: ProgressEvent) => void): Promise<Model | undefined>; } export declare function getLoader(): INeedleGltfLoader; export declare function registerLoader<T extends INeedleGltfLoader>(loader: ConstructorConcrete<T>): void;