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

147 lines (146 loc) 4.6 kB
import { Basic } from './common/basic'; import { ResultType, CoordType, RotatorType, ScaleType, CoordZRefType } from './common/data-type'; export type EaseType = 'Linear' | 'EaseIn' | 'EaseOut' | 'EaseInOut' | 'InOut'; export type AnimationStateType = 'Playing' | 'Paused' | 'Stopped'; export type RotateAxisType = 'X' | 'Y' | 'Z'; export type RotateDirectionType = 'Clockwise' | 'CounterClockwise'; /** * @public * @interface PlayLocationAnimationOptType */ export interface PlayLocationAnimationOptType { entity: Record<string, any>; locations: Array<CoordType>; coordZRef?: CoordZRefType | 'Surface' | 'Ground' | 'Altitude'; easeType?: EaseType; duration?: number; loopTime?: number; reverse?: boolean; turnAround?: boolean; turnAlong?: boolean; state?: AnimationStateType; } /** * @public * @interface PlayRotationAnimationOptType */ export interface PlayRotationAnimationOptType { entity: Record<string, any>; rotators: Array<RotatorType>; easeType?: EaseType; duration?: number; loopTime?: number; reverse?: boolean; state?: AnimationStateType; } /** * @public * @interface PlayScaleAnimationOptType */ export interface PlayScaleAnimationOptType { entity: Record<string, any>; scales: Array<ScaleType>; easeType?: EaseType; duration?: number; loopTime?: number; reverse?: boolean; state?: AnimationStateType; } /** * @public * @interface PlaySelfRotationAnimationOptType */ export interface PlaySelfRotationAnimationOptType { entity: Record<string, any>; rotateAxis?: RotateAxisType; rotateDirection?: RotateDirectionType; rotateSpeed?: number; state?: AnimationStateType; } /** * @public * @class AnimationController * @extends Basic */ declare class AnimationController extends Basic { private apiClassName; private AnimationValidate; /** * @constructor * @param {any} obj */ constructor(obj: any); /** * @public * @async * @function PlayLocationAnimation * @param {PlayLocationAnimationOptType} opt * @returns {Promise<ResultType>} */ PlayLocationAnimation(opt: PlayLocationAnimationOptType): Promise<ResultType>; /** * @public * @async * @function PlayRotationAnimation * @param {PlayRotationAnimationOptType} opt * @returns {Promise<ResultType>} */ PlayRotationAnimation(opt: PlayRotationAnimationOptType): Promise<ResultType>; /** * @public * @async * @function PlayScaleAnimation * @param {PlayScaleAnimationOptType} opt * @returns {Promise<ResultType>} */ PlayScaleAnimation(opt: PlayScaleAnimationOptType): Promise<ResultType>; /** * @public * @async * @function PlaySelfRotationAnimation * @param {PlaySelfRotationAnimationOptType} opt * @returns {Promise<ResultType>} */ PlaySelfRotationAnimation(opt: PlaySelfRotationAnimationOptType): Promise<ResultType>; /** * @public * @async * @function UpdateLocationAnimation * @param {Partial<PlayLocationAnimationOptType> & {entity: Record<string, any>}} opt (all fields except entity optional) * @returns {Promise<ResultType>} */ UpdateLocationAnimation(opt: Partial<PlayLocationAnimationOptType> & { entity: Record<string, any>; }): Promise<ResultType>; /** * @public * @async * @function UpdateRotationAnimation * @param {Partial<PlayRotationAnimationOptType> & {entity: Record<string, any>}} opt (all fields except entity optional) * @returns {Promise<ResultType>} */ UpdateRotationAnimation(opt: Partial<PlayRotationAnimationOptType> & { entity: Record<string, any>; }): Promise<ResultType>; /** * @public * @async * @function UpdateScaleAnimation * @param {Partial<PlayScaleAnimationOptType> & {entity: Record<string, any>}} opt (all fields except entity optional) * @returns {Promise<ResultType>} */ UpdateScaleAnimation(opt: Partial<PlayScaleAnimationOptType> & { entity: Record<string, any>; }): Promise<ResultType>; /** * @public * @async * @function UpdateSelfRotationAnimation * @param {Partial<PlaySelfRotationAnimationOptType> & {entity: Record<string, any>}} opt (all fields except entity optional) * @returns {Promise<ResultType>} */ UpdateSelfRotationAnimation(opt: Partial<PlaySelfRotationAnimationOptType> & { entity: Record<string, any>; }): Promise<ResultType>; } export default AnimationController;