Giter Site home page Giter Site logo

createjs / zoe Goto Github PK

View Code? Open in Web Editor NEW
328.0 42.0 101.0 799 KB

Zoë is an open source tool for generating spritesheet images and frame data from SWF files. It enables illustrators to maintain a familiar workflow while generating animations for EaselJS and other formats.

Shell 1.27% ActionScript 89.31% CSS 9.42%

zoe's Introduction

Zoë

Zoë is an open source tool for generating spritesheet images and frame data from SWF files.

The source code is licensed under the MIT public license.

If you just want to use Zoë, the latest stable .air installer can be found on the Zoë website.

Using

Zoë is designed to work with any AS3 SWF file version 9 or greater. It's best practice to have all your animations on the root timeline, and use labels to identify your different animations or frames. To begin, simply drag a swf file into Zoë, and click Export to create a SpriteSheet.

Zoë and Easel support custom registration points on images. To define one, simply place an empty clip on your timeline labeled registrationPoint. If needed, you can also define multiple points per file.

Building

Command line (Recommended)

FlexBuilder

  • You can also build using Flex Builder by checking out the repo a creating a new Flex AIR/MXML project, and use this repo as your project root.

Support

You can ask questions and interact with other users at our Community site.

zoe's People

Contributors

gskinner avatar wdamien 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

zoe's Issues

Compare frames based on bounds as well.

Zoe uses the origin to compare frames to one another for frame reuse. This makes the most sense in a variety of cases, but it means it fails to reuse frames when the only change is a graphic translating (x,y). For example, an animation of a bouncing ball could be reduced to a single image frame, and a series of frame definitions with varying regY.

It would be nice if Zoe could also check for frame similarities based on the bounds of each frame (possibly aligning from the center, to reduce the impact of antialiasing). It would double the performance cost, but would likely be worth it.

See also:
http://community.createjs.com/discussions/zoe/115-when-variable-frames-and-reuse-frames-are-used-at-the-same-time-zoe-doesnt-provide-a-correct-output-for-the-frames-arrwy

CaptureSWF.as buildJSON() 4th index parameter seems to use keyframe index with "ExportType.IMAGE_FRAME" and "ReuseFrames" checked.

If i select Image frames (ie. non-spritesheet) from the dropdown and check "reuse-frames" and "variable frame". somehow, the 4th index parameter (the one linking to the sheet index), doesn't link to the correct sheet index but uses it's starting keyframe index instead. Is this a bug with some older version? Because in https://github.com/CreateJS/Zoe/blob/master/src/com/gskinner/zoe/utils/CaptureSWF.as under line 806, it seems correct where it's using the "i" incrementing index parameter for the sprite sheet index.. ie. frames.push([0,0,rect.width, rect.height,i,ox,oy]);

Feature request: exclude animations on export

Was wondering if it would be possible to add a multi-select combo box or some equivalent UI control so that I can select which animations to include when exporting from Zoe.

I'm working on a game project, and for certain optimization reasons, I don't always want every animation from my swf exported to the spritesheet+json. Right now, I've got to manually remove frames from my fla but it would be nice if Zoe could do it for me. This feature would really speed up the workflow between myself and the artists I'm working with. I suspect it would be helpful to others as well.

registrationPoint clip is still visible

Would it be an idea to hide the registrationPoint clip from exporting? This way you can include graphics to align (cross) at author time in Flash which make it easier to align stuff.

0x0 bug in export format when variable frame option checked

If the animation you're exporting from Zoe happens to have a completely blank frame and the variable frame option is checked, Zoe ends up exporting the width and height both as 0. This is causing IE and Firefox to throw an exception repeatedly in Sprite.draw() when drawImage() is called.

"Index or size is negative or greater than the allowed amount"

Not sure if this is something easelJS should be checking for and just not call draw() if the frame dimensions are 0x0 or if Zoe should handle this somehow with its exported JSON (like pointing to a transparent 1x1 pixel in the sprite sheet or something).

On export registration point values are always (0, 0) if the registration point is (0, 0)

I would like to reopen the following issue:
#6
Not adding a registrationPoint clip on the stage is the same as adding it in (0, 0).
This was never the problem. The problem is that in this case the registrationPoint concept is not neglected, but destroyed. You can perform any test setting the registrationPoint to (0, 0) and then to (1, 1). You should expect to see little difference, but instead the result is useless.

Exporting omits offset

Since version 3.0 the exporting misses the offset values. I need those to properly render an animation with the trimmed frames.

Zoe 2.0

 "frames": [
        [556, 0, 175, 194, 0, -5, -94],
        [381, 0, 175, 196, 0, -5, -91],
        [900, 547, 177, 143, 0, -4, -147],
        [539, 547, 179, 145, 0, -4, -145],

Zoe 3.0+

 "frames": [
        [1109, 382, 183, 156, 0, 0, 0],
        [741, 382, 183, 159, 0, 0, 0],
        [370, 382, 185, 162, 0, 0, 0],
        [0, 382, 184, 165, 0, 0, 0],

capture frames on EXIT_FRAME instead of ENTER_FRAME

I have a swf of a game character and it has some timeline code to color certain features of the character. I want to use Zoe to export spritesheets of that character in several different color combinations simply by changing some initial variables.

I'm getting mixed results. The spritesheet that Zoe generates does not always color every feature on every frame.

My thought was to change the CaptureSWF util class to run on EXIT_FRAME instead of ENTER_FRAME so that each frame's scripts would have a chance to run.

I could be wrong though, a render may not have occurred at that point. Any thoughts on this? Is what I want to achieve beyond the scope of Zoe?

Frames missing in complex JSON

Greetings,

When selecting either "Variable Frame" or "Reuse Frames", the exported JSON seems to missing frames.
I made a simple example where frame 1 has the label "first" and frame 6 has the label "second". Each frame contains a text field with the frame number in it.
Looking at the png, all frames are rendered, but the json for "animations" looks like this when using complex mode (either "Variable Frame or "reuse Frames" selected):

"animations": {"first": {"frames": [0, 1, 2, 3]}, "second": {"frames": [5, 6, 7, 8, 9]}}

Disabling complex mode the same swf gives the following value for "animations":

"animations": {"first": [0, 4], "second": [5, 10]}

What happened to frames 4 and 10 in complex mode?

I tried with different swf's, and the issue seems to always happens in complex mode, but if you want to have a look at an example fla, let me know where you like me to send it to.

Many thanks,
Leo

Executables.

Right now the CreateJS site links to an AIR file. It's likely better, moving forward to package Zoe up as a self contained app.

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.