-
Notifications
You must be signed in to change notification settings - Fork 117
3.0 AS Library Updates
https://github.com/DragonBones/DragonBonesAS/releases/tag/V3.0
Demo: https://github.com/DragonBones/DragonBonesDemos/releases/tag/V3.0
DragonBones 3.0 beta AS Library is totally compatible with 2.4.1 DesignPanel.You can still work with 2.4.1 designpanel and leverage 3.0 Library in your game. (3.0 beta DesignPanel will coming soon)
- Animation support gotoAndStop.
- Looped Animation support play backward.
armature.animation.gotoAndPlay("someLoopAnimation").setTimeScale(-1); - Factory and DataParser support delay parse animation data in parse data process.
- Improve Performance by Cache Animation and adjust animation Sampling Rate.
- Improve performance by Optimize handling still bones.
- Remove DisplayBridge. Use Slot to replace it. Each rendering engine need to extend Slot to integrated with DragonBones.
- bone.fixRotation, replaced by bone.inheritRotation
- bone.scaleMode, replaced by bone.inheritScale
- slot.fixRotation,replaced by slot.inheritRotation
- slot.scaleMode,replaced by slot.inheritScale;
- animationState.currentTime,replaced by animationState.setCurrentTime
- armature.invalidUpdate(boneName:String = null)
It support updae a bone inside of the whole armature. - animation.gotoAndPlay
return imported AnimationState Object. - factory.parseData(bytes:ByteArray, dataName:String = null, ifSkipAnimationData:Boolean = false, outputAnimationDictionary:Dictionary = null):SkeletonData
DataParser.parseData(rawData:Object, ifSkipAnimationData:Boolean = false, outputAnimationDictionary:Dictionary = null):SkeletonData
Add new parameter ifSkipAnimationData, set it to true to skip parse animation data.
Add new parameter outputAnimationDictionary, animationData will be fulfilled into it if it is an not null.
-
armature.cacheFrameRate
When armature.cacheFrameRate > 0, cache animation based on the frame rate. It will increase rendering performance as well as the memory consumption and also lose some animation feature ( such as bone.offset can not be used. The timescale of bone's timeline must be 1/2^n (1, 0.5, 0.25) -
bone.invalidUpdate Force update bone in next frame even the bone is not moving
-
animation.gotoAndStop Control the animation to stop with a specified time. If related animationState haven't been created, then create a new animationState.
@param animationName : The name of the animationState.
@param time
@param normalizedTime
@param fadeInTime : A fade time to apply (>= 0), -1 means use xml data's fadeInTime.
@param duration : The duration of that AnimationData
@param layer : The layer of the animation.
@param group : The group of the animation.
@param fadeOutMode Fade out mode (none, sameLayer, sameGroup, sameLayerAndGroup, all).
@return AnimationState. -
factory.addAnimationToArmature(animationRawData:Object, armature:Armature, frameRate:uint):void
Add a new animation to armature.
@param animationRawData (XML, JSON).
@param target armature.
@param frame rate.
- bone.node -> bone.offset
- animation.movementList -> animation.animationList
- animation.movementID -> animation.lastAnimationName
- animationEvent.MOVEMENT_CHANGE -> animationEvent.FADE_IN or animationEvent.START
- animationEvent.movementID -> animation.animationName
- FrameEvent.MOVEMENT_FRAME_EVENT -> FrameEvent.ANIMATION_FRAME_EVENT
- bone.childArmature -> slot.childArmature
- bone.display -> slot.display