UNPKG

@loaders.gl/draco

Version:

Framework-independent loader and writer for Draco compressed meshes and point clouds

48 lines 1.57 kB
import type { WriterOptions } from '@loaders.gl/loader-utils'; import type { DracoMesh } from "./lib/draco-types.js"; import type { DracoBuildOptions } from "./lib/draco-builder.js"; /** Writer Options for draco */ export type DracoWriterOptions = WriterOptions & { draco?: DracoBuildOptions & { method?: 'MESH_EDGEBREAKER_ENCODING' | 'MESH_SEQUENTIAL_ENCODING'; speed?: [number, number]; quantization?: Record<string, number>; attributeNameEntry?: string; }; }; /** * Browser worker doesn't work because of issue during "draco_encoder.js" loading. * Refused to execute script from 'https://raw.githubusercontent.com/google/draco/1.4.1/javascript/draco_encoder.js' because its MIME type ('') is not executable. */ export declare const DracoWriterWorker: { id: string; name: string; module: string; version: any; worker: boolean; options: { draco: {}; source: null; }; }; /** * Exporter for Draco3D compressed geometries */ export declare const DracoWriter: { readonly name: "DRACO"; readonly id: "draco"; readonly module: "draco"; readonly version: any; readonly extensions: ["drc"]; readonly mimeTypes: ["application/octet-stream"]; readonly options: { readonly draco: { pointcloud: boolean; attributeNameEntry: string; }; }; readonly encode: typeof encode; }; declare function encode(data: DracoMesh, options?: DracoWriterOptions): Promise<ArrayBuffer>; export {}; //# sourceMappingURL=draco-writer.d.ts.map