@wdp-api/wim-api
Version:
51WORLD WIM Api is a JavaScript plugin for WdpApi, It provides a set of APIs for developers to integrate WIM into their own applications.
127 lines (126 loc) • 3.31 kB
TypeScript
import { BasicInfoAtomType, EntityEidType, ICoordinates, TransformAtomType, VisibleAtomType } from './data-type';
export interface IGenerateRiverSurface {
path: string;
offset: Array<number>;
}
export interface IGenerateRiverSurfaceFromRemote {
tifUrl: string;
dbfUrl: string;
prjUrl: string;
shpUrl: string;
shxUrl: string;
offset: Array<number>;
}
export interface IExpandRiverSurface {
width: number;
}
export interface IEid {
eid: string | null;
}
export interface IEntity {
object: Record<string, any>;
}
export interface IRaiseRiverSurface {
changeHeight?: number;
duration?: 0;
}
export interface IUpdateRiverMaterial {
reverseDirection?: boolean;
speed?: number;
rippleScale?: number;
}
export interface IMaterialEntity {
materialObject: Record<string, any>;
}
export interface IReplaceRiverMaterial {
eid: string | null;
materialEid: string;
}
export interface ILoadRiverSectionData {
path: string;
}
export interface ILoadRiverSectionDataFromRemote {
url: string;
}
export interface IRaiseRiverSection {
sections: Array<{
index: string;
destHeight: string;
duration: string;
}>;
}
export interface IConfigFloodPeakSegments {
segments: Array<{
segmentIndex: string;
headHeight: string;
normalHeight: string;
duration: string;
}>;
}
export interface IPlayFloodPeak {
mode: number;
}
export interface IJumpToFloodPeakTime {
time: number;
}
export interface IJumpToFloodPeakSegment {
segmentIndex: number;
}
export interface ISetFloodPeakSpeedMultiplier {
multiplier: number;
}
export interface ISetTraceChannel {
channels: Array<{
name: string;
response: string;
}>;
}
export interface IGetRiverHeight {
coordinates: ICoordinates;
}
/**
* @interface SectionAtomType
* @param {Array<string>} sections
* @param {Array<string>} floodPeakSegments
* @param {number} floodPeakDuration
* @param {number} floodPeakSpeedMultiplier
*/
export interface SectionAtomType {
sections: Array<string>;
floodPeakSegments: Array<string>;
floodPeakDuration: number;
floodPeakSpeedMultiplier: number;
}
/**
* @interface MaterialInstanceParamsAtomType
* @param {boolean} reverseDirection
* @param {boolean} useFlowWater
* @param {number} speed
* @param {number} scale
*/
export interface MaterialInstanceParamsAtomType {
reverseDirection: boolean;
useFlowWater: boolean;
speed: number;
scale: number;
}
export interface ChangedMaterialInfo {
componentName: string;
materialIndex: number;
mIEid: string;
}
export interface MaterialAtomType {
changedMaterialInfo: Array<ChangedMaterialInfo>;
bReceivesDecals: boolean;
}
export interface WimDynamicWaterType extends EntityEidType, Partial<BasicInfoAtomType>, Partial<TransformAtomType>, Partial<VisibleAtomType> {
section?: Partial<SectionAtomType>;
materialInstanceParams?: Partial<MaterialInstanceParamsAtomType>;
material?: Partial<MaterialAtomType>;
}
export interface IGenerate {
BasicInfoAtom?: Partial<BasicInfoAtomType>;
SectionAtom?: Partial<SectionAtomType>;
MaterialInstanceParamsAtom?: Partial<MaterialInstanceParamsAtomType>;
MaterialAtom?: Partial<MaterialAtomType>;
}