Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

logo

MIT License PyPI Latest Release en Documentation Status

> English < | 简体中文

Introduction

JAnim is built around the core concept of programmatic animation to create precise and smooth animations. It supports real-time editing, live preview, and a wide range of other rich features.

Inspired by manim.

Introduction video: https://www.bilibili.com/video/BV17s42137SJ/

Examples

Highlights

Programmatic animation

class BubbleSort(Timeline):
    def construct(self):
        # define items
        heights = np.linspace(1.0, 6.0, 5)
        np.random.seed(123456)
        np.random.shuffle(heights)
        rects = [
            Rect(1, height,
                 fill_alpha=0.5)
            for height in heights
        ]

        group = Group(*rects)
        group.points.arrange(aligned_edge=DOWN)

        # do animations
        self.show(group)

        for i in range(len(heights) - 1, 0, -1):
            for j in range(i):
                rect1, rect2 = rects[j], rects[j + 1]

                self.play(
                    rect1.anim.color.set(BLUE),
                    rect2.anim.color.set(BLUE),
                    duration=0.15
                )

                if heights[j] > heights[j + 1]:
                    x1 = rect1.points.box.x
                    x2 = rect2.points.box.x

                    self.play(
                        rect1.anim.points.set_x(x2),
                        rect2.anim.points.set_x(x1),
                        duration=0.3
                    )

                    heights[[j, j + 1]] = heights[[j + 1, j]]
                    rects[j], rects[j + 1] = rect2, rect1

                self.play(
                    rect1.anim.color.set(WHITE),
                    rect2.anim.color.set(WHITE),
                    duration=0.15
                )

Change the code, refresh right away

Freely control the preview progress

Installation

JAnim runs on Python 3.12+

You may install JAnim directly via

pip install janim

to install the latest version distributed on PyPI.

To install the latest development version directly from the main branch without cloning the repository, you can run:

pip install git+https://github.com/jkjkil4/JAnim.git@main

Or, to catch up with the latest development and edit the source code, you may clone this repository and install it in editable mode:

git clone https://github.com/jkjkil4/JAnim.git
cd JAnim
pip install -e .

Using JAnim

You can run the following command to see examples.

janim examples

The Documentation provides a more detailed guide on installing and using JAnim. (Note: You can change the documentation language using the flyout menu at the corner of the page.)

License

MIT license

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

janim-5.0.0a3.tar.gz (402.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

janim-5.0.0a3-py3-none-any.whl (541.0 kB view details)

Uploaded Python 3

File details

Details for the file janim-5.0.0a3.tar.gz.

File metadata

  • Download URL: janim-5.0.0a3.tar.gz
  • Upload date:
  • Size: 402.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.34.2

File hashes

Hashes for janim-5.0.0a3.tar.gz
Algorithm Hash digest
SHA256 acbe6e84a4f5c2ea0828a38e69d11d4fbd9aa34f303a5810c989418594d9dc7c
MD5 1dd76ae1b034cf8f4adbb0ee6707791f
BLAKE2b-256 32c5c1e08adc2d531ef5a1541773402f7ee0d1745fe5d96c9acfb275e82fcd03

See more details on using hashes here.

File details

Details for the file janim-5.0.0a3-py3-none-any.whl.

File metadata

  • Download URL: janim-5.0.0a3-py3-none-any.whl
  • Upload date:
  • Size: 541.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.34.2

File hashes

Hashes for janim-5.0.0a3-py3-none-any.whl
Algorithm Hash digest
SHA256 1d265ea976a13527284465e4d9b649c876d079eff67f071cecac6dfb8e88a181
MD5 59ffab9e8bd85228b4eef7b8de892428
BLAKE2b-256 d91bc0686475c7b8d6c4f80f551a4a5608eeeb4f0b11ea8fb862d5a537b53e86

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

5.0.0a3 This release

2 files

4.4.2

2 files

4.4.1

2 files

4.4.0

2 files

4.3.0

2 files

4.2.0

2 files

4.1.0

2 files

4.0.0

2 files

3.10.2

2 files

3.10.1

2 files

3.10.0

2 files

3.9.2

2 files

3.9.1

2 files

3.9.0

2 files

3.8.1

2 files

3.8.0

2 files

3.7.0

2 files

3.6.0

2 files

3.5.0

2 files

3.4.0

2 files

3.3.0

2 files

3.2.1

2 files

3.2.0

2 files

3.1.0

2 files

3.0.1

2 files

3.0.0

2 files

2.3.0

2 files

2.2.0

2 files

2.1.0

2 files

2.0.0

2 files

1.9.2

2 files

1.9.1

2 files

1.9.0

2 files

1.8.0

2 files

1.7.0

2 files

1.6.0

2 files

1.5.1

2 files

1.5.0

2 files

1.4.3

2 files

1.4.2

2 files

1.4.1

2 files

1.4.0

2 files

1.3.0

2 files

1.2.2

2 files

1.2.1

2 files

1.2.0

2 files

1.1.0

2 files

1.0.4

2 files

1.0.3

2 files

1.0.2

2 files

1.0.1

2 files

1.0.0

2 files

0.5.2

2 files

0.5.0

2 files

0.4.0

2 files

0.3.1

2 files

0.3.0

2 files

0.2.0

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page