MCPcopy Index your code
hub / github.com/HaikuTeam/animator

github.com/HaikuTeam/animator @5.1.2 sqlite

repository ↗ · DeepWiki ↗ · release 5.1.2 ↗
5,365 symbols 14,668 edges 2,319 files 493 documented · 9%
README

Haiku Animator

Haiku Animator is a design tool for creating Lottie animations and interactive web components. Animator was developed commercially for several years under Haiku Systems Inc., a software startup based in San Francisco, California with a team spread across the world.

Some features: - Free-transform canvas for visual vector editing - Timeline for per-property keyframe animations - Vector asset-linking from Figma, Illustrator, or Sketch - Expression editor for spreadsheet-like property formulas - Code editors for element actions & raw project source code

This code was open-sourced in August 2021 when Haiku shut down the commercial collaboration/storage services connected to Haiku Animator. Previously available features like publishing & sharing links have been removed.

As of open-sourcing, Haiku Animator has many active users across segments like education, creative studios, and enterprise motion design teams. Many people use it for its ability to create Lottie animations (as an alternative to Adobe After Effects.)

Our hope is that open-sourcing Haiku Animator allows it to be even more useful, to more people (it's free), for longer (FOSS).

Read more at https://www.haikuanimator.com/

Haiku Animator is an Electron-based desktop app with working builds for macOS and Windows. Some features: - Exports Lottie animations, GIFs, and videos - Edit vectors visually on a free-transform canvas - Animate with a visual timeline and per-property keyframes - Link vector assets from Figma, Illustrator, or Sketch - Make any property dynamic with Expressions, spreadsheet-like property formulas - Edit element actions (like click handlers) with code

Screenshot of Haiku Animator animating its own logo

This code was open-sourced in August 2021 when Haiku shut down the commercial collaboration/storage services connected to Haiku Animator. Previously available features like publishing, forking, and link-sharing have been removed.

As of open-sourcing, Haiku Animator is used by folks like enterprise motion design teams, higher education instructors and students, and digital creative studios. Many people use it for its ability to create Lottie animations as an alternative to Adobe After Effects.

Our hope is that open-sourcing Haiku Animator allows it to be even more useful, to more people (it's free), for longer (FOSS).

Installation

Download and install Haiku Animator here: TODO: installation binaries link

Or run from source by following the Development instructions below.

Development

1. Install OS dependencies

It's important to use precise minor version numbers where specified. nodegit/node-gyp build errors are expected if you ignore this.

Mac OS dependencies

1.) nvm:

$ curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.6/install.sh | bash

2.) node 8.15.1:

$ nvm install 8.15.1 && nvm alias default 8.15.1 && nvm use 8.15.1

3.) yarn 1.13.0:

$ curl -o- -L https://yarnpkg.com/install.sh | bash -s -- --version 1.13.0

4.) python 2.7.16 (if you need multiple Python environments on your machine, we recommend pyenv)

5.) libgcrypt (required for nodegit native bindings)

$ brew install libgcrypt

Windows OS dependencies

Assuming a clean Windows 10, open a PowerShell with admin rights:

# Install Chocolatey package manager
Set-ExecutionPolicy Bypass -Scope Process -Force; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))

# Install git
choco install git python2 -y 

# Install nodejs 
choco install nodejs-lts -y --version 8.15.1

# Ignore dependencies to force using specified node version 
choco install yarn -y --version 1.13.0  --ignore-dependencies

# Update PowerShell environment vars
refreshenv

# Install windows build tools (to compile native electron modules, e.g. nodegit)
npm install -g windows-build-tools@2.3.0

In Windows is not possible to login in Figma while running Animator in development. In order to connect with Figma, is needed to set an environment variable called FIGMA_TOKEN with a Figma token as value.

If the app fails to start because of wrong precompiled binaries, try re-building them (can take some time)

yarn electron-rebuild

Linux OS dependencies

TODO

2. Install project dependencies

After you clone the repository, simply run:

$ yarn install && yarn setup

3. Start development server

Assuming you've done the initial setup, you can start all the dev servers with:

$ yarn start

You can also skip the interactive prompt and start with good defaults with:

$ yarn go

You can also set some overriding environment variables (e.g. HAIKU_API) by making a .env file in the mono root. Refer to .env.example for an example.

Watching changes

For the compiler to watch for changes as you develop, run the following command in a separate Terminal tab:

$ yarn watch-all

Before committing

First lint all of the code:

$ yarn lint-all

Then run the unit tests in all of the code:

$ yarn test-all

You might also want to run:

$ yarn compile-all

Assuming no lint errors or test failures, push your changes:

$ git push # and create a pull request

Debugging

There are configurations included here for debugging any of the UI directly from inside VS Code.

You must install the Debugger for Chrome VS Code extension to use these. (cmd + shift + p, "install extensions", "Debugger for Chrome")

To debug, first launch mono normally (see Starting) — then from VS Code's left-side Debug menu, select attach-glass, attach-timeline, or attach-creator. You can then place breakpoints, explore stack traces, explore local values (and more) from inside VS Code.

In general, Plumbing can be debugged on port 9221 and Electron renderer processes can be debugged on port 9222.

Profiling

To add profile to any code, you should call

logger.time('<user defined name>')
<code to be profiled>
logger.timeEnd('<user defined name>')

And it will output

<timestamp>|<process>|info|d=149|<user defined name>

with d being duration between logger.time and logger.timeEnd. To do a subsequent profile with same name, you should call logger.time rearm again.

Contributing

Create a PR, file an issue, or join the Slack community with this invite link.

License

Every project you create with Haiku Animator is entirely yours, to license or sell or publish however you'd like.

This project's source code is licensed under AGPL.

Status of this project

This project is open to new maintainers. This codebase isn't perfect. In fact, in its current state it has deep flaws. That said, to a dedicated tinkerer, it has potential. We created it chasing a dream of creative empowerment — we open-source it in hopes of that dream continuing on.

Extension points exported contracts — how you extend this code

ExporterInterface (Interface)
(no doc) [8 implementers]
packages/haiku-formats/src/exporters/index.ts
Glass (Interface)
(no doc) [3 implementers]
packages/haiku-sdk-creator/src/glass/index.ts
IHaikuClock (Interface)
(no doc) [2 implementers]
packages/@haiku/core/src/api/index.ts
Net (Interface)
(no doc) [2 implementers]
packages/haiku-ui-common/typings/electron.d.ts
ProxyDescriptor (Interface)
(no doc)
packages/haiku-common/src/proxies/index.ts
DecomposedMat4 (Interface)
(no doc)
packages/haiku-vendor-legacy/lib/mat4-decompose/index.d.ts
PublicPrivateOptInModalProps (Interface)
(no doc)
packages/haiku-creator/src/react/components/PublicPrivateOptInModal.tsx
InkstoneConfig (Interface)
(no doc)
packages/haiku-admin-cli/src/sdk/admin-sdk.ts

Core symbols most depended-on inside this repo

setState
called by 416
packages/@haiku/core/src/HaikuComponent.ts
error
called by 265
packages/haiku-serialization/src/utils/Logger.js
info
called by 253
packages/haiku-serialization/src/utils/Logger.js
getActiveComponent
called by 234
packages/haiku-timeline/src/components/RowManager.tsx
on
called by 233
packages/haiku-ui-common/typings/electron.d.ts
HaikuDOMAdapter
called by 194
packages/@haiku/core/src/adapters/dom/HaikuDOMAdapter.ts
log
called by 168
packages/haiku-sdk-creator/src/envoy/EnvoyLogger.ts
createElement
called by 146
packages/haiku-ui-common/typings/electron.d.ts

Shape

Method 2,592
Function 1,746
Class 533
Interface 454
Enum 40

Languages

TypeScript100%

Modules by API surface

packages/haiku-ui-common/typings/electron.d.ts499 symbols
packages/haiku-serialization/src/bll/ActiveComponent.js238 symbols
packages/@haiku/core/src/HaikuComponent.ts157 symbols
packages/haiku-serialization/src/bll/Element.js131 symbols
packages/@haiku/core/src/HaikuElement.ts122 symbols
packages/haiku-glass/src/react/Glass.js110 symbols
packages/@haiku/sdk-inkstone/src/index.ts101 symbols
packages/haiku-serialization/src/bll/ElementSelectionProxy.js94 symbols
packages/haiku-serialization/src/bll/Keyframe.js86 symbols
packages/haiku-timeline/src/components/modes/haiku.js85 symbols
packages/haiku-serialization/src/bll/Project.js81 symbols
packages/haiku-serialization/src/bll/Row.js77 symbols

Dependencies from manifests, versioned

@angular/core6.0.9 · 1×
@babel/core7.0.0 · 1×
@babel/generator7.0.0 · 1×
@babel/parser7.0.0 · 1×
@babel/traverse7.0.0 · 1×
@haiku/cli5.1.2 · 1×
@haiku/core5.1.2 · 1×
@haiku/player3.0.4 · 1×
@haiku/sdk-client5.1.2 · 1×
@haiku/sdk-inkstone5.1.2 · 1×
@haiku/taylor-nocon0.0.2 · 1×
@haiku/tina-haikuerror0.0.6 · 1×

For agents

$ claude mcp add animator \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact