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
191 lines (190 loc) • 5.48 kB
TypeScript
import { ObjectCommon } from './object-common';
import { ResultType, CoordType, RotatorType, ScaleType, TransformAtomType, BasicInfoAtomType, VisibleAtomType } from './data-type';
/**
* @public
* @class ObjectController
* @extends ObjectCore
* @implements ObjectAbstract
*/
export declare class ObjectController extends ObjectCommon implements ObjectAbstract {
activeBaseAttributes: Array<string>;
protected TransformAtom: TransformAtomType;
get location(): CoordType;
set location(location: CoordType);
get rotator(): RotatorType;
set rotator(rotator: RotatorType);
get scale3d(): ScaleType;
set scale3d(scale3d: ScaleType);
get pivotOffset(): Array<number>;
set pivotOffset(pivotOffset: Array<number>);
GetLocation(): Promise<ResultType>;
SetLocation(location: CoordType): Promise<ResultType>;
GetRotator(): Promise<ResultType>;
SetRotator(rotator: RotatorType): Promise<ResultType>;
GetScale3d(): Promise<ResultType>;
SetScale3d(scale3d: ScaleType): Promise<ResultType>;
GetPivotOffset(): Promise<ResultType>;
SetPivotOffset(pivotOffset: Array<number>): Promise<ResultType>;
/**
* @public
* @function GetTransformScheme
* @returns {{TransformAtom: TransformAtomType}}
*/
GetTransformScheme(): {
TransformAtom: TransformAtomType;
};
/**
* @public
* @function GetBaseScheme
* @returns {{BasicInfoAtom: BasicInfoAtomType, TransformAtom: TransformAtomType, VisibleAtom: VisibleAtomType}}
*/
GetBaseScheme(): {
BasicInfoAtom: BasicInfoAtomType;
TransformAtom: TransformAtomType;
VisibleAtom: VisibleAtomType;
};
/**
* @public
* @function GetAllScheme
* @returns {Record<string, any>}
*/
GetAllScheme(): Record<string, any>;
/**
* @private
* @async
* @function handleLocationAction
* @param {CoordType} location
* @returns {Promise<ResultType>}
*/
private handleLocationAction;
/**
* @private
* @async
* @function handleRotatorAction
* @param {RotatorType} rotator
* @returns {Promise<ResultType>}
*/
private handleRotatorAction;
/**
* @private
* @async
* @function handleScale3dAction
* @param {ScaleType} scale3d
* @returns {Promise<ResultType>}
*/
private handleScale3dAction;
/**
* @private
* @async
* @function handlePivotOffsetAction
* @param {Array<number>} pivotOffset
* @returns {Promise<ResultType>}
*/
private handlePivotOffsetAction;
/**
* @protected
* @function setTransformData
* @param {Partial<TransformAtomType>} opt
* @returns {void}
*/
protected setTransformData(opt: Partial<TransformAtomType>): void;
/**
* @protected
* @function getTransformData
* @returns {TransformAtomType}
*/
protected getTransformData(): TransformAtomType;
/**
* @protected
* @function handleTransformAtom
* @param {Record<string, any>} oriData
* @param {Record<string, any>} paramsData
* @returns {void}
*/
protected handleTransformAtom(oriData: Record<string, any>, paramsData: Record<string, any>): void;
/**
* @protected
* @function validateLocation
* @param {CoordType} location
*/
protected validateLocation(location: CoordType): void;
/**
* @protected
* @function validateRotator
* @param {RotatorType} rotator
* @returns {void}
*/
protected validateRotator(rotator: RotatorType): void;
/**
* @protected
* @function validateScale3d
* @param {ScaleType} scale3d
* @returns {void}
*/
protected validateScale3d(scale3d: ScaleType): void;
/**
* @protected
* @function validatePivotOffset
* @param {Array<number>} pivotOffset
* @returns {void}
*/
protected validatePivotOffset(pivotOffset: Array<number>): void;
/**
* @public
* @function generateLocationAtom
* @param {CoordType} location
* @returns {{TransformAtom: {location: CoordType}}}
*/
generateLocationAtom(location: CoordType): {
TransformAtom: {
location: CoordType;
};
};
/**
* @public
* @function generateRotatorAtom
* @param {RotatorType} rotator
* @returns {{TransformAtom: {rotator: RotatorType}}}
*/
generateRotatorAtom(rotator: RotatorType): {
TransformAtom: {
rotator: RotatorType;
};
};
/**
* @public
* @function generateScale3dAtom
* @param {ScaleType} scale3d
* @returns {TransformAtom: {scale3d: ScaleType}}
*/
generateScale3dAtom(scale3d: ScaleType): {
TransformAtom: {
scale3d: ScaleType;
};
};
/**
* @public
* @function GetData
* @returns {Record<string, any>}
*/
GetData(): Record<string, any>;
}
declare abstract class ObjectAbstract {
abstract generateLocationAtom: (location: CoordType) => {
TransformAtom: {
location: CoordType;
};
};
abstract generateRotatorAtom: (rotator: RotatorType) => {
TransformAtom: {
rotator: RotatorType;
};
};
abstract generateScale3dAtom: (scale3d: ScaleType) => {
TransformAtom: {
scale3d: ScaleType;
};
};
abstract GetData: () => Record<string, any>;
}
export {};