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
66 lines (65 loc) • 2.42 kB
TypeScript
import { EntityEidType, BasicInfoAtomType, VisibleAtomType, EntityFlagAtomType, RotatorType, IOffset, EntityOutlinerAtomType, CoordType } from '../data-type';
/**
* @interface BoundType
* @extends EntityEidType,Partial<BasicInfoAtomType>,Partial<VisibleAtomType>,Partial<EntityFlagAtomType>
* @param {any} moving (optional)
* @param {any} path (optional)
* @param {deepPartial<MoveAlongPathEntityAtomType>} boundStyle
*/
export interface BoundType extends EntityEidType, Partial<BasicInfoAtomType>, Partial<VisibleAtomType>, Partial<EntityFlagAtomType>, Partial<EntityOutlinerAtomType> {
moving?: any;
path?: any;
offset?: IOffset;
rotator?: RotatorType;
boundStyle?: Partial<Omit<MoveAlongPathEntityAtomType, 'offset' | 'rotator'>>;
}
/**
* @interface MoveAlongPathEntityAtomType
* @param {string | null} movingEid
* @param {string | null} pathEid
* @param {number} time
* @param {boolean} bLoop
* @param {boolean} bReverse
* @param {boolean} bVisible
* @param {IOffset} offset
* @param {RotatorType} rotator
* @param {string} state
*/
export interface MoveAlongPathEntityAtomType {
movingEid: string | null;
pathEid: string | null;
time: number;
bLoop: boolean;
bReverse: boolean;
offset: IOffset;
rotator: RotatorType;
state: 'play' | 'pause' | 'stop';
pathUpdatePoints: Array<CoordType>;
}
/**
* @interface IGenerate
* @param {deepPartial<MoveAlongPathEntityAtomType>} MoveAlongPathEntityAtom (optional)
* @param {Partial<BasicInfoAtomType>} BasicInfoAtom (optional)
* @param {Partial<VisibleAtomType>} VisibleAtom (optional)
* @param {Partial<EntityFlagAtomType>} EntityFlagAtom (optional)
*/
export interface IGenerate {
MoveAlongPathEntityAtom?: Partial<MoveAlongPathEntityAtomType>;
BasicInfoAtom?: Partial<BasicInfoAtomType>;
VisibleAtom?: Partial<VisibleAtomType>;
EntityFlagAtom?: Partial<EntityFlagAtomType>;
EntityOutlinerAtom?: Partial<EntityOutlinerAtomType>;
}
export interface IOnMoveAlongPathEvent {
path: Record<string, any> | null;
move: Record<string, any> | null;
bound: Record<string, any> | null;
}
export interface IOnMoveAlongPathEnd extends Partial<IOnMoveAlongPathEvent> {
bReverse?: boolean;
}
export interface IOnMoveAlongPathProcessEvent extends Partial<IOnMoveAlongPathEvent> {
passedPoint?: CoordType;
passedOriginalPoint?: CoordType;
passedPointIndex?: number;
}