pixi-dragonbones-runtime
Version:
DragonBones Runtime for Pixi.js
193 lines (192 loc) • 5.52 kB
TypeScript
/**
* The MIT License (MIT)
*
* Copyright (c) 2012-2018 DragonBones team and other contributors
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
import { AnimationState } from "../animation/index.js";
import { Armature, Bone, Slot } from "../armature/index.js";
import { BaseObject } from "../core/index.js";
import { ActionData, UserData } from "../model/index.js";
import { EventStringType } from "./IEventDispatcher.js";
/**
* [en] The properties of the object carry basic information about an event,
* which are passed as parameter or parameter's parameter to event listeners when an event occurs.
*
* [zh] 事件对象,包含有关事件的基本信息,当发生事件时,该实例将作为参数或参数的参数传递给事件侦听器。
*
* @version DragonBones 4.5
*/
export declare class EventObject extends BaseObject {
/**
* [en] Animation start play.
*
* [zh] 动画开始播放。
*
* @version DragonBones 4.5
*/
static readonly START = "start";
/**
* [en] Animation loop play complete once.
*
* [zh] 动画循环播放完成一次。
*
* @version DragonBones 4.5
*/
static readonly LOOP_COMPLETE = "loopComplete";
/**
* [en] Animation play complete.
*
* [zh] 动画播放完成。
*
* @version DragonBones 4.5
*/
static readonly COMPLETE = "complete";
/**
* [en] Animation fade in start.
*
* [zh] 动画淡入开始。
*
* @version DragonBones 4.5
*/
static readonly FADE_IN = "fadeIn";
/**
* [en] Animation fade in complete.
*
* [zh] 动画淡入完成。
*
* @version DragonBones 4.5
*/
static readonly FADE_IN_COMPLETE = "fadeInComplete";
/**
* [en] Animation fade out start.
*
* [zh] 动画淡出开始。
*
* @version DragonBones 4.5
*/
static readonly FADE_OUT = "fadeOut";
/**
* [en] Animation fade out complete.
*
* [zh] 动画淡出完成。
*
* @version DragonBones 4.5
*/
static readonly FADE_OUT_COMPLETE = "fadeOutComplete";
/**
* [en] Animation frame event.
*
* [zh] 动画帧事件。
*
* @version DragonBones 4.5
*/
static readonly FRAME_EVENT = "frameEvent";
/**
* [en] Animation frame sound event.
*
* [zh] 动画帧声音事件。
*
* @version DragonBones 4.5
*/
static readonly SOUND_EVENT = "soundEvent";
/**
* @internal
* @private
*/
static actionDataToInstance(data: ActionData, instance: EventObject, armature: Armature): void;
static toString(): string;
/**
* [en] If is a frame event, the value is used to describe the time that the event was in the animation timeline. (In seconds)
*
* [zh] 如果是帧事件,此值用来描述该事件在动画时间轴中所处的时间。(以秒为单位)
*
* @version DragonBones 4.5
*/
time: number;
/**
* [en] The event type。
*
* [zh] 事件类型。
*
* @version DragonBones 4.5
*/
type: EventStringType;
/**
* [en] The event name. (The frame event name or the frame sound name)
*
* [zh] 事件名称。 (帧事件的名称或帧声音的名称)
*
* @version DragonBones 4.5
*/
name: string;
/**
* [en] The armature that dispatch the event.
*
* [zh] 发出该事件的骨架。
*
* @see Armature
* @version DragonBones 4.5
*/
armature: Armature;
/**
* [en] The bone that dispatch the event.
*
* [zh] 发出该事件的骨骼。
*
* @see Bone
* @version DragonBones 4.5
*/
bone: Bone | null;
/**
* [en] The slot that dispatch the event.
*
* [zh] 发出该事件的插槽。
*
* @see Slot
* @version DragonBones 4.5
*/
slot: Slot | null;
/**
* [en] The animation state that dispatch the event.
*
* [zh] 发出该事件的动画状态。
*
* @see AnimationState
* @version DragonBones 4.5
*/
animationState: AnimationState;
/**
* @private
*/
actionData: ActionData | null;
/**
* @private
*/
/**
* [en] The custom data.
*
* [zh] 自定义数据。
*
* @see CustomData
* @version DragonBones 5.0
*/
data: UserData | null;
protected _onClear(): void;
}