Giter VIP home page Giter VIP logo

janim's Introduction

logo

MIT License

> English < | 简体中文

Introduction

JAnim is a library for simple animation effects.

Inspired by manim.

Installation

⚠️ JAnim does not work on macOS.

JAnim runs on Python 3.12+ and OpenGL 4.3+.

You may install JAnim directly via

pip install janim

to install the latest version distributed on pypi. Or, to catch up with the latest development and edit the source code, you may clone this repository via

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

Additionally, there are other software dependencies to be installed:

  • To generate video files, install ffmpeg.
  • To use Typst, install typst.

Using JAnim

You can run the following command to see examples.

janim examples

The Tutorial Page of the Documentation provides a brief view to get you started. (Note: You can change the language of the documentation at the bottom-left corner.)

License

MIT license

janim's People

Contributors

jkjkil4 avatar

Stargazers

林择枝 avatar  avatar Octatao Chen avatar Zhang Yang avatar dokee avatar Misaka12843 avatar 黄越 avatar 写代码ing avatar 待星残羽 avatar kanjunzhe avatar 半甜清粥 avatar  avatar Cooper's Figure avatar Bhyin avatar  avatar  avatar lxkghcjt avatar EndZ avatar  avatar  avatar Peng Ding avatar chan avatar Song Siyu avatar PaperCube avatar Alivender avatar bigbigzxl avatar  avatar Yan Fang avatar Aoshine! avatar silvermilight avatar  avatar hahaha avatar AzurIce avatar  avatar  avatar Jie avatar  avatar sui-gu-zhi-chu avatar  avatar MENGBOOO avatar Kanade avatar  avatar gly11 avatar  avatar UnreDEV avatar zhangf avatar NailFec avatar  avatar Esword618 avatar Zhazha_JiaYiZhen avatar  avatar RedJACK avatar nomanker avatar Acbox Liu avatar Chen Wu avatar Kristin Abe avatar Ellu avatar  avatar asyu17 avatar HK-SHAO avatar  avatar Fuwuwuwu avatar LennyChen avatar YuxiaoZhang avatar  avatar Zu Wang avatar  avatar YishiMichael avatar  avatar Eric avatar  avatar  avatar  avatar NqNl avatar  avatar

Watchers

 avatar  avatar

Forkers

mengbooo mu-l srand0

janim's Issues

Failed to construct window after upgrading `pyside6==6.6.1` to `pyside6==6.7.1`

> janim examples
1: HelloJAnimExample
2: SimpleCurveExample
3: TextExample
4: TypstExample
5: AnimatingPiExample
6: NumberPlaneExample
7: UpdaterExample

That module has multiple timelines, which ones would you like to render?
Timeline Name or Number: 1
Traceback (most recent call last):
  File "signature_bootstrap.py", line 77, in bootstrap
  File "signature_bootstrap.py", line 93, in find_incarnated_files
  File "C:\Program Files\Python312\Lib\pathlib.py", line 1162, in __init__
    super().__init__(*args)
  File "C:\Program Files\Python312\Lib\pathlib.py", line 373, in __init__
    raise TypeError(
TypeError: argument should be a str or an os.PathLike object where __fspath__ returns 
a str, not 'NoneType'
Fatal Python error: could not initialize part 2
Python runtime state: initialized

Current thread 0x000058a4 (most recent call first):
  File "<frozen importlib._bootstrap>", line 488 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 1288 in create_module
  File "<frozen importlib._bootstrap>", line 813 in module_from_spec
  File "<frozen importlib._bootstrap>", line 921 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 1331 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1360 in _find_and_load
  File "<frozen importlib._bootstrap>", line 488 in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1415 in _handle_fromlist
  File "C:\Users\jkjki\AppData\Roaming\Python\Python312\site-packages\PySide6\__init__.py", line 64 in _setupQtDirectories
  File "C:\Users\jkjki\AppData\Roaming\Python\Python312\site-packages\PySide6\__init__.py", line 124 in <module>
  File "<frozen importlib._bootstrap>", line 488 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 994 in exec_module
  File "<frozen importlib._bootstrap>", line 935 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 1331 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1360 in _find_and_load
  File "D:\Projects\janim\src\janim\gui\anim_viewer.py", line 2 in <module>
  File "<frozen importlib._bootstrap>", line 488 in _call_with_frames_removed
  File "<frozen importlib._bootstrap_external>", line 994 in exec_module
  File "<frozen importlib._bootstrap>", line 935 in _load_unlocked
  File "<frozen importlib._bootstrap>", line 1331 in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 1360 in _find_and_load
  File "D:\Projects\janim\src\janim\cli.py", line 26 in run
  File "D:\Projects\janim\src\janim\__main__.py", line 113 in run
  File "D:\Projects\janim\src\janim\__main__.py", line 32 in main
  File "C:\Users\jkjki\AppData\Roaming\Python\Python312\Scripts\janim.exe\__main__.py", line 7 in <module>
  File "<frozen runpy>", line 88 in _run_code
  File "<frozen runpy>", line 198 in _run_module_as_main

Extension modules: _wmi, moderngl.mgl, numpy.core._multiarray_umath, numpy.core._multiarray_tests, numpy.linalg._umath_linalg, numpy.fft._pocketfft_internal, numpy.random._common, numpy.random.bit_generator, numpy.random._bounded_integers, numpy.random._mt19937, numpy.random.mtrand, numpy.random._philox, numpy.random._pcg64, numpy.random._sfc64, numpy.random._generator, PIL._imaging, fontTools.cu2qu.cu2qu, scipy._lib._ccallback_c, scipy.sparse._sparsetools, _csparsetools, scipy.sparse._csparsetools, scipy.sparse.linalg._isolve._iterative, scipy.linalg._fblas, scipy.linalg._flapack, scipy.linalg.cython_lapack, scipy.linalg._cythonized_array_utils, scipy.linalg._solve_toeplitz, scipy.linalg._decomp_lu_cython, scipy.linalg._matfuncs_sqrtm_triu, scipy.linalg.cython_blas, scipy.linalg._matfuncs_expm, scipy.linalg._decomp_update, scipy.linalg._flinalg, scipy.sparse.linalg._dsolve._superlu, scipy.sparse.linalg._eigen.arpack._arpack, scipy.sparse.csgraph._tools, scipy.sparse.csgraph._shortest_path, scipy.sparse.csgraph._traversal, scipy.sparse.csgraph._min_spanning_tree, scipy.sparse.csgraph._flow, scipy.sparse.csgraph._matching, scipy.sparse.csgraph._reordering, scipy.spatial._ckdtree, scipy._lib.messagestream, scipy.spatial._qhull, scipy.spatial._voronoi, scipy.spatial._distance_wrap, scipy.spatial._hausdorff, scipy.special._ufuncs_cxx, scipy.special._ufuncs, 
scipy.special._specfun, scipy.special._comb, scipy.special._ellip_harm_2, scipy.spatial.transform._rotation, psutil._psutil_windows, pathops._pathops, shiboken6.Shiboken (total: 57)

How about using "from janim import" instead?

by adding imports in __init__.py, we can use from janim import * instead of from janim.imports import *. We can move the code in imports.py into __init__.py, or simply add from janim.imports import * to __init__.py, like this:

and it works:
it works
——manim群友Samuelhzx

ERROR: 0:106: '=' : global const initializers must be constant ' const int'

windows 11 23H2,笔记本电脑,CPU:AMD 5700U,没有独立显卡,用的是核显,python 3.12.3,OpenGL 4.6

加载examples,GUI正常,可以操作时间轴和ffmpeg输出,控制台报错,看上去应该是渲染出问题了,但不知道怎么解决

Traceback (most recent call last):
File "D:\Program Files\Anaconda3\envs\JAnim\Lib\site-packages\janim\anims\timeline.py", line 733, in render_all
render_call.func()
File "D:\Program Files\Anaconda3\envs\JAnim\Lib\site-packages\janim\items\item.py", line 561, in render
self.renderer.init()
File "D:\Program Files\Anaconda3\envs\JAnim\Lib\site-packages\janim\render\impl.py", line 75, in init
self.prog = get_program('render/shaders/vitem')
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Program Files\Anaconda3\envs\JAnim\Lib\site-packages\janim\render\base.py", line 92, in get_program
prog = ctx.program(**{
^^^^^^^^^^^^^^^
File "D:\Program Files\Anaconda3\envs\JAnim\Lib\site-packages\moderngl_init_.py", line 1707, in program
res.mglo, _members, res._subroutines, res._geom, res._glo = self.mglo.program(
^^^^^^^^^^^^^^^^^^
_moderngl.Error: GLSL Compiler failed

fragment_shader

ERROR: 0:106: '=' : global const initializers must be constant ' const int'
ERROR: 1 compilation errors. No code generated.

WARNING: 0:0: 'fold' : Some functions have been folded according to full-fold setting, may lead to portable issues.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.