npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

codecombat-adobe-animate-parser

v0.0.4

Published

Parses CreateJS based Adobe Animate Files

Downloads

6

Readme

Main Goal:

  • Import the shape raw data from an animate js.
  • We seem to have most or all of the data. Now it's an organization and cleanup question.

Subtasks: [x] Monkey patch createjs apis (see them execute) [x] How are shapes referenced in raw data [x] Animations are referenced and can be nested. [x] We can expose lib from an mutation (composition).

Preformatting steps for animate JS file:

  1. Remove self executing function and export as default
  2. Replace all references to createjs with cjs
  3. Replace all AdobeAn references with an

Entry point

There is only ever 1 animation. It is the name of the file and it's attached to lib as a MovieClip.

To get the lib.<filename>, return it from the an.compositions. The id corresponds to the lib.properties.id.

Next steps:

  • Access lib from the an file.
  • Private animation names don't matter.
  • Start fleshing out a parse method that is wired to the tests.
  • Hard to test Animate against Flash because Containers are replaced with Animations.

The relationships of Movieclips, Tweens, Containers, Shapes.

A Movieclip (animation) is comprised of: Any number of movieclips, containers or shapes being tweened. Has a bounding box and frame bounds.

From a coding perspective. We start with a root movieclip. It contains tweens of shapes/movieclips, and instantiates them.

Then you can recursively walk these shapes/movieclips.

A container

  • Grouping around movieclips, containers and shapes.

A shape

  • Base case - Path and fill and other shape vector properties.

A tween:

  • Andrew believes is only ever in a movieclip.
  • Moves a shape, container or movieclip.

Know issues

Raw shapes don't work correctly in our engine. They work when you import. But they stop working via an Action referencing an Animation.

Thoughts going forward:

  • Is wrapping a shape in a container an easy fix?

  • [YES] Is our game engine fundamentally broken for frame by frame animation.

  • [NO] What if the shape in the animate file is grouped before being tweened?

    • Andrew checked. Even if you group shapes. Animate unwraps them.

NEXT STEPS:

  • [x] NOT DOING - Add CONTAINERS extension
  • [ ] named items
  • [ ] Deterministic imports of IDs for color tintings
  • [ ] Can we automatically determine entrypoint?
  • [ ] Deduping shapes