wdpapi
Version:
51WORLD WdpApi is a set of programming interfaces developed by JavaScript that is responsible for negotiating between web pages and cloud rendering platforms. Supported by 51Cloud rendering platform, it enables the users to create any HTML5 UI element on
577 lines (576 loc) • 17.2 kB
TypeScript
import { Basic } from './common/basic';
import { ResultType, RotatorType, CoordObjType, IOperations, IExecuteArrayDuplicate, IGeometryObject } from './common/data-type';
import { PathType } from './common/interface/path';
import { BoundType } from './common/interface/bound';
import CoveringController from './scene/covering-controller';
import ModelController from './scene/model-controller';
import TilesController from './scene/tiles-controller';
import TilesNodeController from './scene/tilesnode-controller';
import NodeController from './scene/node-controller';
import EarthTilesController from './scene/earthtiles-controller';
import EffectsController from './scene/effects-controller';
import NodeSelectionController from './scene/nodeselection-controller';
import OutlinerController from './scene/outliner-controller';
import GroupController from './scene/group-controller';
import SectionController from './scene/section-controller';
import ProjectController from './scene/project-controller';
import SelectionController from './action/selection-controller';
interface Imove {
path: PathType;
entity: Record<string, any>;
moving: BoundType;
}
/**
* @public
* @class SceneController
* @extends Basic
*/
declare class SceneController extends Basic {
private apiClassName;
private SetSceneStyleAPI;
private WdpArrayDuplicateAPI;
private SceneValidate;
Covering: CoveringController;
Model: ModelController;
Tiles: TilesController;
TilesNode: TilesNodeController;
Node: NodeController;
EarthTiles: EarthTilesController;
Effects: EffectsController;
NodeSelection: NodeSelectionController;
Outliner: OutlinerController;
Group: GroupController;
Section: SectionController;
Project: ProjectController;
private Action;
Selection: SelectionController;
private RequestEntity;
private Visual;
/**
* @constructor
* @param {any} obj
*/
constructor(obj: any);
/**
* @public
* @async
* @function Create
* @param {Record<string, any>} defaultParam
* @param {Record<string, any>} batchParams
* @param {IOperations} operations (optional)
* @returns {Promise<ResultType>}
*/
Create(defaultParam: Record<string, any>, batchParams: Array<Record<string, any>>, operations?: IOperations): Promise<ResultType>;
/**
* @public
* @async
* @function Creates
* @param {Array<Record<string, any>>} jsonData
* @param {IOperations} operations (optional)
* @returns {Promise<ResultType>}
*/
Creates(jsonData: Array<Record<string, any>>, operations?: IOperations): Promise<ResultType>;
/**
* @public
* @async
* @function CreateByGeoJson
* @param {IGeometryObject} jsonData
* @param {string} url
* @param {IOperations} operations (optional)
* @returns {Promise<ResultType>}
*/
CreateByGeoJson(jsonData: IGeometryObject, url: string, operations?: IOperations): Promise<ResultType>;
/**
* @public
* @async
* @function CreateByShapefile
* @param {IGeometryObject} jsonData
* @param {string} url
* @param {IOperations} operations (optional)
* @returns {Promise<ResultType>}
*/
CreateByShapefile(jsonData: IGeometryObject, url: string, operations?: IOperations): Promise<ResultType>;
/**
* @private
* @async
* @function handleGeometryDataToGenerateEntity
*/
private handleGeometryDataToGenerateEntity;
/**
* @public
* @async
* @function Delete
* @param {Array<Record<string, any>>} objs
* @returns {Promise<ResultType>}
*/
Delete(objs: Array<Record<string, any>>): Promise<ResultType>;
/**
* @public
* @async
* @function Add
* @param {Array<Record<string, any>> | Record<string, any>} obj
* @param {IOperations} operations (optional)
* @returns {Promise<ResultType>}
*/
Add(obj: Array<Record<string, any>> | Record<string, any>, operations?: IOperations): Promise<ResultType>;
/**
* @public
* @async
* @function GetTypesByEids
* @param {Array<string>} eids
* @returns {Promise<ResultType>}
*/
GetTypesByEids(eids: Array<string>): Promise<ResultType>;
/**
* @public
* @async
* @function Clear
* @param {Array<string>} EntityTypesToIgnore (default value is [])
* @returns {Promise<ResultType>}
*/
Clear(entityTypesToIgnore?: Array<string>): Promise<ResultType>;
/**
* @public
* @async
* @function ClearByObjects
* @param {Array<Record<string, any>>} objs
* @returns {Promise<ResultType>}
*/
ClearByObjects(objs: Array<Record<string, any>>): Promise<ResultType>;
/**
* @public
* @async
* @function ClearByEids
* @param {Array<string>} eids
* @returns {Promise<ResultType>}
*/
ClearByEids(eids: Array<string>): Promise<ResultType>;
/**
* @public
* @async
* @function ClearByTypes
* @param {Array<string>} types
* @returns {Promise<ResultType>}
*/
ClearByTypes(types: Array<string>): Promise<ResultType>;
/**
* @public
* @async
* @function SetVisibleByObjects
* @param {Array<Record<string, any>>} objs
* @param {boolean} bVisible (default value is true)
* @returns {Promise<ResultType>}
*/
SetVisibleByObjects(objs: Array<Record<string, any>>, bVisible?: boolean): Promise<ResultType>;
/**
* @private
* @async
* @function AddAct
* @param {Record<string, any>} obj
* @param {IOperations} operations (optional)
* @returns {Promise<ResultType>}
*/
private AddAct;
/**
* @private
* @async
* @function AddActMulit
* @param {Array<Record<string, any>>} objs
* @param {IOperations} operations (optional)
* @returns {Promise<ResultType>}
*/
private AddActMulit;
/**
* @public
* @async
* @function RunAction
* @param {string} actionName
* @param {Record<string, any>} actionParams
* @returns {Promise<ResultType>}
*/
RunAction(actionName: string, actionParams: Record<string, any>): Promise<ResultType>;
/**
* @public
* @async
* @function EndAction
* @returns {Promise<ResultType>}
*/
EndAction(bIsCancel?: boolean): Promise<ResultType>;
/**
* @public
* @async
* @function GetAction
* @returns {Promise<ResultType>}
*/
GetAction(): Promise<ResultType>;
/**
* @public
* @async
* @function AddSelection
* @param {Array<Record<string, any>>} objs
* @returns {Promise<ResultType>}
*/
AddSelection(objs: Array<Record<string, any>>): Promise<ResultType>;
/**
* @public
* @async
* @function RemoveSelection
* @param {Array<Record<string, any>>} objs
* @returns {Promise<ResultType>}
*/
RemoveSelection(objs: Array<Record<string, any>>): Promise<ResultType>;
/**
* @public
* @async
* @function ClearSelection
* @returns {Promise<ResultType>}
*/
ClearSelection(): Promise<ResultType>;
/**
* @public
* @async
* @function DrawSelection
* @returns {Promise<ResultType>}
*/
DrawSelection(): Promise<ResultType>;
/**
* @public
* @async
* @function GetSelection
* @returns {Promise<ResultType>}
*/
GetSelection(): Promise<ResultType>;
/**
* @public
* @async
* @function Save
* @param {string} containerId
* @returns {Promise<ResultType>}
*/
Save(containerId: string): Promise<ResultType>;
/**
* @public
* @async
* @function Load
* @param {string} containerId
* @returns {Promise<ResultType>}
*/
Load(containerId: string): Promise<ResultType>;
/**
* @public
* @async
* @function GetObjectEid
* @param {string} eid (optional)
* @returns {Promise<ResultType>}
*/
GetObjectEid(eid?: string): Promise<ResultType>;
/**
* @public
* @async
* @function Refresh
* @returns {Promise<ResultType>}
*/
Refresh(): Promise<ResultType>;
/**
* @public
* @async
* @function GetAll
* @returns {Promise<ResultType>}
*/
GetAll(): Promise<ResultType>;
/**
* @public
* @async
* @function GetByTypes
* @param {Array<string>} types
* @returns {Promise<ResultType>}
*/
GetByTypes(types: Array<string>): Promise<ResultType>;
/**
* @public
* @async
* @function GetGlobal
* @returns {Promise<ResultType>}
*/
GetGlobal(): Promise<ResultType>;
/**
* @public
* @async
* @function GetGlobalSettings
* @returns {Promise<ResultType>}
*/
GetGlobalSettings(): Promise<ResultType>;
/**
* @public
* @async
* @function GetCameraStart
* @returns {Promise<ResultType>}
*/
GetCameraStart(): Promise<ResultType>;
/**
* @public
* @async
* @function GetGeoReference
* @returns {Promise<ResultType>}
*/
GetGeoReference(): Promise<ResultType>;
/**
* @public
* @async
* @function GetTiles
* @returns {Promise<ResultType>}
*/
GetTiles(): Promise<ResultType>;
/**
* @public
* @async
* @function GetProject
* @returns {Promise<ResultType>}
*/
GetProject(): Promise<ResultType>;
/**
* @public
* @async
* @function Merge
* @param {string} containerId
* @param {string} anotherContainerId
* @param {Array<string>} EntityTypesToIgnore (default value is [])
* @returns {Promise<ResultType>}
*/
Merge(containerId: string, anotherContainerId: string, EntityTypesToIgnore?: never[]): Promise<ResultType>;
/**
* @public
* @async
* @function SetLocation
* @param {Array<Record<string, any>>} objs
* @param {CoordObjType} location
* @returns {Promise<ResultType>}
*/
SetLocation(objs: Array<Record<string, any>>, location: CoordObjType): Promise<ResultType>;
/**
* @public
* @async
* @function SetLocations
* @param {Array<{object: Record<string, any>, location: CoordObjType}>} datas
* @returns {Promise<ResultType>}
*/
SetLocations(datas: Array<{
object: Record<string, any>;
location: CoordObjType;
}>): Promise<ResultType>;
/**
* @public
* @async
* @function SetRotator
* @param {Array<Record<string, any>>} objs
* @param {RotatorType} rotator
* @returns {Promise<ResultType>}
*/
SetRotator(objs: Array<Record<string, any>>, rotator: RotatorType): Promise<ResultType>;
/**
* @public
* @async
* @function SetRotators
* @param {Array<{object: Record<string, any>, rotator: RotatorType}>} datas
* @returns {Promise<ResultType>}
*/
SetRotators(datas: Array<{
object: Record<string, any>;
rotator: RotatorType;
}>): Promise<ResultType>;
/**
* @public
* @async
* @function SetScale3D
* @param {Array<Record<string, any>>} objs
* @param {CoordObjType} scale3d
* @returns {Promise<ResultType>}
*/
SetScale3D(objs: Array<Record<string, any>>, scale3d: CoordObjType): Promise<ResultType>;
/**
* @public
* @async
* @function SetScale3Ds
* @param {Array<{object: Record<string, any>, scale3d: CoordObjType}>} datas
* @returns {Promise<ResultType>}
*/
SetScale3Ds(datas: Array<{
object: Record<string, any>;
scale3d: CoordObjType;
}>): Promise<ResultType>;
/**
* @public
* @async
* @function SetVisible
* @param {Array<Record<string, any>>} objs
* @param {boolean} bVisible (default value is true)
* @returns {Promise<ResultType>}
*/
SetVisible(objs: Array<Record<string, any>>, bVisible?: boolean): Promise<ResultType>;
/**
* @public
* @async
* @function SetLocked
* @param {Array<Record<string, any>>} objs
* @param {boolean} bLocked (default value is true)
* @returns {Promise<ResultType>}
*/
SetLocked(objs: Array<Record<string, any>>, bLocked?: boolean): Promise<ResultType>;
/**
* @public
* @async
* @function Update
* @param {Array<Record<string, any>>} objs
* @param {Record<string, any>} opt
* @param {IOperations} operations (optional)
* @returns {Promise<ResultType>}
*/
Update(objs: Array<Record<string, any>>, opt: Record<string, any>, operations?: IOperations): Promise<ResultType>;
/**
* @public
* @async
* @function Updates
* @param {Array<{object: Record<string, any>, jsonData: Record<string, any>}>} opts
* @param {IOperations} operations (optional)
* @returns {Promise<ResultType>}
*/
Updates(opts: Array<{
object: Record<string, any>;
jsonData: Record<string, any>;
}>, operations?: IOperations): Promise<ResultType>;
/**
* @public
* @async
* @function ClearByCustomId
* @param {Array<string>} cids
* @returns {Promise<ResultType>}
*/
ClearByCustomId(cids: Array<string>): Promise<ResultType>;
/**
* @public
* @async
* @function GetByCustomId
* @param {Array<string>} cids
* @returns {Promise<ResultType>}
*/
GetByCustomId(cids: Array<string>): Promise<ResultType>;
/**
* @public
* @async
* @function UpdateByCustomId
* @param {Array<string>} cids
* @param {Record<string, any>} opt
* @param {IOperations} operations (optional)
* @returns {Promise<ResultType>}
*/
UpdateByCustomId(cids: Array<string>, opt: Record<string, any>, operations?: IOperations): Promise<ResultType>;
/**
* @public
* @async
* @function UpdateByCustomIds
* @param {Array<Record<string, any>>} opts
* @param {IOperations} operations (optional)
* @returns {Promise<ResultType>}
*/
UpdateByCustomIds(opts: Array<Record<string, any>>, operations?: IOperations): Promise<ResultType>;
/**
* @public
* @async
* @function ClearByEntityName
* @param {Array<string>} entityNames
* @returns {Promise<ResultType>}
*/
ClearByEntityName(entityNames: Array<string>): Promise<ResultType>;
/**
* @public
* @async
* @function GetByEntityName
* @param {Array<string>} entityNames
* @returns {Promise<ResultType>}
*/
GetByEntityName(entityNames: Array<string>): Promise<ResultType>;
/**
* @public
* @async
* @function UpdateByEntityName
* @param {Array<string>} entityNames
* @param {Record<string, any>} opt
* @param {IOperations} operations (optional)
* @returns {Promise<ResultType>}
*/
UpdateByEntityName(entityNames: Array<string>, opt: Record<string, any>, operations?: IOperations): Promise<ResultType>;
/**
* @public
* @async
* @function UpdateByEntityNames
* @param {Array<Record<string, any>>} opts
* @param {IOperations} operations (optional)
* @returns {Promise<ResultType>}
*/
UpdateByEntityNames(opts: Array<Record<string, any>>, operations?: IOperations): Promise<ResultType>;
/**
* @public
* @async
* @function SetEntityOutline
* @param {{entities: Array<Record<string, any>>, styleName?: string, bOutline?: boolean}} opt
* @returns {Promise<ResultType>}
*/
SetEntityOutline(opt: {
entities: Array<Record<string, any>>;
styleName?: string;
bOutline?: boolean;
}): Promise<ResultType>;
/**
* @public
* @async
* @function SetEntityHighlight
* @param {{entities: Array<Record<string, any>>, styleName?: string, bHighlight?: boolean}} opt
* @returns {Promise<ResultType>}
*/
SetEntityHighlight(opt: {
entities: Array<Record<string, any>>;
styleName?: string;
bHighlight?: boolean;
}): Promise<ResultType>;
/**
* @public
* @async
* @function GetByEids
* @param {Array<string>} eids
* @returns {Promise<ResultType>}
*/
GetByEids(eids: Array<string>): Promise<ResultType>;
/**
* @public
* @async
* @function SetSceneStyle
* @param {string} style (default value is comic)
* @returns {Promise<ResultType>}
*/
SetSceneStyle(style?: string): Promise<ResultType>;
/**
* @public
* @async
* @function GetBoundingBox
* @param {Array<string>} eids
* @returns {Promise<ResultType>}
*/
GetBoundingBox(objs: Array<Record<string, any>>): Promise<ResultType>;
/**
* @public
* @async
* @function ArrayDuplicate
* @param {IExecuteArrayDuplicate} opt
* @returns {Promise<ResultType>}
*/
ArrayDuplicate(opt: IExecuteArrayDuplicate): Promise<ResultType>;
/**
* @public
* @async
* @function Move
* @param {Imove} opt
* @returns {Promise<ResultType>}
*/
Move(opt: Imove): Promise<ResultType>;
}
export default SceneController;