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.

36 lines (35 loc) 1.4 kB
import { Object3D } from "three"; import { GLTFExporter } from 'three/examples/jsm/exporters/GLTFExporter.js'; import { type GLTF, type GLTFLoaderPlugin, GLTFParser } from "three/examples/jsm/loaders/GLTFLoader.js"; import { type NodeToObjectMap, type ObjectToNodeMap, SerializationContext } from "../engine_serialization_core.js"; export declare const debug: string | number | boolean; export declare const EXTENSION_NAME = "NEEDLE_components"; declare class ExportData { node: Object3D; nodeIndex: number; nodeDef: any; constructor(node: Object3D, nodeIndex: number, nodeDef: any); } export declare class NEEDLE_components implements GLTFLoaderPlugin { get name(): string; parser?: GLTFParser; nodeToObjectMap: NodeToObjectMap; /** The loaded gltf */ gltf: GLTF | null; exportContext: { [nodeIndex: number]: ExportData; }; objectToNodeMap: ObjectToNodeMap; context: SerializationContext; writer?: any; registerExport(exp: GLTFExporter): void; beforeParse(): void; serializeUserData(node: Object3D, _nodeDef: any): boolean; afterSerializeUserData(node: Object3D, _nodeDef: any): void; writeNode(node: Object3D, nodeDef: any): void; afterParse(input: any): void; beforeRoot(): null; afterRoot(result: GLTF): Promise<void>; private createComponents; } export {};