osgearthwasm
Version:
osgEarth ported to WebAssembly to run it on the web platform
202 lines (181 loc) • 5.01 kB
Markdown
## API Report File for "osgearthwasm"
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
```ts
/// <reference types="emscripten" />
// @public (undocumented)
export enum BuildType {
// (undocumented)
debug = "debug",
// (undocumented)
dev = "dev",
// (undocumented)
release = "release",
// (undocumented)
test = "test"
}
// @public
export interface EmscriptenRuntimeModule extends EmscriptenModule {
// (undocumented)
[x: string]: any;
}
// @public (undocumented)
export enum EmscriptenRuntimeStatus {
// (undocumented)
BOOT = "BOOT",
// (undocumented)
CREATE = "CREATE",
// (undocumented)
INIT = "INIT",
// (undocumented)
LOAD = "LOAD",
// (undocumented)
READY = "READY",
// (undocumented)
RUN = "RUN",
// (undocumented)
SETUP = "SETUP",
// (undocumented)
START = "START"
}
// @public
export interface Environment {
// (undocumented)
buildType: BuildType;
// (undocumented)
platform: Platform;
// (undocumented)
threadingModel: ThreadingModel;
// (undocumented)
variables: {
[key: string]: string;
};
}
// @public
export class Environment implements Environment {
constructor(platform: Platform, buildType: BuildType, threadingModel: ThreadingModel, variables?: {
[key: string]: string;
});
}
// @public
export interface EnvironmentRequest {
// (undocumented)
buildType?: BuildType;
// (undocumented)
platform?: Platform;
// (undocumented)
threadingModel?: ThreadingModel;
// (undocumented)
variables?: {
[key: string]: string;
};
}
// @public
export interface Globe {
// (undocumented)
api: OsgEarthApi;
// (undocumented)
canvas: HTMLCanvasElement;
// (undocumented)
environment: Environment;
// (undocumented)
fs: any;
// (undocumented)
options: Options;
// (undocumented)
runtime: Runtime;
// (undocumented)
shell: HTMLDivElement;
// (undocumented)
util: typeof OsgEarthUtil;
}
// @public
export class Globe implements Globe {
constructor(options: Options, environment: Environment, shell: HTMLDivElement);
// (undocumented)
init(api: string, payload: string): Promise<void>;
// (undocumented)
protected onStatus(_status: string): void;
}
// @public
export interface Options {
// (undocumented)
baseUrl?: string;
// (undocumented)
onStatus?: (status: EmscriptenRuntimeStatus) => void;
// (undocumented)
runtime?: string;
// (undocumented)
silent?: boolean;
}
// @public (undocumented)
export interface OsgEarthApi {
// (undocumented)
addEarthFile(earthFileContent: string): Promise<void>;
// (undocumented)
addMap(earthFilePath: string, resolve?: () => void, reject?: (error: string) => void): void;
// (undocumented)
closeLayer(layerName: string): void;
// (undocumented)
flyToBox(north: number, east: number, south: number, west: number, duration?: number): void;
// (undocumented)
flyToPoint(longitude: number, latitude: number, duration?: number): void;
// (undocumented)
getViewpoint(): Viewpoint;
// (undocumented)
isLayerOpen(layerName: string): boolean;
// (undocumented)
openLayer(layerName: string): void;
// (undocumented)
setDate(dateTime: Date): void;
// (undocumented)
setDateTime(year: number, month: number, day: number, hours: number): void;
// (undocumented)
setLighting(lighting: boolean): void;
// (undocumented)
setOpacity(layerName: string, opacity: number): void;
// (undocumented)
setViewpoint(viewpoint: Viewpoint, duration?: number): void;
}
// @public (undocumented)
export const OsgEarthUtil: {
styleFunction(styleFunction: (feature: any) => string, name?: string): string;
};
// @public
export function osgearthwasm(container: string | HTMLDivElement, payload?: string, options?: Options, _enviroment?: EnvironmentRequest): Promise<Globe>;
// @public (undocumented)
export enum Platform {
// (undocumented)
browser = "browser",
// (undocumented)
node = "node"
}
// @public
export interface Runtime {
// (undocumented)
fs: any;
// (undocumented)
module: EmscriptenRuntimeModule;
}
// @public (undocumented)
export enum ThreadingModel {
// (undocumented)
multi = "multi",
// (undocumented)
single = "single"
}
// @public (undocumented)
export interface Viewpoint {
// (undocumented)
altitude: number;
// (undocumented)
heading: number;
// (undocumented)
latitude: number;
// (undocumented)
longitude: number;
// (undocumented)
pitch: number;
// (undocumented)
range: number;
}
```