danddxuanx / trpg-replay-generator Goto Github PK
View Code? Open in Web Editor NEW回声工坊:像编写文档一样简单地创作跑团replay视频
License: GNU General Public License v3.0
回声工坊:像编写文档一样简单地创作跑团replay视频
License: GNU General Public License v3.0
看了一下最新的代码(alpha 1.15.16)中replay_generator.py
的内建动画部分,逻辑大概是:
elif text[0:11] == '<hitpoint>:'
以及elif text[0:7] == '<dice>:'
)this_timeline
(本小节的timeline文件),并将其并入render_timeline
,以及将内建动画类初始化的代码(code_to_run_x)加入media_list
当中第三步的处理代码可以提取到BuiltInAnimation
的子类当中,每一个内建动画子类都继承自BuiltInAnimation
,子类只需要编写一个返回this_timeline
以及需要加入media_list
的初始化代码的列表(code_to_run_list
)的函数即可
而第一步和第二步也可以简化,在parser函数的else分支中(此时已经检查过不是任何其他类型的行)
this_timeline
和code_to_run_list
code_to_run_list
加入media_list
,将this_timeline
并入render_timeline
提取出来之后,想要写一个新的内建动画的步骤就比较简单了:
BuiltInAnimation
的子类this_timeline
以及需要加入media_list
的初始化代码的列表(code_to_run_list
)的函数想要弄预设动画插件的话,就可以从某个指定的文件夹中的py文件中读取写好的BuiltInAnimation
子类及其正则表达式
不弄插件的话,也可以更方便后面添加其他的预设动画
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.