Giter VIP home page Giter VIP logo

dragonbonesas's People

Contributors

akdcl avatar fsilvestrim avatar liaocheng avatar superlancelot avatar thenitro avatar watsonsong avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dragonbonesas's Issues

how to handle empty keyframes within animation?

We have some animation effects which require having some keyframes where a layer exists and others where it doesn't. However, upon inserting a blank keyframe, rather than simply suppressing the element for duration of blank keyframe, it is instead animating the position & scale of the clip. The expected behavior is that the clip is there and then it's not, without transition.

New runtime for DragenBones and FastArmature vs Armature Question

Hi,

I've started to work on a port from the AS3 runtime to a Dart/StageXL runtime. Dart is a programming language from Google and compiles to JavaScript. StageXL is a 2D rendering framework for HTML (with support for Canvas and WebGL).

The first results are looking good. The animation is working fine but i'm sure there are still some bugs that need to be fixed.

http://www.stagexl.org/temp/dragon/example.html
https://github.com/bp74/StageXL_DragonBones

I have a question regarding the FastArmature and normal Armature. I thought that i will get some performance benefits from the FastArmature, but it looks as if both implementations perform pretty much the same. So the question is what are the benefits of FastArmature and are they worth it to maintain both code paths?

Another question if you don't mind. Do you have DragonBones animations to test all features of the runtimes? It would be great to have a set of animations for testing. If those animations work correct one could assume that there are not bugs in the runtime.

Thanks a lot and best greetings,
Bernhard

Pivots are ignored

Panel 3.0.0
DBAS 3.0.1

The animation looks good in the preview panel (it has scale and skew). But when tested in a Starling project, no matter where the register point is placed, the animation will asume the pivot is in the center of the object.

I'm exporting XML and PNGs, getting everything together in TexturePacker.

Sometimes auto tween is ignored.

Panel 3.0.0
DBAS 3.0.1

Sometimes the auto tween option is ignored by the AS library. I can see the property being written in the XML and the animation looks OK in the preview Panel. But when used in a Starling project some animations ignore the AS library and only keyframes are being displayed.

Item tweens in from point 0,0 at zero scale

Hi, I'm trying out DragonBones v2.0, and I've hit a problem in one animation.
It's the same chicken animation I was working on with DragonBones v1.5 that I sent over as an example file previously. It now has a 'cluck' animation state. When I jump to 'cluck' from 'idle' the first time it plays correctly. But on all subsequent visits to 'cluck' the chickens beak jumps to x:0, y:0 width:0,height:0 then tweens back to its correct position and size. It does this both as an armature in my Starling project and when I run it in the DragonBones extension panel. I'll try emailing you an example file to test with again.

cheers,
Alex

Scaling of spritesheet

Hey I cant find support for exported spritesheet and xml to use scale when I have HD graphics and need to get SD version of it. Obviously I can scale down bitmap and edit xml easily BUT graphics wont look so good as they will be scaled version of bitmap and not vector in that case.

Animation control (reset, loop)

Hey guys,

  1. first of all I would like to know how I can reset the animation back to frame 0 after it has successfuly completed?

  2. is there a loop property (it would be great if there was an animation.loop property) so that you can set if you want the animation to loop or not on the fly?

Thanks

Animation.isComplete is true after calling play() on clean armature.animation

Hi,

I get armature.animation.isComplete value of TRUE when I call play for a newly created Armature instance. I checked the source. Looks like _totalTime is set to 0 play() because it only is calculated from this code:

if(tweenTime >= 0)
{
    _totalTime = tweenTime;
}
else if(tweenEnabled && exMovementID)
{
    _totalTime = _movementData.durationTo;
}
else
{
    _totalTime = 0;
}

So it ends up on else because exMovementID is null. But it would also fail when durationTo is 0. Later in code it reads durationTween
_duration = duration >= 0 duration : _movementData.durationTween;
Not sure about it but I think _totalTime should be updated by _duration value i.e.
_totalTime += _duration
or isComplete should be updated by _isPlaying value i.e.

public function get isComplete():Boolean
{
    return _loop < 0 && _currentTime >= _totalTime && !_isPlaying;
}

But I'm not aware of all the logic behind this nor how exactly it works so it's just speculations. Anyway, please fix it :)

The bug relates to the latest 'dev' branch v2.0

Aliasing resulting using NativeFactory

Hi, I'm using dragon bones in flash (non starling mode), but I'm having problems with the rendering of the animations:

image

EDIT: Nevermind. Found fillBitmapSmooth property. Just 1 minute after reporting this bug. Sorry

getBounds returning incorrect values

I'm testing the Dragon example in Starling. I create my armature and reference the Starling display object it generates through the accessor armature.display. If I call getBounds on that display object, passing through itself as the argument in order to get its own internal co-ordinates and work out what its x and y registration points are, I get a rectangle with incorrect values for the x and y. The values I get seem to be smaller than they should be. I think this is a DragonBones issue, not a Starling issue, although I could be wrong!

Bug with nested animations?

We've been struggling with having nested animation that can be controlled independently from its parent animation.

The issue can be recreated as follows:

Start with the iceEffect FrameAnimation.fla demo - hit import in panel and you see it plays.
Drag iceEffect MC to stage and F8 to convert to symbol (with nested iceEffect) named iceEffectAnim.
Edit iceEffectAnim MC to have a frame label and frame duration
Import again to panel
you will see that the original iceEffect still plays, but does not play if you open the iceEffectAnim which has it nested

If you remove the "play" frame label from the iceEffect and re-import, you then see that iceEffectAnim displays the nested animation as expected; however, dragonBones no longer includes the frames from the nested animation in the TextureAtlas.

Incorrect Sprite Size In Generated Texture Atlas

When Dragon Bones generates its Texture Atlas, it determines the sizes of the sprites based on whatever size the sprite is in the first frame that it occurs.

But if the sprite is scaling up dramatically, so in the first frame it is very small, and in the last frame it is very large, the generated sprite is tiny and looks very pixelated when animated in Starling.

The sizes of the sprites in the generated Texture Atlas should be based on the largest size that the sprite exists at - logic would be something like this:

  1. loop through timeline and find all sizes that sprite exists at
  2. determine largest size
  3. generate texture atlas and set sprite size equal to largest size

thanks!

Event COMPLETE not dispatch when at least one bone Frame Scale is higher than 100%

This issue appear with version 3.0. We used 2.4.1 before and with the exact same animation we didn't have the issue.

The event LOOP_COMPLETE works and the animation stop when it should stop but without dispatching the COMPLETE event when a top level bone Frame scale is higher than 100%.

I didn't try with a bone attached to another one yet.

Bug with _global variable on DBObject class

Hi,
on DBObject.as ( / dragonBones / core / ) line 182 -183 and 188-189
else
{
_global.skewX = _origin.skewX + _offset.skewX + _tween.skewX + _parent._global.skewX;
_global.skewY = _origin.skewY + _offset.skewY + _tween.skewY + _parent._global.skewY;
}
if(_parent.scaleMode >= _scaleType)
{
_global.scaleX *= _parent._global.scaleX;
_global.scaleY *= _parent._global.scaleY;
}

Eclipse gives me an error on parent._global because _global is protected and not public.
There is a get function for _global so I think the right code should be parent.global and not parent._global.

Am I right? Tks. ^_^

Layering problems

Hi, not sure if this is a known issue or not but thought I'd report it anyway.
I frequently see errors in the depth sorting of body parts in my dragonbones animations.
For example, I'm currently working on an animation of a chicken. I have a timeline animation of the chicken with two behaviours - 'chicken_idle' and 'chicken_lay'. The chicken consists of various timeline layers, including head, beak, body and legs.
When I run the idle state all is fine. But when I run the 'chicken_lay' behaviour, all of a sudden the chickens legs are displayed in front of its body for a frame or two, for no apparent reason. Checking back at the timeline I can see clearly that the leg layer is always behind the body layer, in fact there are no keyframes in the leg animation, they are static.
If you like I could send you the .fla to check out.

cheers,
Alex

感谢你们的杰作;同时请问1.3的问题.

DragonBonesTeam:

你们好!我最近使用了DragonBones1.4的版本,按照教程安装并学习demo。感觉很流畅和稳定。先感谢你们的工作和慷慨的分享。
我目前使用 "Flash2Cocos2d-x" 来应用到cocos2d-x上面;但"Flash2Cocos2d-x" 目前仅仅更新到支持DragonBones 之前的1.3版本。不过我好像没有找到githubDragonBones对应的1.3版本下载连接。我应该怎么找到1.3的下载,或者可以给我发一份1.3的吗?[email protected] .谢谢。

Use time in seconds instead of frames (time passed to update method)

I think it would be better to have a time passed to update method (would be better compatible with Starling IAnimatable interface and also is better for more control over an animation. Time scale would be preserved and be multiplied by passed time (both for Armature and Bone)

I'm using entity system framework (Ash). Whole thing is based on iterating over systems calling update with time parameter on them. Additionally Starling is also based on passing time to it's update (advanceTime) method. I also use the same time based animation workflow on DisplayList.

So I think it would be a good thing to have that. I'm aware that also Design Panel is affected by that request and using frames (integers) is more convenient.

Any thoughts?

Strange short life variables section in BaseFactory

Diving through the code of the factories i noticed this part of code that is not clear if something is actually done or not... lines 327:331 of BaseFactory seems to declare variables that are left out of scope rapidly afterwards...

var armatureDataCopy:ArmatureData = data.getArmatureData(animationName);
if(armatureDataCopy)
{
var skinDataCopy:SkinData = armatureDataCopy.getSkinData("");
}

Custom TextureAtlas and SkeletonData

How I can create StarlingFactory using by my own texture and XML data for the skeleton? This is possible??? What I want to do: I would have control over texture (size HD/SD or included in other atlas) and XML data. Extension for IDE create ZIP file with this datas so why we cannot use it to create factory? or me this is very important case, I do not want have assets in different places (one with regulara texures, another for animation created by DragonBones).
DragonBones is a perfect utility for Starling developers anyway (even without animation) , great job!

请问一个关于stop简单的问题

请问一个关于stop的简单问题,我咋个才能把动画停在我指定的位置,例如:stop("stand"),或者是stop("walk")之类?

关于DragonBones2.2的问题

您好,关于DragonBones2.2,由于你们在所有的关键帧都加上补间,我修改源码,让他默认不加补间,根据时间轴是否存在补间来判定是否有补间。但是这样就出现一个问题,当flash时间轴上面有空白关键帧,动画就是有轻微抖动(猜测从关键帧和空白帧 之间切换导致抖动),如果加上补间就不会抖动。

DragonBones这个框架是不是关键帧必须加补间?我想您原来肯定也考虑到这个问题,完全兼容flash,先天不足??希望得到您们的肯定回答,非常感谢,谢谢!!!

Looping animation does't loop properly in my application

Hello,

We are using DragonBones for a Game that we have in development. In testing them as separate elements out side of the game they work well, but now that I am integrating DragonBones characters into the game engine their animations are not looping. The game is built using Starling 1.2 and the latest version of StarlingMVC. When I add in the characters they usually animate once and then stop, but sometimes they don't animate at all. The game is set to 60 fps and the files were setup in Flash pro CS6 and look good when exported using the Skeleton Design tool.

If I put an event listener on the armature for "movementComplete" I can see that as soon as the animation stops the event fires. When I do the same thing in a simple starling only example it works fine, the animation loops and the "movementComplete" event does not fire, which is what I would expect. On my in game version I also tried calling goToPlay again on the same animation after the "movementComplete" event fires and it plays one frame or so and then stops and fires the complete event again but doesn't go thru the full amount of animation. Non looping animations work ok but I have to use armature.animation.timeScale to get them to play at a slower frame otherwise they play too fast.

My feeling is that StarlingMVC is interfering with something but I haven't been able to find the exact issue yet. Do you have any thoughts on what might cause this type of problem?

Frame Skip?

Hi

i would like to know if you have plans for frame skipping when the machine can't handle the desired framerate.

something like armature.update(deltaTime)

thanks!

有计划把这个移植到cocos2d-x平台吗

DragonBones确实是一个非常好用的工具!
不知道你们有计划把这个移植到cocos2d-x平台吗?
现在这个平台已有的插件明显没你们的好用.
谢谢.

Support for alpha channel

A lot of animations have an alpha channel in them, so please add support for it both in DesignPanel and here

Nape/dragonBones Issues - not sure if issue or Inexperience

I've made a repo with all files, it is a modification of the Cyborg demo. I've changed the art work and added nape physics to everything i could, What I'm having trouble with is. I cannot assign an individual bone with that bones gfx to a nape body, nor can i get proper animation once the nape body is being moved. what im currently doing now is very effective and efficient (I have a rect around the entire armature) but im looking for far more precision. for every dragonBone a nape body. that way i can animate per leg dependent on how high or lower the terrain is.

You can see the current demo at
http://paraboliclabs.byethost31.com/

github link
https://github.com/kgbkgb/NapeNdragonBones

Improportionate scale..!

I wish to scale my assets improportionally. Instead of using factory.scaleForTexture I would rather use something like factory.scaleForTexture(wScale, hScale);

Wrong pivots in StarlingFactory.generateDisplay

If starling TextureAtlas is using and subtextures has frameX and frameY, pivots are growing and animation became bad. if I comment block
if(subTextureFrame){
pivotX += subTextureFrame.x;
pivotY += subTextureFrame.y;
}
everything works well

Improportionate scale..! (Perhaps vector to raster?)

Ok since flash sprites are already Vectors, why don't you guys take advantage of that and just create the correct size Texture Atlas during runtime, depending on the width and height the user provides you (which might be different from device to device?)
Pretty much what DMT does for static sprites. Its open source and you can perhaps borrow some code, Gil has done a fantastic job on it.

It would be great if it worked like this:
var factory:StarlingFactory = new StarlingFactory();
factory.parseData(loader.content, screenWidth, screenHeight); //create the correct size Texture atlas during RunTime like Dmt does.

BlendMode not work with DragonBones 2.4.1

Set armature.display.blendMode to any mode like BlendMode.SCREEN not work when using 2.4.1

Solution is here:

In DragonBones 2.4.1 XMLDataParser.as(line 178) and ObjectDataParser.as(line 147):

Change
slotData.blendMode = "normal";
to
slotData.blendMode = "auto";

Because "auto" mode inherits the blend mode from parent while "normal" mode not.

DragonBones2.2空白帧问题

请问DragonBones是否空白帧的存在,譬如一段动画里某层元件可能只是在中间断断续续出现几次,这段动画的开头、非空白帧中间以及最后这些位置能否有空白帧?
image

你好,请教个“上下帧切换不同元件失败”的问题。

我目前用开1.3的dragonbones 的flash面板插件。当flash做的动画中有“上下帧切换不同元件”时,在插件面板上看到的动画会出现“元件丢失,位置偏移”等问题。请问,是不是1.3还不支持类似“上下帧切换不同元件”的功能?

SecurityError: Error #2148

Hello,

I'm using DragonBones 2.4.1

When I start my swf with Flash Player standalone 12 I got this error:

SecurityError: Error #2148: SWF file file:///C|/Users/bert/Dropbox/bin%20%281%29/ZombieDoorsWeb.swf cannot access local resource file:///C|/Users/bert/Dropbox/bin%20%281%29/ZombieDoorsWeb.swf/[[DYNAMIC]]/2. Only local-with-filesystem and trusted local SWF files may access local resources.
at flash.display::LoaderInfo/get content()
at dragonBones.factorys::BaseFactory/loaderCompleteHandler()[/Users/Benoit/Dropbox/ZombieDoors/lib/Citrus-Engine/srclib/dragonBones/factorys/BaseFactory.as:479]

Any help?

Thanks.

Other frameworks

Hi guys,
Is there any chance to use this lib with other 2d frameworks (except Starling)?

Thanks

Code supporting "fade" functionality incurs significant performance burden even when fadeTime = 0

I was running a performance comparison between DragonBonesAS and flump by converting the same flash animation to both systems and running the Adobe Scout over a test harness running 100 instances of the animation, once with DragonBonesAS and once with flump.

flump was outperforming DragonBonesAS, so I took a deeper look into the data and found that the reason is that DragonBones incurs a large cost by always "fading out" AnimationStates to remove them, even if the fadeTime is 0.

As a test, I wrote a wrapper that simply directly called Animation.removeState whenever the fadeTime to fadeOut is 0, as well as a minor shortcut for fadeIn, again when the fadeTime is 0. The result was an improvement in performance of 15% with my test object and an improved and more stable garbage collection profile.


Data description: My DragonBones animation includes nested armatures, and including one instance of a "flipbook" like layer which switches between different images.


I am happy to prepare a pull request with a clean implementation of this optimization, but I have a question to ask before doing so: Is it desirable that AnimationEvent.FADE_IN_COMPLETE and AnimationEvent.FADE_OUT_COMPLETE fire when there is in fact no fading (fadeTime = 0)? It is my opinion that this is undesirable. That said, changing this would represent a change from the current behavior, so I am happy keep it or change it as you prefer.

Looking forward to your reply.
Ken

Incorrect first frame

Whenever I load a DragonBones item and add it to the Starling display list, the first frame is displayed as a jumbled mess of bones in all the wrong place. Normally this is only shown for a split second, as once the animation starts playing all the positions get corrected. But now I have an animation that is supposed to stay on the first frame until I tell it to play, and I have found that it stays in this incorrect 'jumbled' state. Unfortunately there is no 'gotoAndStop' method, otherwise I would try sending it to frame 2 and back again or something to see if that fixed it. The only control I have is to play or stop the animation.

The bones should go to arrangement for the first frame of the first animation by default.
I'm using DragonBones 1.5 with Starling 1.3.
cheers,
Alex

Workflow for changing armature size?

We've recently had an issue where we generated an animation at a scale too large for our game. However, in order to scale it down, we've had to regenerate spritesheet using smaller scale armature PSD and then re-animating the new smaller armature.

Is there any way to set the resolution of an armature when importing that movie clip? I've experimented with a lower resolution for the import settings but it doesn't seem to affect the sprite sheet (just the maximum bounds).

It would be super cool if there were a way to define the scale of an armature prior to its bitmap generation for the sprite sheet.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.