Class: ObjectDataParser

extend: DataParser

Import example:

import { dragonBones } from "cc"; 
const { ObjectDataParser } = dragonBones;

Index

Constructors

Static Properties

Static Methods

Properties

Methods

Inherited Properties
  • IK static
  • X static
  • Y static

Inherited Methods

Details

Constructors

public ObjectDataParser () :
ObjectDataParser
Inherited from: DataParser.constructor

Static Properties

protected _objectDataParserInstance : any
static

Static Methods

public getInstance () :
ObjectDataParser
static
Deprecated:
- 已废弃,请参考 {@link dragonBones.BaseFactory#parseDragonBonesData()}。
protected _getBoolean (rawData : any, key : string, defaultValue : boolean) :
boolean
static
Input Parameters
NameTypeDescription
rawDataany-
keystring-
defaultValueboolean-
Returns: boolean
protected _getNumber (rawData : any, key : string, defaultValue : number) :
number
static
Input Parameters
NameTypeDescription
rawDataany-
keystring-
defaultValuenumber-
Returns: number
protected _getString (rawData : any, key : string, defaultValue : string) :
string
static
Input Parameters
NameTypeDescription
rawDataany-
keystring-
defaultValuestring-
Returns: string

Properties

protected _actionFrames : any
readonly
protected _cacheBones : any
readonly
protected _cacheMeshes : any
readonly
protected _cacheRawMeshes : any
readonly
protected _defaultColorOffset : any
protected _floatArray : any
readonly
protected _frameArray : any
readonly
protected _frameFloatArray : any
readonly
protected _frameIntArray : any
readonly
protected _helpArray : any
readonly
protected _helpColorTransform : any
readonly
protected _helpMatrixA : any
readonly
protected _helpMatrixB : any
readonly
protected _helpPoint : any
readonly
protected _helpTransform : any
readonly
protected _intArray : any
readonly
protected _prevClockwise : any
protected _prevRotation : any
protected _rawBones : BoneData []
readonly
protected _rawTextureAtlasIndex : number
protected _rawTextureAtlases : null | any []
protected _slotChildActions : any
readonly
protected _timelineArray : any
readonly
protected _weightBonePoses : any
readonly
protected _weightSlotPose : any
readonly

Methods

protected _getCurvePoint (x1 : any, y1 : any, x2 : any, y2 : any, x3 : any, y3 : any, x4 : any, y4 : any, t : any, result : any) :
any
Input Parameters
NameTypeDescription
x1any-
y1any-
x2any-
y2any-
x3any-
y3any-
x4any-
y4any-
tany-
resultany-
Returns: any
protected _mergeActionFrame (rawData : any, frameStart : any, type : any, bone : any, slot : any) :
any
Input Parameters
NameTypeDescription
rawDataany-
frameStartany-
typeany-
boneany-
slotany-
Returns: any
protected _modifyArray () :
void
Returns: void
protected _parseActionData (rawData : any, type : ActionType, bone : null | BoneData, slot : null | SlotData) :
ActionData []
Input Parameters
NameTypeDescription
rawDataany-
typeActionType-
bonenull | BoneData-
slotnull | SlotData-
Returns: ActionData []
protected _parseActionDataInFrame (rawData : any, frameStart : any, bone : any, slot : any) :
any
Input Parameters
NameTypeDescription
rawDataany-
frameStartany-
boneany-
slotany-
Returns: any
protected _parseActionFrame (frame : ActionFrame, frameStart : number, frameCount : number) :
number
Input Parameters
NameTypeDescription
frameActionFrame-
frameStartnumber-
frameCountnumber-
Returns: number
protected _parseAnimation (rawData : any) :
AnimationData
Input Parameters
NameTypeDescription
rawDataany-
Returns: AnimationData
protected _parseAnimationFrame (rawData : any, frameStart : number, frameCount : number) :
number
Input Parameters
NameTypeDescription
rawDataany-
frameStartnumber-
frameCountnumber-
Returns: number
protected _parseArmature (rawData : any, scale : number) :
ArmatureData
Input Parameters
NameTypeDescription
rawDataany-
scalenumber-
Returns: ArmatureData
protected _parseArray (rawData : any) :
void
Input Parameters
NameTypeDescription
rawDataany-
Returns: void
protected _parseBone (rawData : any) :
BoneData
Input Parameters
NameTypeDescription
rawDataany-
Returns: BoneData
protected _parseBoneAllFrame (rawData : any, frameStart : number, frameCount : number) :
number
Input Parameters
NameTypeDescription
rawDataany-
frameStartnumber-
frameCountnumber-
Returns: number
protected _parseBoneRotateFrame (rawData : any, frameStart : number, frameCount : number) :
number
Input Parameters
NameTypeDescription
rawDataany-
frameStartnumber-
frameCountnumber-
Returns: number
protected _parseBoneScaleFrame (rawData : any, frameStart : number, frameCount : number) :
number
Input Parameters
NameTypeDescription
rawDataany-
frameStartnumber-
frameCountnumber-
Returns: number
protected _parseBoneTimeline (rawData : any) :
void
Input Parameters
NameTypeDescription
rawDataany-
Returns: void
protected _parseBoneTranslateFrame (rawData : any, frameStart : number, frameCount : number) :
number
Input Parameters
NameTypeDescription
rawDataany-
frameStartnumber-
frameCountnumber-
Returns: number
protected _parseBoundingBox (rawData : any) :
null | BoundingBoxData
Input Parameters
NameTypeDescription
rawDataany-
protected _parseColorTransform (rawData : any, color : ColorTransform) :
void
Input Parameters
NameTypeDescription
rawDataany-
colorColorTransform-
Returns: void
protected _parseDisplay (rawData : any) :
null | DisplayData
Input Parameters
NameTypeDescription
rawDataany-
Returns: null | DisplayData
protected _parseFrame (rawData : any, frameStart : number, frameCount : number) :
number
Input Parameters
NameTypeDescription
rawDataany-
frameStartnumber-
frameCountnumber-
Returns: number
protected _parseIKConstraint (rawData : any) :
null | ConstraintData
Input Parameters
NameTypeDescription
rawDataany-
Returns: null | ConstraintData
protected _parseIKConstraintFrame (rawData : any, frameStart : number, frameCount : number) :
number
Input Parameters
NameTypeDescription
rawDataany-
frameStartnumber-
frameCountnumber-
Returns: number
protected _parseMesh (rawData : any, mesh : MeshDisplayData) :
void
Input Parameters
NameTypeDescription
rawDataany-
meshMeshDisplayData-
Returns: void
protected _parseMeshGlue (rawData : any, mesh : MeshDisplayData) :
void
Input Parameters
NameTypeDescription
rawDataany-
meshMeshDisplayData-
Returns: void
protected _parsePivot (rawData : any, display : ImageDisplayData) :
void
Input Parameters
NameTypeDescription
rawDataany-
displayImageDisplayData-
Returns: void
protected _parsePolygonBoundingBox (rawData : any) :
PolygonBoundingBoxData
Input Parameters
NameTypeDescription
rawDataany-
protected _parseSkin (rawData : any) :
SkinData
Input Parameters
NameTypeDescription
rawDataany-
Returns: SkinData
protected _parseSlot (rawData : any, zOrder : number) :
SlotData
Input Parameters
NameTypeDescription
rawDataany-
zOrdernumber-
Returns: SlotData
protected _parseSlotColorFrame (rawData : any, frameStart : number, frameCount : number) :
number
Input Parameters
NameTypeDescription
rawDataany-
frameStartnumber-
frameCountnumber-
Returns: number
protected _parseSlotDisplayFrame (rawData : any, frameStart : number, frameCount : number) :
number
Input Parameters
NameTypeDescription
rawDataany-
frameStartnumber-
frameCountnumber-
Returns: number
protected _parseSlotFFDFrame (rawData : any, frameStart : number, frameCount : number) :
number
Input Parameters
NameTypeDescription
rawDataany-
frameStartnumber-
frameCountnumber-
Returns: number
protected _parseSlotTimeline (rawData : any) :
void
Input Parameters
NameTypeDescription
rawDataany-
Returns: void
protected _parseSurfaceFrame (rawData : any, frameStart : number, frameCount : number) :
number
Input Parameters
NameTypeDescription
rawDataany-
frameStartnumber-
frameCountnumber-
Returns: number
protected _parseTimeline (rawData : any, rawFrames : null | any [], framesKey : string, type : TimelineType, addIntOffset : boolean, addFloatOffset : boolean, frameValueCount : number, frameParser :
(rawData : any, frameStart : number, frameCount : number) =>
number
) :
null | TimelineData
Input Parameters
NameTypeDescription
rawDataany-
rawFramesnull | any []-
framesKeystring-
typeTimelineType-
addIntOffsetboolean-
addFloatOffsetboolean-
frameValueCountnumber-
frameParser
(rawData : any, frameStart : number, frameCount : number) =>
number
-
Returns: null | TimelineData
protected _parseTransform (rawData : any, transform : Transform, scale : number) :
void
Input Parameters
NameTypeDescription
rawDataany-
transformTransform-
scalenumber-
Returns: void
protected _parseTweenFrame (rawData : any, frameStart : number, frameCount : number) :
number
Input Parameters
NameTypeDescription
rawDataany-
frameStartnumber-
frameCountnumber-
Returns: number
protected _parseZOrderFrame (rawData : any, frameStart : number, frameCount : number) :
number
Input Parameters
NameTypeDescription
rawDataany-
frameStartnumber-
frameCountnumber-
Returns: number
protected _samplingEasingCurve (curve : any, samples : any) :
any
Input Parameters
NameTypeDescription
curveany-
samplesany-
Returns: any

Inherited Properties

protected AABB : string
staticreadonly
Inherited from: AABB
protected ACTION : string
staticreadonly
Inherited from: ACTION
protected ACTIONS : string
staticreadonly
Inherited from: ACTIONS
protected ALPHA_MULTIPLIER : string
staticreadonly
Inherited from: ALPHA_MULTIPLIER
protected ALPHA_OFFSET : string
staticreadonly
Inherited from: ALPHA_OFFSET
protected ANIMATION : string
staticreadonly
Inherited from: ANIMATION
protected ARMATURE : string
staticreadonly
Inherited from: ARMATURE
protected BEND_POSITIVE : string
staticreadonly
Inherited from: BEND_POSITIVE
protected BLEND_MODE : string
staticreadonly
Inherited from: BLEND_MODE
protected BLUE_MULTIPLIER : string
staticreadonly
Inherited from: BLUE_MULTIPLIER
protected BLUE_OFFSET : string
staticreadonly
Inherited from: BLUE_OFFSET
protected BONE : string
staticreadonly
Inherited from: BONE
protected BONE_POSE : string
staticreadonly
Inherited from: BONE_POSE
protected CANVAS : string
staticreadonly
Inherited from: CANVAS
protected CHAIN : string
staticreadonly
Inherited from: CHAIN
protected CLOCK_WISE : string
staticreadonly
Inherited from: CLOCK_WISE
protected COLOR : string
staticreadonly
Inherited from: COLOR
protected COLOR_FRAME : string
staticreadonly
Inherited from: COLOR_FRAME
protected COMPATIBLE_VERSION : string
staticreadonly
Inherited from: COMPATIBLE_VERSION
protected CONSTRAINT : string
staticreadonly
Inherited from: CONSTRAINT
protected CURVE : string
staticreadonly
Inherited from: CURVE
protected DATA_VERSION : string
staticreadonly
Inherited from: DATA_VERSION
protected DATA_VERSIONS : string []
staticreadonly
Inherited from: DATA_VERSIONS
protected DATA_VERSION_2_3 : string
staticreadonly
Inherited from: DATA_VERSION_2_3
protected DATA_VERSION_3_0 : string
staticreadonly
Inherited from: DATA_VERSION_3_0
protected DATA_VERSION_4_0 : string
staticreadonly
Inherited from: DATA_VERSION_4_0
protected DATA_VERSION_4_5 : string
staticreadonly
Inherited from: DATA_VERSION_4_5
protected DATA_VERSION_5_0 : string
staticreadonly
Inherited from: DATA_VERSION_5_0
protected DATA_VERSION_5_5 : string
staticreadonly
Inherited from: DATA_VERSION_5_5
protected DEFAULT_ACTIONS : string
staticreadonly
Inherited from: DEFAULT_ACTIONS
protected DEFAULT_NAME : string
staticreadonly
Inherited from: DEFAULT_NAME
protected DISPLAY : string
staticreadonly
Inherited from: DISPLAY
protected DISPLAY_FRAME : string
staticreadonly
Inherited from: DISPLAY_FRAME
protected DISPLAY_INDEX : string
staticreadonly
Inherited from: DISPLAY_INDEX
protected DRADON_BONES : string
staticreadonly
Inherited from: DRADON_BONES
protected DURATION : string
staticreadonly
Inherited from: DURATION
protected EVENT : string
staticreadonly
Inherited from: EVENT
protected EVENTS : string
staticreadonly
Inherited from: EVENTS
protected FADE_IN_TIME : string
staticreadonly
Inherited from: FADE_IN_TIME
protected FFD : string
staticreadonly
Inherited from: FFD
protected FLOATS : string
staticreadonly
Inherited from: FLOATS
protected FORMAT : string
staticreadonly
Inherited from: FORMAT
protected FRAME : string
staticreadonly
Inherited from: FRAME
protected FRAME_HEIGHT : string
staticreadonly
Inherited from: FRAME_HEIGHT
protected FRAME_RATE : string
staticreadonly
Inherited from: FRAME_RATE
protected FRAME_WIDTH : string
staticreadonly
Inherited from: FRAME_WIDTH
protected FRAME_X : string
staticreadonly
Inherited from: FRAME_X
protected FRAME_Y : string
staticreadonly
Inherited from: FRAME_Y
protected GLUE_MESHES : string
staticreadonly
Inherited from: GLUE_MESHES
protected GLUE_WEIGHTS : string
staticreadonly
Inherited from: GLUE_WEIGHTS
protected GOTO_AND_PLAY : string
staticreadonly
Inherited from: GOTO_AND_PLAY
protected GREEN_MULTIPLIER : string
staticreadonly
Inherited from: GREEN_MULTIPLIER
protected GREEN_OFFSET : string
staticreadonly
Inherited from: GREEN_OFFSET
protected HEIGHT : string
staticreadonly
Inherited from: HEIGHT
protected IK : string
staticreadonly
Inherited from: IK
protected IMAGE_PATH : string
staticreadonly
Inherited from: IMAGE_PATH
protected INHERIT_ANIMATION : string
staticreadonly
Inherited from: INHERIT_ANIMATION
protected INHERIT_DEFORM : string
staticreadonly
Inherited from: INHERIT_DEFORM
protected INHERIT_REFLECTION : string
staticreadonly
Inherited from: INHERIT_REFLECTION
protected INHERIT_ROTATION : string
staticreadonly
Inherited from: INHERIT_ROTATION
protected INHERIT_SCALE : string
staticreadonly
Inherited from: INHERIT_SCALE
protected INHERIT_TRANSLATION : string
staticreadonly
Inherited from: INHERIT_TRANSLATION
protected INTS : string
staticreadonly
Inherited from: INTS
protected LENGTH : string
staticreadonly
Inherited from: LENGTH
protected NAME : string
staticreadonly
Inherited from: NAME
protected OFFSET : string
staticreadonly
Inherited from: OFFSET
protected PARENT : string
staticreadonly
Inherited from: PARENT
protected PATH : string
staticreadonly
Inherited from: PATH
protected PIVOT : string
staticreadonly
Inherited from: PIVOT
protected PLAY_TIMES : string
staticreadonly
Inherited from: PLAY_TIMES
protected POSITION : string
staticreadonly
Inherited from: POSITION
protected RED_MULTIPLIER : string
staticreadonly
Inherited from: RED_MULTIPLIER
protected RED_OFFSET : string
staticreadonly
Inherited from: RED_OFFSET
protected ROTATE : string
staticreadonly
Inherited from: ROTATE
protected ROTATED : string
staticreadonly
Inherited from: ROTATED
protected ROTATE_FRAME : string
staticreadonly
Inherited from: ROTATE_FRAME
protected SCALE : string
staticreadonly
Inherited from: SCALE
protected SCALE_FRAME : string
staticreadonly
Inherited from: SCALE_FRAME
protected SCALE_X : string
staticreadonly
Inherited from: SCALE_X
protected SCALE_Y : string
staticreadonly
Inherited from: SCALE_Y
protected SEGMENT_X : string
staticreadonly
Inherited from: SEGMENT_X
protected SEGMENT_Y : string
staticreadonly
Inherited from: SEGMENT_Y
protected SHARE : string
staticreadonly
Inherited from: SHARE
protected SKEW : string
staticreadonly
Inherited from: SKEW
protected SKEW_X : string
staticreadonly
Inherited from: SKEW_X
protected SKEW_Y : string
staticreadonly
Inherited from: SKEW_Y
protected SKIN : string
staticreadonly
Inherited from: SKIN
protected SLOT : string
staticreadonly
Inherited from: SLOT
protected SLOT_POSE : string
staticreadonly
Inherited from: SLOT_POSE
protected SOUND : string
staticreadonly
Inherited from: SOUND
protected STAGE : string
staticreadonly
Inherited from: STAGE
protected STRINGS : string
staticreadonly
Inherited from: STRINGS
protected SUB_TEXTURE : string
staticreadonly
Inherited from: SUB_TEXTURE
protected SUB_TYPE : string
staticreadonly
Inherited from: SUB_TYPE
protected SURFACE : string
staticreadonly
Inherited from: SURFACE
protected TARGET : string
staticreadonly
Inherited from: TARGET
protected TEXTURE_ATLAS : string
staticreadonly
Inherited from: TEXTURE_ATLAS
protected TRANSFORM : string
staticreadonly
Inherited from: TRANSFORM
protected TRANSLATE_FRAME : string
staticreadonly
Inherited from: TRANSLATE_FRAME
protected TRIANGLES : string
staticreadonly
Inherited from: TRIANGLES
protected TWEEN_EASING : string
staticreadonly
Inherited from: TWEEN_EASING
protected TWEEN_ROTATE : string
staticreadonly
Inherited from: TWEEN_ROTATE
protected TWEEN_SCALE : string
staticreadonly
Inherited from: TWEEN_SCALE
protected TYPE : string
staticreadonly
Inherited from: TYPE
protected USER_DATA : string
staticreadonly
Inherited from: USER_DATA
protected UVS : string
staticreadonly
Inherited from: UVS
protected VALUE : string
staticreadonly
Inherited from: VALUE
protected VERSION : string
staticreadonly
Inherited from: VERSION
protected VERTICES : string
staticreadonly
Inherited from: VERTICES
protected WEIGHT : string
staticreadonly
Inherited from: WEIGHT
protected WEIGHTS : string
staticreadonly
Inherited from: WEIGHTS
protected WIDTH : string
staticreadonly
Inherited from: WIDTH
protected X : string
staticreadonly
Inherited from: X
protected Y : string
staticreadonly
Inherited from: Y
protected Z_ORDER : string
staticreadonly
Inherited from: Z_ORDER

Inherited Methods

public parseTextureAtlasData (rawData : any, scale ?: number) :
any
static
Inherited from: DataParser.parseTextureAtlasData
Deprecated:
- 已废弃,请参考 {@link dragonBones.BaseFactory#parsetTextureAtlasData()}。
Input Parameters
NameTypeDescription
rawDataany-
scalenumber-
Returns: any
public parseDragonBonesData (rawData : any) :
null | DragonBonesData
static
Inherited from: DataParser.parseDragonBonesData
Deprecated:
- 已废弃,请参考 {@link dragonBones.BaseFactory#parsetTextureAtlasData()}。
Input Parameters
NameTypeDescription
rawDataany-
public parseTextureAtlasData (rawData : any, textureAtlasData : TextureAtlasData, scale ?: number) :
boolean
Input Parameters
NameTypeDescription
rawDataany-
textureAtlasDataTextureAtlasData-
scalenumber-
Returns: boolean
public parseDragonBonesData (rawData : any, scale ?: number) :
null | DragonBonesData
Input Parameters
NameTypeDescription
rawDataany-
scalenumber-
protected _getActionType (value : string) :
ActionType
static
Inherited from: ActionType
Input Parameters
NameTypeDescription
valuestring-
Returns: ActionType
protected _getArmatureType (value : string) :
ArmatureType
static
Inherited from: ArmatureType
Input Parameters
NameTypeDescription
valuestring-
Returns: ArmatureType
protected _getBlendMode (value : string) :
BlendMode
static
Inherited from: BlendMode
Input Parameters
NameTypeDescription
valuestring-
Returns: BlendMode
protected _getBoneType (value : string) :
BoneType
static
Inherited from: BoneType
Input Parameters
NameTypeDescription
valuestring-
Returns: BoneType
protected _getBoundingBoxType (value : string) :
BoundingBoxType
static
Inherited from: BoundingBoxType
Input Parameters
NameTypeDescription
valuestring-
protected _getDisplayType (value : string) :
DisplayType
static
Inherited from: DisplayType
Input Parameters
NameTypeDescription
valuestring-
Returns: DisplayType