UNPKG

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

317 lines (316 loc) 8.93 kB
import { AtomController } from './common/atom-controller'; import { ResultType } from './common/data-type'; import { ICameraUpdateOpt, CameraControlType, CameraFocusType, CameraFollowType, SetCameraLimitType, CameraRotateType, IFocusToAllEntities, ICameraPose, IResetCameraPose, ISetCameraLockLimit, IFocusToNodes, ICameraMoveBasic, ICameraStepMove, ICameraStepRotate, ISetCameraSpeed, ISetCameraAnimation } from './common/interface/camera'; /** * @public * @class CameraControlController * @extends AtomController */ declare class CameraControlController extends AtomController { private controllerName; private CameraValidate; private currentRoam; /** * @constructor * @param {any} obj */ constructor(obj: any); /** * @public * @async * @function FocusToNodes * @param {Partial<IFocusToNodes>} opt * @param {boolean} isProject (default value is false) * @returns {Promise<ResultType>} */ FocusToNodes(opt: Partial<IFocusToNodes>, type?: string): Promise<ResultType>; /** * @public * @async * @function ResetCameraLimit * @param {string} state (default value is 'Default') * @returns {Promise<ResultType>} */ ResetCameraLimit(state?: string): Promise<ResultType>; /** * @public * @async * @function SetCameraLockLimit * @param {Partial<ISetCameraLockLimit>} opt * @returns {Promise<ResultType>} */ SetCameraLockLimit(opt: Partial<ISetCameraLockLimit>): Promise<ResultType>; /** * @public * @async * @function SetCameraLimit * @param {Partial<SetCameraLimitType>} opt * @returns {Promise<ResultType>} */ SetCameraLimit(opt: Partial<SetCameraLimitType>): Promise<ResultType>; /** * @public * @async * @function GetCameraLimit * @returns {Promise<ResultType>} */ GetCameraLimit(): Promise<ResultType>; /** * @public * @async * @function ResetCameraPose * @param {Partial<IResetCameraPose>} opt * @returns {Promise<ResultType>} */ ResetCameraPose(opt: Partial<IResetCameraPose>): Promise<ResultType>; /** * @public * @async * @function GetCameraPose * @returns {Promise<ResultType>} */ GetCameraPose(): Promise<ResultType>; /** * @public * @async * @function SetCameraPose * @param {Partial<ICameraPose>} opt * @returns {Promise<ResultType>} */ SetCameraPose(opt: Partial<ICameraPose>): Promise<ResultType>; /** * @public * @async * @function SetCameraMode * @param {string} controlMode (default value is 'RTS') * @returns {Promise<ResultType>} */ SetCameraMode(controlMode?: string): Promise<ResultType>; /** * @public * @async * @function GetCameraInfo * @returns {Promise<ResultType>} */ GetCameraInfo(): Promise<ResultType>; /** * @public * @async * @function UpdateCamera * @param {ICameraUpdateOpt} opt * @returns {Promise<ResultType>} */ UpdateCamera(opt: ICameraUpdateOpt): Promise<ResultType>; /** * @public * @async * @function FlyTo * @param {CameraControlType} opt * @returns {Promise<ResultType>} */ FlyTo(opt: CameraControlType): Promise<ResultType>; /** * @public * @async * @function Move * @param {CameraRotateType} opt * @returns {Promise<ResultType>} */ Move(opt: CameraRotateType): Promise<ResultType>; /** * @public * @async * @function Focus * @param {CameraFocusType} opt * @returns {Promise<ResultType>} */ Focus(opt: CameraFocusType): Promise<ResultType>; /** * @public * @async * @function FocusToAll * @param {IFocusToAllEntities} opt (optional) * @returns {Promise<ResultType>} */ FocusToAll(opt?: IFocusToAllEntities): Promise<ResultType>; /** * @public * @async * @function Follow * @param {CameraFollowType} opt * @returns {Promise<ResultType>} */ Follow(opt: CameraFollowType): Promise<ResultType>; /** * @public * @async * @function Stop * @returns {Promise<ResultType>} */ Stop(): Promise<ResultType>; /** * @public * @async * @function Rotate * @param {CameraRotateType} opt * @returns {Promise<ResultType>} */ Rotate(opt: CameraRotateType): Promise<ResultType>; /** * @public * @async * @function Around * @param {CameraRotateType} opt * @returns {Promise<ResultType>} */ Around(opt: CameraRotateType): Promise<ResultType>; /** * @public * @async * @function PlayCameraRoam * @param {Record<string, any>} obj * @param {{state?: string, progressRatio?: number, speedRatio?: number, bReverse?: boolean}} opt * @returns {Promise<ResultType>} */ PlayCameraRoam(obj: Record<string, any>, opt?: { state?: string; progressRatio?: number; speedRatio?: number; bReverse?: boolean; }): Promise<ResultType>; /** * @public * @async * @function PlayRoam * @param {Record<string, any>} obj * @param {{state?: string, progressRatio?: number, speedRatio?: number, bReverse?: boolean}} opt * @returns {Promise<ResultType>} */ PlayRoam(obj?: Record<string, any>, opt?: { progressRatio?: number; speedRatio?: number; bReverse?: boolean; }): Promise<ResultType>; /** * @public * @async * @function PauseRoam * @returns {Promise<ResultType>} */ PauseRoam(opt?: { bEnableRotatingOnPause?: boolean; bEnableZoomingOnPause?: boolean; }): Promise<ResultType>; /** * @public * @async * @function StopRoam * @returns {Promise<ResultType>} */ StopRoam(): Promise<ResultType>; /** * @public * @async * @function GetCameraRoamingInfo * @param {Record<string, any>} obj * @returns {Promise<ResultType>} */ GetCameraRoamingInfo(obj: Record<string, any>): Promise<ResultType>; /** * @public * @async * @function Apply * @param {Record<string, any>} camera * @param {number} flyTime (default value is 1) * @returns {Promise<ResultType>} */ Apply(camera: Record<string, any>, flyTime?: number): Promise<ResultType>; /** * @public * @async * @function FocusByCustomId * @param {Array<string>} cids * @param {CameraFocusType} opt * @returns {Promise<ResultType>} */ FocusByCustomId(cids: Array<string>, opt: CameraFocusType): Promise<ResultType>; /** * @public * @async * @function FocusByEntityName * @param {Array<string>} entityNames * @param {CameraFocusType} opt * @returns {Promise<ResultType>} */ FocusByEntityName(entityNames: Array<string>, opt: CameraFocusType): Promise<ResultType>; /** * @public * @async * @function CameraStepMove * @param {ICameraStepMove} opt * @returns {Promise<ResultType>} */ CameraStepMove(opt: ICameraStepMove): Promise<ResultType>; /** * @public * @async * @function CameraStepRotate * @param {ICameraStepRotate} opt * @returns {Promise<ResultType>} */ CameraStepRotate(opt: ICameraStepRotate): Promise<ResultType>; /** * @public * @async * @function CameraStepZoom * @param {ICameraMoveBasic} opt * @returns {Promise<ResultType>} */ CameraStepZoom(opt: ICameraMoveBasic): Promise<ResultType>; /** * @public * @async * @function StopCameraStepUpdate * @returns {Promise<ResultType>} */ StopCameraStepUpdate(): Promise<ResultType>; /** * @public * @async * @function GetCameraSpeed * @returns {Promise<ResultType>} */ GetCameraSpeed(): Promise<ResultType>; /** * @public * @async * @function SetCameraSpeed * @param {ISetCameraSpeed} opt * @returns {Promise<ResultType>} */ SetCameraSpeed(opt: ISetCameraSpeed): Promise<ResultType>; /** * @public * @async * @function GetCameraAnimation * @returns {Promise<ResultType>} */ GetCameraAnimation(): Promise<ResultType>; /** * @public * @async * @function SetCameraAnimation * @param {ISetCameraAnimation} opt * @returns {Promise<ResultType>} */ SetCameraAnimation(opt: ISetCameraAnimation): Promise<ResultType>; /** * @public * @async * @function ToggleCameraSelfRotate * @param {boolean} bSelfRotate optional (default is true) * @returns {Promise<ResultType>} */ ToggleCameraSelfRotate(bSelfRotate?: boolean): Promise<ResultType>; } export default CameraControlController;