live2d performance on tkinter based on live2d_py
Project description
Live2dTK
Live2d performance on tkinter based on live2d_py
from tkinter import Tk, Frame
from Live2dTK import Live2dFrame
demo = Tk()
demo.attributes('-transparent', 'black') # 想要实现背景透明,必须有这一行
frame = Frame(demo)
frame.pack()
Debugging = Live2dFrame(frame, model_path=r"E:\IDE\Plugins\live2d\米塔\3.model3.json",
width=1000, height=1000)
Debugging.pack()
demo.mainloop()
模型位置不强求,但仍然建议构建规范的项目目录:
.scr
+-live2d
+model_name
+py_file
结果:
其中,附加函数:
def on_start_callback(cls, group: str, no: int):"""动作开始触发事件"""
def on_finish_callback(cls):"""动作结束调用函数"""
def end(cls):"""结束之后的资源释放事件"""
def touch(self):"""被点击事件"""
该模块主要集成的live2d功能来自live2d-py 可以根据改项目的其他方法改写以实现更多的可玩性,当前模块后续也会封装更多的api,加油啊,做黄油的大哥哥!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
live2dtk-1.0.0.tar.gz
(6.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file live2dtk-1.0.0.tar.gz.
File metadata
- Download URL: live2dtk-1.0.0.tar.gz
- Upload date:
- Size: 6.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
27c99dcc0f02b6fe4d173dbe4c8792563035984c264be8cdf218b26904abbb53
|
|
| MD5 |
9edfbe76d7709806ddae6e647646c756
|
|
| BLAKE2b-256 |
8fae362a95ac32f3ac503ee2a837a0f426f51c93575a427f6bb8e26982b83315
|
File details
Details for the file live2dtk-1.0.0-py3-none-any.whl.
File metadata
- Download URL: live2dtk-1.0.0-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b37d6ec17132a28ba62bf282d31a6a018aa9de817cc917d7229056c0d6ceb4cc
|
|
| MD5 |
2c6ce14d4160ee1f892c758652407ec1
|
|
| BLAKE2b-256 |
4fd72128752f6e7ccd653ac5bebb39d61cdae0336422e78bfdba25f790b4e55a
|