Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 12 additions & 0 deletions @flywave/flywave-draco/src/draco-format.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/**
* Draco3D compressed geometries
*/
export declare const DracoFormat: {
readonly name: "Draco";
readonly id: "draco";
readonly module: "draco";
readonly extensions: readonly ["drc"];
readonly mimeTypes: readonly ["application/octet-stream"];
readonly binary: true;
readonly tests: readonly ["DRACO"];
};
14 changes: 14 additions & 0 deletions @flywave/flywave-draco/src/draco-format.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

65 changes: 65 additions & 0 deletions @flywave/flywave-draco/src/draco-loader.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
import type { DracoParseOptions } from "./loader/draco-parser";
import type { DracoMesh } from "./loader/draco-types";
export interface DracoLoaderOptions {
headers?: Record<string, string>;
draco?: DracoParseOptions & {
/** @deprecated WASM decoding is faster but JS is more backwards compatible */
decoderType?: "wasm" | "js";
/** @deprecated Specify where to load the Draco decoder library */
libraryPath?: string;
/** Override the URL to the worker bundle (by default loads from unpkg.com) */
workerUrl?: string;
};
}
/**
* Worker loader for Draco3D compressed geometries
*/
export declare const DracoWorkerLoader: {
readonly dataType: DracoMesh;
readonly batchType: never;
readonly name: "Draco";
readonly id: "draco";
readonly module: "draco";
readonly version: any;
readonly worker: true;
readonly extensions: readonly ["drc"];
readonly mimeTypes: readonly ["application/octet-stream"];
readonly binary: true;
readonly tests: readonly ["DRACO"];
readonly options: {
readonly draco: {
readonly decoderType: "wasm" | "js";
readonly libraryPath: "libs/";
readonly extraAttributes: {};
readonly attributeNameEntry: any;
};
};
};
/**
* Loader for Draco3D compressed geometries
*/
export declare const DracoLoader: {
readonly parse: typeof parse;
readonly dataType: DracoMesh;
readonly batchType: never;
readonly name: "Draco";
readonly id: "draco";
readonly module: "draco";
readonly version: any;
readonly worker: true;
readonly extensions: readonly ["drc"];
readonly mimeTypes: readonly ["application/octet-stream"];
readonly binary: true;
readonly tests: readonly ["DRACO"];
readonly options: {
readonly draco: {
readonly decoderType: "wasm" | "js";
readonly libraryPath: "libs/";
readonly extraAttributes: {};
readonly attributeNameEntry: any;
};
};
};
declare function parse(arrayBuffer: ArrayBuffer, options?: DracoLoaderOptions, context?: any): Promise<DracoMesh>;
export declare function loadDraco(url: string, loader: typeof DracoLoader, options?: DracoLoaderOptions, context?: any): Promise<DracoMesh>;
export {};
69 changes: 69 additions & 0 deletions @flywave/flywave-draco/src/draco-loader.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

46 changes: 46 additions & 0 deletions @flywave/flywave-draco/src/draco-writer.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
import type { DracoBuildOptions } from "./loader/draco-builder";
import type { DracoMesh } from "./loader/draco-types";
/** Writer Options for draco */
export interface DracoWriterOptions {
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: any;
};
};
/**
* Exporter for Draco3D compressed geometries
*/
export declare const DracoWriter: {
readonly name: "DRACO";
readonly id: "draco";
readonly module: "draco";
readonly version: any;
readonly extensions: readonly ["drc"];
readonly mimeTypes: readonly ["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 {};
56 changes: 56 additions & 0 deletions @flywave/flywave-draco/src/draco-writer.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading