Commit f34e539c authored by heng.zhang3@inzymeits.com's avatar heng.zhang3@inzymeits.com
Browse files

51world示例集合

parent d4557fba
export declare class RegisterObject {
EntityType: Map<string, string>;
private ObjectTypes;
Get(name: string): any;
GetTypes(): Array<{
name: string;
object?: any;
category?: string;
}>;
Register(arr: Array<{
name: string;
object?: any;
category?: string;
}>): void;
GetByValue(map: Map<string, string>, searchValue: string): string | null;
}
export declare const typeMapping: Map<string, string>;
import { ResultType } from '../common/data-type';
declare class LogController {
private apiClassName;
private obj;
constructor(obj: any);
GetDebugLogs(): Promise<ResultType>;
}
export default LogController;
import { ResultType } from '../common/data-type';
declare class ActionController {
private apiClassName;
private obj;
constructor(obj: any);
RunAction(actionName: string, actionParams: any): Promise<ResultType>;
EndAction(): Promise<ResultType>;
GetAction(): Promise<ResultType>;
}
export default ActionController;
import { ResultType, BasicInfoAtomType } from '../common/data-type';
declare class BasicInfoController {
private apiClassName;
private obj;
constructor(obj: any);
Update(opt: Partial<BasicInfoAtomType>): Promise<ResultType>;
Get(eid: string): Promise<ResultType>;
}
export default BasicInfoController;
import { ResultType } from '../common/data-type';
declare class GizmoController {
private apiClassName;
private obj;
constructor(obj: any);
SetGizmoState(gizmoState?: string): Promise<ResultType>;
}
export default GizmoController;
import { ResultType } from '../common/data-type';
declare class OutlinerController {
private apiClassName;
private obj;
private RequestEntity;
private categories;
constructor(obj: any);
Get(category?: string): Promise<ResultType>;
Move(objects: Array<any>, position: number, category?: string): Promise<ResultType>;
Create(): Promise<ResultType>;
GetCategories(): Promise<ResultType>;
}
export default OutlinerController;
import { ResultType, IOperations } from '../common/data-type';
declare class RequestEntityController {
private apiClassName;
private obj;
constructor(obj: any);
CreateEntities(entities: Array<Record<string, any>>, operations?: IOperations): Promise<ResultType>;
CreateEntitiesWithParamTemplate(defaultParam: Record<string, any>, batchParams: Array<Record<string, any>>, operations?: IOperations): Promise<ResultType>;
UpdateEntitiesByEids(data: Array<{
eid: string;
entities: any;
}>, operations?: IOperations): Promise<ResultType>;
UpdateEntities(eid: string, entities: any, operations?: IOperations): Promise<ResultType>;
RemoveEntity(eids: Array<string>): Promise<ResultType>;
RemoveEntityByTypes(types: Array<string>): Promise<any>;
GetEntitiesData(eids: Array<string>): Promise<ResultType>;
GetAllEntitiesData(): Promise<ResultType>;
}
export default RequestEntityController;
import { ResultType } from '../common/data-type';
declare class SelectionController {
private apiClassName;
private selections;
private obj;
constructor(obj: any);
Add(objects: Array<any>): Promise<ResultType>;
Get(): Promise<Array<any>>;
Remove(objects: Array<any>): Promise<ResultType>;
Clear(): Promise<ResultType>;
Draw(): Promise<ResultType>;
}
export default SelectionController;
import { ResultType, CoordType, RotatorType, ScaleType } from '../common/data-type';
declare class TransformAtomController {
private apiClassName;
private obj;
constructor(obj: any);
SetLocation(eid: string, location: CoordType): Promise<ResultType>;
SetRotator(eid: string, rotator: RotatorType): Promise<ResultType>;
SetScale3d(eid: string, scale3d: ScaleType): Promise<ResultType>;
GetTransform(eid: string): Promise<ResultType>;
}
export default TransformAtomController;
import { ResultType, IVisible2D } from '../common/data-type';
declare class VisibleAtomController {
private apiClassName2D;
private obj;
constructor(obj: any);
SetVisible2D(eids: Array<string>, opt: IVisible2D): Promise<ResultType>;
}
export default VisibleAtomController;
import { ObjectAbstract } from '../common/object-abstract';
import { ResultType, BasicInfoAtomType } from '../common/data-type';
import { CameraRoamAtomType, CameraRoamType } from '../common/interface/camera';
import { ObjectController } from '../common/object-controller';
declare class CameraRoam extends ObjectController implements ObjectAbstract {
className: string;
private CameraRoamAtom;
constructor(opt?: CameraRoamType);
get frames(): Array<any>;
set frames(frames: Array<any>);
GetFrames(): Promise<ResultType>;
SetFrames(frames: Array<any>): Promise<ResultType>;
GetScheme(): {
CameraRoamAtom: CameraRoamAtomType;
};
GetData(): CameraRoamType;
SetData(opt: CameraRoamType): void;
generateAtomData(opt: CameraRoamType): {
CameraRoamAtom?: Partial<CameraRoamAtomType>;
BasicInfoAtom?: Partial<BasicInfoAtomType>;
};
}
export default CameraRoam;
import { ObjectAbstract } from '../common/object-abstract';
import { ResultType, MinMaxType, Rotator2DType, CoordType, BasicInfoAtomType } from '../common/data-type';
import { CameraPresetType, CameraPresetEntityAtomType } from '../common/interface/camera';
import { ObjectController } from '../common/object-controller';
declare class Camera extends ObjectController implements ObjectAbstract {
className: string;
private CameraPresetEntityAtom;
constructor(opt?: CameraPresetType);
get location(): CoordType;
set location(location: CoordType);
get rotation(): Rotator2DType;
set rotation(rotation: Rotator2DType);
get pitchLimit(): MinMaxType;
set pitchLimit(pitchLimit: MinMaxType);
get yawLimit(): MinMaxType;
set yawLimit(yawLimit: MinMaxType);
get viewDistanceLimit(): MinMaxType;
set viewDistanceLimit(viewDistanceLimit: MinMaxType);
get fieldOfView(): number;
set fieldOfView(fieldOfView: number);
get controlMode(): string;
set controlMode(controlMode: string);
GetLocation(): Promise<ResultType>;
SetLocation(location: CoordType): Promise<ResultType>;
GetRotation(): Promise<ResultType>;
SetRotation(rotation: Rotator2DType): Promise<ResultType>;
GetPitchLimit(): Promise<ResultType>;
SetPitchLimit(pitchLimit: MinMaxType): Promise<ResultType>;
GetYawLimit(): Promise<ResultType>;
SetYawLimit(yawLimit: MinMaxType): Promise<ResultType>;
GetViewDistanceLimit(): Promise<ResultType>;
SetViewDistanceLimit(viewDistanceLimit: MinMaxType): Promise<ResultType>;
GetFieldOfView(): Promise<ResultType>;
SetFieldOfView(fieldOfView: number): Promise<ResultType>;
GetControlMode(): Promise<ResultType>;
SetControlMode(controlMode: string): Promise<ResultType>;
GetScheme(): {
CameraPresetEntityAtom: CameraPresetEntityAtomType;
};
GetData(): CameraPresetType;
SetData(opt: CameraPresetType): void;
generateAtomData(opt: CameraPresetType): {
CameraPresetEntityAtom?: Partial<CameraPresetEntityAtomType>;
BasicInfoAtom?: Partial<BasicInfoAtomType>;
};
}
export default Camera;
import { AtomController } from './common/atom-controller';
import { ResultType } from './common/data-type';
import { CameraPresetType, CameraControlType, CameraFocusType, CameraFollowType, CameraRotateType } from './common/interface/camera';
declare class CameraControlController extends AtomController {
private controllerName;
constructor(obj: any);
GetCameraInfo(): Promise<ResultType>;
UpdateCamera(opt: CameraPresetType): Promise<ResultType>;
FlyTo(opt: CameraControlType): Promise<ResultType>;
Move(opt: CameraRotateType): Promise<ResultType>;
Focus(opt: CameraFocusType): Promise<ResultType>;
FocusToAll(): Promise<ResultType>;
Follow(opt: CameraFollowType): Promise<ResultType>;
Stop(): Promise<ResultType>;
Rotate(opt: CameraRotateType): Promise<ResultType>;
Around(opt: CameraRotateType): Promise<ResultType>;
PlayCameraRoam(obj: any): Promise<ResultType>;
Apply(camera: any, flyTime?: number): Promise<ResultType>;
FocusByCustomId(cids: Array<string>, opt: CameraFocusType): Promise<ResultType>;
FocusByEntityName(entityNames: Array<string>, opt: CameraFocusType): Promise<ResultType>;
}
export default CameraControlController;
import { AtomController } from './common/atom-controller';
declare class CameraPresetController extends AtomController {
constructor(obj: any);
}
export default CameraPresetController;
import { AtomController } from './common/atom-controller';
declare class CameraRoamControllerController extends AtomController {
constructor(obj: any);
}
export default CameraRoamControllerController;
import { ResultType, CoordType, RotatorType, ScaleType, BasicInfoAtomType } from './data-type';
export declare abstract class AtomAbstract {
abstract Delete: (eids: Array<string>) => Promise<ResultType>;
abstract SetLocation: (eid: string, location: CoordType) => Promise<ResultType>;
abstract SetRotator: (eid: string, rotator: RotatorType) => Promise<ResultType>;
abstract SetScale3d: (eid: string, scale3d: ScaleType) => Promise<ResultType>;
abstract SetVisible: (eid: Array<string>, bVisible: boolean) => Promise<ResultType>;
abstract ClearCache: () => Promise<ResultType>;
abstract UpdateBasic: (eid: string, opt: BasicInfoAtomType) => Promise<ResultType>;
abstract onClick: (func: any) => void;
abstract onDbClick: (func: any) => void;
abstract onMouseEnter: (func: any) => void;
abstract onMouseOut: (func: any) => void;
abstract Add: (obj: any) => Promise<ResultType>;
abstract Get: (eid?: string) => Promise<ResultType>;
abstract GetOnly: (eid: string) => Promise<ResultType>;
}
import { Basic } from './basic';
import { AtomAbstract } from './atom-abstract';
import { ResultType, CoordType, RotatorType, ScaleType, BasicInfoAtomType, IOperations, IOBjectCache } from './data-type';
import RequestEntityController from '../action/request-entity-controller';
export declare class AtomController extends Basic implements AtomAbstract {
private type;
private ObjectClass;
protected RequestEntity: RequestEntityController;
protected objectMap: Map<string, IOBjectCache>;
constructor(obj: any, ObjectClass?: any);
protected setType(type: string): void;
protected generateDataObject<T, S extends Record<string, any>>(params: T, obj: S): S;
protected findFromMap(key?: string): Map<string, {
object: Record<string, any>;
}> | {
object: Record<string, any>;
} | undefined;
addToMap(key: string, obj: any): void;
protected removeFromMap(key: string): void;
protected clearMap(): void;
onClick(func: (e: ResultType) => void): void;
onDbClick(func: (e: ResultType) => void): void;
onMouseEnter(func: (e: ResultType) => void): void;
onMouseOut(func: (e: ResultType) => void): void;
Delete(eids: Array<string>): Promise<ResultType>;
SetLocation(eid: string, location: CoordType): Promise<ResultType>;
SetRotator(eid: string, rotator: RotatorType): Promise<ResultType>;
SetScale3d(eid: string, scale3d: ScaleType): Promise<ResultType>;
SetVisible(eids: Array<string>, bVisible?: boolean): Promise<ResultType>;
ClearCache(): Promise<ResultType>;
UpdateBasic(eid: string, opt: BasicInfoAtomType): Promise<ResultType>;
CreateWithTemplate(dp: Record<string, any>, bp: Array<Record<string, any>>, operations?: IOperations): Promise<ResultType>;
Create(jsonData: any): Promise<ResultType>;
Add(obj: any, operations?: IOperations): Promise<ResultType>;
Get(eid?: string): Promise<ResultType>;
GenerateObject(res: any): Promise<any>;
GetOnly(eid: string): Promise<ResultType>;
}
import { ResultType } from './data-type';
export declare class Basic {
protected obj: any;
constructor(obj: any);
protected StartApi(apiClassName: string, apiFuncName: string, params: any): Promise<ResultType>;
}
export interface ResultType {
success: boolean;
message?: string;
errCode?: number;
guid?: string;
type?: number;
event_name?: string;
result?: any;
}
export interface UndoRedoResultType {
[key: string]: Array<string>;
addedEids: Array<string>;
removedEids: Array<string>;
updatedEids: Array<string>;
}
export type MinMaxType = Array<number>;
export type Coord2DType = Array<number>;
export type CoordType = Array<number>;
export interface CoordObjType {
x?: number;
y?: number;
z?: number;
}
export interface RotatorType {
pitch?: number;
yaw?: number;
roll?: number;
}
export interface Rotator2DType {
pitch?: number;
yaw?: number;
}
export type ScaleType = Array<number>;
export interface EntityEidType {
eid?: string | null;
}
export interface EntityGeometryType {
geometry?: any;
}
export interface PointType extends EntityEidType, Partial<BasicInfoAtomType> {
point?: CoordType;
}
export interface PolylineType extends EntityEidType, Partial<BasicInfoAtomType> {
polyline?: {
points: Array<CoordType>;
};
}
export interface LoopType {
points: Array<CoordType>;
}
export interface PolygonLoopType {
outerLoop?: LoopType;
innerLoops?: Array<LoopType>;
}
export interface PolygonType extends EntityEidType, Partial<BasicInfoAtomType> {
polygon?: PolygonLoopType;
}
export interface Loop2DType {
points?: Array<Coord2DType>;
curves?: Array<{
type?: string;
o?: Coord2DType;
r?: number;
s?: number;
e?: number;
}>;
}
export interface Polygon2DLoopType {
outerLoop?: Loop2DType;
innerLoops?: Array<Loop2DType>;
}
export interface Polygon2DType extends EntityEidType, Partial<BasicInfoAtomType> {
polygon?: Polygon2DLoopType;
}
export interface HeatMapDataType extends EntityGeometryType {
pointEntityEid?: string | null;
value?: number;
}
export interface BasicInfoAtomType {
entityName: string;
customId: string;
customData: any;
parentEid: string;
}
export interface TransformAtomType {
location: CoordType;
rotator: RotatorType;
scale3d: ScaleType;
}
export interface VisibleAtomType {
bVisible: boolean;
}
export interface CacheAtomType {
bRemoved: boolean;
}
export interface PointEntityAtomType {
point: CoordType;
}
export interface Polygon2DEntityAtomType {
polygon: Polygon2DLoopType;
}
export interface PolygonEntityAtomType {
polygon: PolygonLoopType;
}
export interface PolylineEntityAtomType {
polyline: {
points: Array<CoordType>;
};
}
export interface AssetsAtomType {
seedIds: Array<string>;
}
export interface AssetAtomType {
seedId: string | null;
}
export interface IVisible2D {
camera?: {
hideDistance?: number;
hideType?: string;
scaleMode?: string;
};
interaction?: {
clickTop?: boolean;
hoverTop?: boolean;
};
}
export interface Visible2DAtomType {
hideDistance: number;
hideType: string;
scaleMode: string;
clickTop: boolean;
hoverTop: boolean;
}
export interface IBaseData {
BasicInfoAtom?: BasicInfoAtomType;
TransformAtom?: TransformAtomType;
VisibleAtom?: VisibleAtomType;
Visible2DAtom?: Visible2DAtomType;
}
export type CoordZRefType = 'Surface' | 'Ground' | 'Altitude';
export interface ICalculateCoordZ {
coordZRef: CoordZRefType;
coordZOffset: number;
}
export interface IOperations {
calculateCoordZ: ICalculateCoordZ;
}
export type ICoordinates = Array<Array<number>>;
export type ICoordinates2D = Array<Array<Array<number>>>;
export interface IPoint {
point: Array<number>;
value: number;
}
export interface IPolylineATom {
coordinates: ICoordinates;
}
export interface IPolygon2DAtom {
coordinates: ICoordinates2D;
coordZ: number;
}
export interface IPointValueAtom {
features: Array<IPoint>;
}
export interface IOBjectCache {
object: Record<string, any>;
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment