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

@akashic-extension/db2asa

v1.0.5

Published

Convert DragonBones for akashic-animation

Downloads

14

Readme

db2asa

DragonBonesで作成したアニメーションをakashic-animation形式にコンバートするコマンドラインツール。

インストール

db2asaNode.js で動作します。以下のコマンドでインストールできます。

$ npm install -g @akashic-extension/db2asa

Akashic Engineの詳細な利用方法については、 公式ページ を参照してください。

使い方

DragonBonesからJSON形式でexportしたファイルを用意してください。Data Version5.0 を選択してください。 Image TypeImagesのみをサポートしています。texturesディレクトリはJSONファイルと同じディレクトリに配置してください。

$ db2asa exported_dragonbones.json

次のファイルが出力されます。

| 拡張子 | | |:------------- | :------------------------------------- | | asapj | プロジェクトファイル | | asabn, asaan | ボーンファイルとアニメーションファイル | | asask | スキンファイル |

オプション

-h, --help

ヘルプを表示します。

-V, --version

バージョンを表示します。

-o, --out-dir

出力先ディレクトリを指定します。存在しない時、ディレクトリを作成します。

-p, --add-prefix

出力ファイルのファイル名に次の接頭辞を加えます。

| ファイル形式 | 接頭辞 | |:------------- |:------------- | | asapj | pj_ | | asabn | bn_ | | asaan | an_ | | asask | sk_ |

-l, --longName

asaanファイル名(アニメーション名が用いられる)の前にそのアニメーションの持ち主であるarmatureの名前が加わります。2つの間は_で区切られます。

-P --set-prefix

-p オプションで出力ファイル名に加わる接頭辞を指定します。asapj,asabn,asask,asaan形式それぞれについて、この並びでカンマ区切りで指定します。デフォルトはpj_,bn_,sk_,an_です。

-v, --verbose

実行時の出力に詳細情報を含めます。

-u, --user-data

Timelineのbone/eventレイヤーのActionをユーザデータとして出力します。次のような構造になります。

{
    "event":"body-event",
    "action":"body-action",
    "sound":"body-sound"
}

-r, --related-file-info

asapjファイルと関連するファイルの一覧をasapjファイルのユーザデータとして出力します。contents.userData.relatedFileInfoプロパティからアクセスできます。

例(contentsプロパティ内の本件と関係のないものは省略):

{
    "version": "2.0.0",
    "contents": {
        "userData": {
            "relatedFileInfo": {
                "boneSetFileNames": [
                    "stickgirl.asabn",
                    "stickman.asabn"
                ],
                "skinFileNames": [
                    "stickgirl.asask",
                    "stickman.asask"
                ],
                "animationFileNames": [
                    "stickgirl_anime_1.asaan",
                    "stickman_anime_1.asaan",
                    "stickman_anime_1_bezier.asaan",
                    "stickman_anime_1_liner.asaan"
                ],
                "imageFileNames": [
                    "stickgirl.png",
                    "stickman.png"
                ]
            }
        }
    }
}

補足

Displayとセルの関係

DragonBonesDisplayakashic-animationCellに変換されます。セル名は次のように決まります。

<Displayの所属するスロット名>_<パスを除いたDisplay名>

headスロットに配置されたparts/eyeディスプレイの場合:

head_eye

制限

以下をサポートしていません。

  • Data Version 5.5 以上のJSONファイル
  • メッシュ
  • 透明度の継承可否設定
  • スロットのカラーアニメーション
  • Export時にatlas化されたテクスチャ
  • skew(せん断)変換行列
  • Displayのスケール成分
  • IKアニメーション
  • 複数のスロット
  • ネストされたarmature
  • event layer(Timelineの一番下)のAction(ユーザデータ)

ライセンス

本リポジトリは MIT License の元で公開されています。 詳しくは LICENSE をご覧ください。

ただし、画像ファイルおよび音声ファイルは CC BY 2.1 JP の元で公開されています。