Add existing to tracked
This commit is contained in:
+1
@@ -0,0 +1 @@
|
||||
export * from './spz-wasm';
|
||||
+1907
File diff suppressed because one or more lines are too long
+1031
File diff suppressed because one or more lines are too long
+70
@@ -0,0 +1,70 @@
|
||||
// TypeScript bindings for emscripten-generated code. Automatically generated at compile time.
|
||||
declare namespace RuntimeExports {
|
||||
let HEAPF32: any;
|
||||
let HEAPU8: any;
|
||||
}
|
||||
interface WasmModule {
|
||||
_malloc(_0: number): number;
|
||||
_free(_0: number): void;
|
||||
}
|
||||
|
||||
export interface ClassHandle {
|
||||
isAliasOf(other: ClassHandle): boolean;
|
||||
delete(): void;
|
||||
deleteLater(): this;
|
||||
isDeleted(): boolean;
|
||||
// @ts-ignore - If targeting lower than ESNext, this symbol might not exist.
|
||||
[Symbol.dispose](): void;
|
||||
clone(): this;
|
||||
}
|
||||
export interface VectorFloat32 extends ClassHandle, Iterable<number> {
|
||||
size(): number;
|
||||
get(_0: number): number | undefined;
|
||||
push_back(_0: number): void;
|
||||
resize(_0: number, _1: number): void;
|
||||
set(_0: number, _1: number): boolean;
|
||||
}
|
||||
|
||||
export interface VectorUInt8T extends ClassHandle, Iterable<number> {
|
||||
push_back(_0: number): void;
|
||||
resize(_0: number, _1: number): void;
|
||||
size(): number;
|
||||
get(_0: number): number | undefined;
|
||||
set(_0: number, _1: number): boolean;
|
||||
}
|
||||
|
||||
export interface CoordinateSystemValue<T extends number> {
|
||||
value: T;
|
||||
}
|
||||
export type CoordinateSystem = CoordinateSystemValue<0>|CoordinateSystemValue<1>|CoordinateSystemValue<2>|CoordinateSystemValue<3>|CoordinateSystemValue<4>|CoordinateSystemValue<5>|CoordinateSystemValue<6>|CoordinateSystemValue<7>|CoordinateSystemValue<8>;
|
||||
|
||||
export type UnpackOptions = {
|
||||
coordinateSystem: CoordinateSystem
|
||||
};
|
||||
|
||||
export type RawGaussianCloud = {
|
||||
numPoints: number,
|
||||
shDegree: number,
|
||||
antialiased: boolean,
|
||||
positions: VectorFloat32,
|
||||
scales: VectorFloat32,
|
||||
rotations: VectorFloat32,
|
||||
alphas: VectorFloat32,
|
||||
colors: VectorFloat32,
|
||||
sh: VectorFloat32
|
||||
};
|
||||
|
||||
interface EmbindModule {
|
||||
VectorFloat32: {
|
||||
new(): VectorFloat32;
|
||||
};
|
||||
VectorUInt8T: {
|
||||
new(): VectorUInt8T;
|
||||
};
|
||||
CoordinateSystem: {UNSPECIFIED: CoordinateSystemValue<0>, LDB: CoordinateSystemValue<1>, RDB: CoordinateSystemValue<2>, LUB: CoordinateSystemValue<3>, RUB: CoordinateSystemValue<4>, LDF: CoordinateSystemValue<5>, RDF: CoordinateSystemValue<6>, LUF: CoordinateSystemValue<7>, RUF: CoordinateSystemValue<8>};
|
||||
vf32_ptr(_0: VectorFloat32): number;
|
||||
load_spz(_0: number, _1: number, _2: UnpackOptions): RawGaussianCloud;
|
||||
}
|
||||
|
||||
export type MainModule = WasmModule & typeof RuntimeExports & EmbindModule;
|
||||
export default function MainModuleFactory (options?: unknown): Promise<MainModule>;
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
import { MainModule, VectorFloat32, VectorUInt8T } from './build/main';
|
||||
/**
|
||||
* create new Float32Array from cpp FloatVector
|
||||
* @param wasmModule emscripten main module
|
||||
* @param vec cpp float32 vector
|
||||
* @param enhancementFunc function accepting a number and returning a number to perform processing
|
||||
* @returns copied float32 array
|
||||
*/
|
||||
export declare const floatVectorToFloatArray: (wasmModule: MainModule, vec: VectorFloat32, enhancementFunc?: (n: number) => number) => Float32Array;
|
||||
export declare const uint8VecToArray: (wasmModule: MainModule, vec: VectorUInt8T) => Uint8Array;
|
||||
+26
@@ -0,0 +1,26 @@
|
||||
import { MainModule, RawGaussianCloud } from './build/main';
|
||||
export type GaussianCloud = {
|
||||
numPoints: number;
|
||||
shDegree: number;
|
||||
antialiased: boolean;
|
||||
positions: Float32Array;
|
||||
scales: Float32Array;
|
||||
rotations: Float32Array;
|
||||
alphas: Float32Array;
|
||||
colors: Float32Array;
|
||||
sh: Float32Array;
|
||||
};
|
||||
/**
|
||||
* create new gaussian cloud from raw
|
||||
* @param wasmModule emscripten wasm main module
|
||||
* @param raw RawGSCloud
|
||||
* @returns new Gaussian Cloud
|
||||
*/
|
||||
export declare const createGaussianCloudFromRaw: (wasmModule: MainModule, raw: RawGaussianCloud, options?: {
|
||||
colorScaleFactor?: number;
|
||||
}) => GaussianCloud;
|
||||
/**
|
||||
* dispose raw gaussian cloud's vector from heap memory
|
||||
* @param raw raw gaussian cloud
|
||||
*/
|
||||
export declare const disposeRawGSCloud: (wasmModule: MainModule, raw: RawGaussianCloud) => void;
|
||||
+2
@@ -0,0 +1,2 @@
|
||||
export * from './spzApi';
|
||||
export type { GaussianCloud } from './gaussianCloud';
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
import { MainModule } from './build/main';
|
||||
import { GaussianCloud } from './gaussianCloud';
|
||||
type CoordinateSystemUnion = keyof MainModule["CoordinateSystem"];
|
||||
interface ILoadSpzOptions {
|
||||
colorScaleFactor?: number;
|
||||
unpackOptions?: {
|
||||
coordinateSystem?: CoordinateSystemUnion;
|
||||
};
|
||||
}
|
||||
/**
|
||||
* decode .spz data to GaussianCloud
|
||||
* @param spzData .spz file binary data
|
||||
* @returns Gaussian Cloud
|
||||
*/
|
||||
declare const loadSpz: (spzData: Uint8Array | ArrayBuffer, options?: ILoadSpzOptions) => Promise<GaussianCloud>;
|
||||
declare const loadSpzFromUrl: (url: string, options?: ILoadSpzOptions) => Promise<GaussianCloud>;
|
||||
export { type ILoadSpzOptions, loadSpz, loadSpzFromUrl, type CoordinateSystemUnion, };
|
||||
Reference in New Issue
Block a user