All Projects β†’ HaikuTeam β†’ Core

HaikuTeam / Core

Licence: other
🍚 Interactive UI animation engine for the Web. Core renderer for Haiku Animator.

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Core

Wheelnav
Animated wheel navigation JavaScript library based on RaphaΓ«l.js (SVG/VML). It can be a pie menu (radial menu, circular menu) and many more.
Stars: ✭ 661 (-10.43%)
Mutual labels:  svg
Leanify
lightweight lossless file minifier/optimizer
Stars: ✭ 694 (-5.96%)
Mutual labels:  svg
Text To Svg
Convert text to SVG path without native dependence.
Stars: ✭ 723 (-2.03%)
Mutual labels:  svg
Payment Icons
πŸ’³ Payment / Ecommerce related svg icon packs
Stars: ✭ 671 (-9.08%)
Mutual labels:  svg
Php Qrcode
A QR Code generator for PHP7.4+
Stars: ✭ 685 (-7.18%)
Mutual labels:  svg
Ngx Graph
Graph visualization library for angular
Stars: ✭ 704 (-4.61%)
Mutual labels:  svg
Url Encoder
πŸ›Έ Url-encoder, useful for SVG
Stars: ✭ 650 (-11.92%)
Mutual labels:  svg
Svgexport
SVG to PNG/JPEG command-line tool and Node.js module
Stars: ✭ 731 (-0.95%)
Mutual labels:  svg
React Native Qrcode Svg
A QR Code generator for React Native based on react-native-svg and node-qrcode.
Stars: ✭ 693 (-6.1%)
Mutual labels:  svg
Bounty
Javascript and SVG odometer effect library with motion blur
Stars: ✭ 724 (-1.9%)
Mutual labels:  svg
Cssfx
✨ Beautifully simple click-to-copy CSS effects
Stars: ✭ 5,758 (+680.22%)
Mutual labels:  svg
Svg
Fork of the ms svg library (http://svg.codeplex.com/)
Stars: ✭ 676 (-8.4%)
Mutual labels:  svg
React Native Circular Slider
React Native component for creating circular slider πŸ”˜
Stars: ✭ 716 (-2.98%)
Mutual labels:  svg
Linuxtimeline
Linux Distributions Timeline
Stars: ✭ 662 (-10.3%)
Mutual labels:  svg
Angular Svg Round Progressbar
Angular module that uses SVG to create a circular progressbar
Stars: ✭ 726 (-1.63%)
Mutual labels:  svg
Macaw
Powerful and easy-to-use vector graphics Swift library with SVG support
Stars: ✭ 5,756 (+679.95%)
Mutual labels:  svg
Itext7 Dotnet
iText 7 for .NET is the .NET version of the iText 7 library, formerly known as iTextSharp, which it replaces. iText 7 represents the next level of SDKs for developers that want to take advantage of the benefits PDF can bring. Equipped with a better document engine, high and low-level programming capabilities and the ability to create, edit and enhance PDF documents, iText 7 can be a boon to nearly every workflow.
Stars: ✭ 698 (-5.42%)
Mutual labels:  svg
Js Code To Svg Flowchart
js2flowchart - a visualization library to convert any JavaScript code into beautiful SVG flowchart. Learn other’s code. Design your code. Refactor code. Document code. Explain code.
Stars: ✭ 6,290 (+752.3%)
Mutual labels:  svg
Vue Content Loading
Vue component to easily build (or use presets) SVG loading cards Facebook like.
Stars: ✭ 729 (-1.22%)
Mutual labels:  svg
Nuxt Optimized Images
πŸŒ…πŸš€ Automatically optimizes images used in Nuxt.js projects (JPEG, PNG, SVG, WebP and GIF).
Stars: ✭ 717 (-2.85%)
Mutual labels:  svg

Animator Core

NPM

Animator Core is the runtime and rendering engine for Haiku Animator and the components you create with Animator. This engine is a dependency for any Haiku Animator components that are run on the web.

Note that for iOS and Android, Haiku Animator also supports exporting to Lottie. Animator Core is only used when rendering Animator components for the web.




Compatible with modern browsers


Animator Core is compatible with all major modern web browsers: Firefox, Chrome, Safari, and Edge. Its footprint is ~50kB gzipped.



Hackable + compatible with existing codebases

Animator Core provides a simple and familiar API for runtime manipulation of components that were built in Animator. You can play and pause animations, react to events, and even pass in dynamic data. (See the docs for more info.)


Getting started

Creating an Animator component begins in Haiku Animator:

  1. Design a component in Animator β€” or ask your designer for a component's Animator share URL
  2. Install the Haiku CLI: $ yarn global add @haiku/cli or $ npm i @haiku/cli --global
  3. Add that component to an existing React or web codebase: $ haiku install @haiku/yourusername-yourcomponent
  4. Seamlessly update the component as its design changes: $ haiku upgrade [projectname] [--version=rev]

Dev tip: If you have Animator installed, you can also $ npm link or $ yarn link your Animator components to make them available to your codebase toolchain's hot reloading hooks. Animator projects live in ~/.haiku/projects.


Direct installation

If you want to install and develop with Animator Core directly, you can do so with:

$ npm install @haiku/core

Or via yarn:

$ yarn add @haiku/core

Animator Core is also available via Haiku's CDN:

<!-- specific version -->
<script src="https://code.haiku.ai/scripts/core/HaikuCore.VERSION.js"></script>

API / Docs

For our full documentation (a work in progress), please see docs.haikuforteams.com. We welcome your contributions on Github.


Usage examples

Simple:

import AnimatorCore from "@haiku/core/dom";
const definition = {template: {elementName: 'div', children: ['Hello Animator!']}};
const factory = AnimatorCore(definition);
const component = factory(document.getElementById("mount"));

Animated:

import AnimatorCore from "@haiku/core/dom";
const definition = {
  timelines: {
    Default: {
      "#box": {
        "style.width": { 0: { value: "100px" }},
        "style.height": { 0: { value: "100px" }},
        "style.backgroundColor": { 0: { value: "red" }},
        "rotation.z": {
          0: { value: 0, curve: "linear" },
          1000: { value: 3.14159 },
        },
      },
    },
  },
  template: {
    elementName: 'div',
    attributes: {id: 'box'},
    children: ['Hello Animation!'],
  },
};
const factory = AnimatorCore(definition);
const component = factory(document.getElementById("mount"));

Interactive:

import AnimatorCore from "@haiku/core/dom";
const definition = {
  options: {
    autoplay: false,
  },
  states: {
    clicks: {
      value: 0,
    },
  },
  eventHandlers: {
    "#box": {
      "click": {
        handler: function () {
          this.state.clicks += 1;
          this.getTimeline("Default").play();
        },
      },
    },
  },
  timelines: {
    Default: {
      "#box": {
        "content": { 0: {
          value: function (clicks) {
            return clicks + "";
          },
        }},
        "style.width": { 0: { value: "100px" }},
        "style.height": { 0: { value: "100px" }},
        "style.backgroundColor": { 0: { value: "red" }},
        "rotation.z": {
          0: { value: 0, curve: "linear" },
          1000: { value: 3.14159 },
        },
      },
    },
  },
  template: {
    elementName: 'div',
    attributes: {id: 'box'},
  },
};
const factory = AnimatorCore(definition);
const component = factory(document.getElementById("mount"));

Tracking / Analytics

By default, Haiku tracks usage of published components by transmitting metadata to Haiku's Mixpanel account when components are initialized on the page. We send only public information: your component's name, its Haiku account username, the software version it was built with, and its share identifier.

To disable this, set the mixpanel option to false:

// ...
const factory = AnimatorCore(definition);
const component = factory(document.getElementById("mount"), {
  mixpanel: false // Or the string of your own Mixpanel API token
})

Bugs / Feature Requests / Troubleshooting

Please use GitHub Issues.


Contributing

Please send contributions via pull request.


Roadmap

Code improvements

  • Use arrow functions throughout (in progress!)
  • Improve test coverage
  • Inline source code docs
  • Types

Features

  • Alternative component formats
  • Improved Lottie integration
  • More comprehensive programmatic API

Development

To develop Animator Core locally:

  1. Fork the repo
  2. $ yarn install

Compile with:

$ yarn compile

Test with:

$ yarn test

Find formatting problems with:

$ yarn lint

Run demos in your browser:

$ yarn demos

License / Copyright

MIT. Please refer to LICENSE.txt. Copyright (c) 2016-2018 Haiku Systems Inc.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].