Skip to content

A simple tool to convert Unity .anim AnimationClips to Three.JS AnimationClips.

License

Notifications You must be signed in to change notification settings

spdv123/Anim2JS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Mar 8, 2019
89e218f · Mar 8, 2019

History

4 Commits
Mar 8, 2019
Mar 8, 2019
Mar 8, 2019
Mar 8, 2019
Mar 8, 2019
Mar 8, 2019

Repository files navigation

Anim2JS

A simple tool to convert Unity .anim AnimationClips to Three.JS AnimationClips.

After converted, you can use them like below

THREE.AnimationClip.parse(anim_AnimationClipName())

in your JS script.

Usage

From command line:

$ python anim2js.py
Usage: anim2js.py [options] AnimationClipFile1.anim [AnimationClipFile2.anim [...]]
A simple tool to convert Unity .anim AnimationClips to Three.JS
AnimationClips. After converted, you can use them like
"THREE.AnimationClip.parse(anim_AnimationClipName())" in your JS script.

Options:
    -h, --help            show this help message and exit
    -o OUT_FILE, --outfile=OUT_FILE
                    where to save the generated .js
    -p PREFIX, --prefix=PREFIX
                    prefix of JS function to get the AnimationClip,
                    default value is "anim_"

Example

Convert Hello001.anim and Hello002.anim to hello.js

python anim2js.py examples/Hello001.anim examples/Hello002.anim -o hello.js

And after import hello.js you can use them as below

var clip_hello001 = THREE.AnimationClip.parse(anim_Hello001())
var clip_hello002 = THREE.AnimationClip.parse(anim_Hello002())

Requirements

ruamel.yaml

install them via

pip install ruamel.yaml

License

LGPL v3.0

About

A simple tool to convert Unity .anim AnimationClips to Three.JS AnimationClips.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages